From: Pádraig Brady
Date: Sun, 21 Sep 2025 12:45:54 +0000 (+0100) Subject: tests: tail: avoid false failure with overlayfs X-Git-Tag: v9.8~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=076e24741685d0041d81f53fd32dc7f5878b22a9;p=thirdparty%2Fcoreutils.git tests: tail: avoid false failure with overlayfs * tests/tail/inotify-dir-recreate.sh: Add an extra check that inotify is in use, as it's required for this test. Inotify is avoided with overlayfs for which the df --local check is not sufficient exclusion for. --- diff --git a/tests/tail/inotify-dir-recreate.sh b/tests/tail/inotify-dir-recreate.sh index e99abd842f..569a3b1aa7 100755 --- a/tests/tail/inotify-dir-recreate.sh +++ b/tests/tail/inotify-dir-recreate.sh @@ -24,6 +24,14 @@ print_ver_ tail grep '^#define HAVE_INOTIFY 1' "$CONFIG_HEADER" >/dev/null && is_local_dir_ . \ || skip_ 'inotify is not supported' +# There may be a mismatch between is_local_dir_ (gnulib's remoteness check), +# and coreutils' is_local_fs_type(), so double check we're using inotify. +touch file.strace +require_strace_ 'inotify_add_watch' +returns_ 124 timeout .1 strace -e inotify_add_watch -o strace.out \ + tail -F file.strace || fail=1 +grep 'inotify' strace.out || skip_ 'inotify not detected' + # Terminate any background tail process cleanup_() { kill $pid 2>/dev/null && wait $pid; }