Skip to content

Commit

Permalink
ci: do not use 'tail' for skip-file-rwx-check test
Browse files Browse the repository at this point in the history
Newer versions of 'tail' rely on inotify and after a restore 'tail' is
unhappy with the state of inotify and just stops.

This replaces 'tail' with a minimal shell based test (thanks Andrei).

Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Dec 1, 2023
1 parent b17a73b commit 7c01f23
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/others/skip-file-rwx-check/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ source ../env.sh
make clean
touch testfile
chmod +w testfile
tail --follow testfile &
tailpid=$!
if ! "$criu" dump --tree=$tailpid --shell-job --verbosity=4 --log-file=dump.log
bash -c 'exec 3<testfile; while :; do sleep 1; done' &
testpid=$!
if ! "$criu" dump --tree=$testpid --shell-job --verbosity=4 --log-file=dump.log
then
kill $tailpid
kill $testpid
echo "Failed to dump process as expected"
echo FAIL
exit 1
fi
chmod -w testfile
if "$criu" restore --restore-detached --shell-job --verbosity=4 --log-file=restore-expected-fail.log
then
kill $tailpid
kill $testpid
echo "Unexpectedly restored process with reference to a file who's r/w/x perms changed when --skip-file-rwx-check option was not used"
echo FAIL
exit 1
Expand All @@ -33,5 +33,5 @@ then
echo FAIL
exit 1
fi
kill $tailpid
kill $testpid
echo PASS

0 comments on commit 7c01f23

Please sign in to comment.