File: tests_tail_overlay_headers.patch

package info (click to toggle)
rust-coreutils 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 505,620 kB
  • sloc: ansic: 103,594; asm: 28,570; sh: 8,910; python: 5,581; makefile: 472; cpp: 97; javascript: 72
file content (33 lines) | stat: -rw-r--r-- 1,347 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- gnu.orig/tests/tail/overlay-headers.sh	2025-12-07 23:20:20.566198669 +0100
+++ gnu/tests/tail/overlay-headers.sh	2025-12-07 23:20:20.570198688 +0100
@@ -56,26 +56,39 @@

 kill -0 $pid || fail=1

-# Wait for 5 initial lines
-retry_delay_ wait4lines_ .1 6 5 || fail=1
+# Wait for 5 initial lines (2 headers + 2 content lines + 1 blank)
+retry_delay_ wait4lines_ .1 6 5 || { echo "Failed waiting for initial 5 lines"; fail=1; }
+
+echo "=== After initial wait, line count: $(countlines_) ==="
+echo "=== Initial output: ===" && cat out && echo "=== End initial output ==="

 # Suspend tail so single read() caters for multiple inotify events
-kill -STOP $pid || fail=1
+kill -STOP $pid || { echo "Failed to STOP tail process"; fail=1; }

 # Interleave writes to files to generate overlapping inotify events
 echo line >> file1 || framework_failure_
 echo line >> file2 || framework_failure_
 echo line >> file1 || framework_failure_
 echo line >> file2 || framework_failure_
+echo "=== Files written, resuming tail ==="

 # Resume tail processing
-kill -CONT $pid || fail=1
+kill -CONT $pid || { echo "Failed to CONT tail process"; fail=1; }

-# Wait for 8 more lines
-retry_delay_ wait4lines_ .1 6 13 || fail=1
+# Wait for 8 more lines (should total 13)
+retry_delay_ wait4lines_ .1 6 13 || { echo "Failed waiting for 13 total lines"; fail=1; }