diff --git a/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_allow.sh b/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_allow.sh index 7472c9ea2559..95b60c4d73a4 100644 --- a/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_allow.sh +++ b/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_allow.sh @@ -42,6 +42,7 @@ snap run --shell prompting-client.scripted -c "echo test4/file.txt is written > for dir in test1 test2 test3 ; do name="${dir}/file.txt" echo "Check that create for $name was not actioned by reply for test4/file.txt" + # NOTE: if one checks [ -f "${TEST_DIR}/${name}" ], it may kill the blocked create if [ -f "${WRITABLE}/${dir}-finished" ] ; then echo "create of $name finished before create for test5/file.txt started" exit 1 diff --git a/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_deny.sh b/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_deny.sh index 72f5b292b63d..72672a94a523 100644 --- a/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_deny.sh +++ b/tests/main/apparmor-prompting-integration-tests/create_multiple_not_actioned_by_other_pid_single_deny.sh @@ -39,14 +39,10 @@ echo "Attempt to create test4/file.txt (for which client will reply deny single) mkdir -p "${TEST_DIR}/test4" snap run --shell prompting-client.scripted -c "echo test4/file.txt is written > ${TEST_DIR}/test4/file.txt" -echo "Check that original files have not yet been created" for dir in test1 test2 test3 ; do name="${dir}/file.txt" - if [ -f "${TEST_DIR}/${name}" ] ; then - echo "file creation unexpectedly succeeded early for $name" - exit 1 - fi echo "Check that create for $name was not actioned by reply for test4/file.txt" + # NOTE: if one checks [ -f "${TEST_DIR}/${name}" ], it may kill the blocked create if [ -f "${WRITABLE}/${dir}-finished" ] ; then echo "create of $name finished before create for test5/file.txt started" exit 1