On 11/11/2025 02:55, Collin Funk wrote:
* tests/tac/tac-2-nonseekable.sh: Add a test case.
---
  tests/tac/tac-2-nonseekable.sh | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/tests/tac/tac-2-nonseekable.sh b/tests/tac/tac-2-nonseekable.sh
index 0b9ed3986..1cf06388e 100755
--- a/tests/tac/tac-2-nonseekable.sh
+++ b/tests/tac/tac-2-nonseekable.sh
@@ -42,4 +42,7 @@ returns_ 124 timeout 10 tac - - <&- 2>err && skip_ 'error 
closing stdin'
  # This failed due to heap corruption from v8.15-v8.25 inclusive.
  returns_ 1 timeout 10 tac - - <&- 2>err || fail=1
+# We should read standard input indefinitely in this case.
+returns_ 124 timeout 1 tac < /dev/zero || fail=1
+
  Exit $fail

I'd add a comment to say we're assuming /dev/zero is seekable.
I don't know of anywhere that doesn't hold, but also I'm
not sure how to easily verify that, so it's worth the comment.

Note the test is also assuming that the read data is not buffered.
So it would be worth affirming that through the use of
get_min_ulimit_v_ etc.

thanks,
Padraig

Reply via email to