On 31/08/2026 17:34, Iván Ezequiel Rodriguez wrote:
+# Ensure this run actually uses inotify (not a silent fallback to polling).
+assert_notification_mode_()
+{
+ inotify_failed_re='inotify (resources exhausted|cannot be used)'
+ grep -E "$inotify_failed_re" out &&
+ skip_ "inotify can't be used"
This is racy. What if the diagnostic only appears now
+ tail_re='using notification mode' retry_delay_ check_tail_output .1 7 ||
+ cleanup_fail 'tail did not use notification mode'
+}
+
I'm adjusting as follows.
(I'm generally quite paranoid about tail test races,
and find it better to spend time looking for them in review
rather than whackamole later).
I'll push this later.
Marking this as done,
thanks!
Padraig.
diff --git a/tests/tail/inotify-parent-hash.sh
b/tests/tail/inotify-parent-hash.sh
index 0f430dd84..ccf091af7 100755
--- a/tests/tail/inotify-parent-hash.sh
+++ b/tests/tail/inotify-parent-hash.sh
@@ -24,7 +24,7 @@ require_inotify_supported_
check_tail_output()
{
local delay="$1"
- grep "$tail_re" out > /dev/null ||
+ grep -E "$tail_re" out > /dev/null ||
{ sleep $delay; return 1; }
}
@@ -42,10 +42,12 @@ cleanup_fail()
assert_notification_mode_()
{
inotify_failed_re='inotify (resources exhausted|cannot be used)'
- grep -E "$inotify_failed_re" out &&
- skip_ "inotify can't be used"
- tail_re='using notification mode' retry_delay_ check_tail_output .1 7 ||
+ tail_re="using notification mode|$inotify_failed_re" \
+ retry_delay_ check_tail_output .1 7 ||
cleanup_fail 'tail did not use notification mode'
+ if grep -E "$inotify_failed_re" out; then
+ skip_ "inotify can't be used"
+ fi
}
# --- Several basenames in the same parent directory. ---