From 076e24741685d0041d81f53fd32dc7f5878b22a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Sun, 21 Sep 2025 13:45:54 +0100 Subject: [PATCH] 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. --- tests/tail/inotify-dir-recreate.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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; } -- 2.47.3