Module Name:    src
Committed By:   rillig
Date:           Sun Sep  5 22:34:07 UTC 2021

Modified Files:
        src/tests/lib/libc/stdio: t_intr.sh

Log Message:
tests/stdio: use standard ATF tools for verifying the test output

In case of a test failure, this outputs a diff between the actual and
expected files.

Even with the smaller buffer size LMAX, the fully buffered test fails.
It does so after printing numbers up to 12773, which together take 65532
bytes.  The next number, 12774, would cross the 65536 boundary, but
instead of that number, 12710730 was written.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/stdio/t_intr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/stdio/t_intr.sh
diff -u src/tests/lib/libc/stdio/t_intr.sh:1.3 src/tests/lib/libc/stdio/t_intr.sh:1.4
--- src/tests/lib/libc/stdio/t_intr.sh:1.3	Sun Sep  5 22:14:49 2021
+++ src/tests/lib/libc/stdio/t_intr.sh	Sun Sep  5 22:34:07 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_intr.sh,v 1.3 2021/09/05 22:14:49 rillig Exp $
+# $NetBSD: t_intr.sh,v 1.4 2021/09/05 22:34:07 rillig Exp $
 #
 # Copyright (c) 2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -40,7 +40,7 @@ h_test() {
 	"${DIR}/h_intr" \
 	    -p "$2" -a ${SSIZE} -b ${BSIZE} -t ${TMOUT} \
 	    -c "dd of=numbers.out msgfmt=quiet" numbers.in
-	atf_check "${DIR}/h_testnumbers" < numbers.out
+	atf_check -o "file:numbers.in" cat numbers.out
 }
 
 atf_test_case stdio_intr_ionbf
@@ -70,7 +70,7 @@ stdio_intr_iofbf_head()
 }
 stdio_intr_iofbf_body()
 {
-	h_test ${MAX} IOFBF
+	h_test ${LMAX} IOFBF
 }
 
 atf_init_test_cases()

Reply via email to