ci: do not use 'tail' for skip-file-rwx-check test

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 <areber@redhat.com>
This commit is contained in:
Adrian Reber 2023-11-30 13:29:56 +00:00 committed by Andrei Vagin
parent f86f1b8491
commit 6679d60ffd

View file

@ -10,11 +10,11 @@ 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
@ -22,7 +22,7 @@ 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
@ -33,5 +33,5 @@ then
echo FAIL
exit 1
fi
kill $tailpid
kill $testpid
echo PASS