Module Name: src Committed By: rillig Date: Sun Sep 12 10:26:49 UTC 2021
Modified Files: src/usr.bin/make/unit-tests: job-output-null.exp job-output-null.mk Log Message: tests/make: make output of test job-output-null clearer Having 5 times the word 'hello' in the output doesn't help at understanding the test and how the output was produced. Bash 5 sometimes makes this test fail by adding '2b' and '2c' to the output. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/job-output-null.exp \ src/usr.bin/make/unit-tests/job-output-null.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/job-output-null.exp diff -u src/usr.bin/make/unit-tests/job-output-null.exp:1.2 src/usr.bin/make/unit-tests/job-output-null.exp:1.3 --- src/usr.bin/make/unit-tests/job-output-null.exp:1.2 Sat Jul 3 22:39:40 2021 +++ src/usr.bin/make/unit-tests/job-output-null.exp Sun Sep 12 10:26:49 2021 @@ -1,4 +1,4 @@ -hello -hello -hello without newline, hello without newline. +1 +2a +3a without newline, 3b without newline. exit status 0 Index: src/usr.bin/make/unit-tests/job-output-null.mk diff -u src/usr.bin/make/unit-tests/job-output-null.mk:1.2 src/usr.bin/make/unit-tests/job-output-null.mk:1.3 --- src/usr.bin/make/unit-tests/job-output-null.mk:1.2 Sat Jul 3 22:39:40 2021 +++ src/usr.bin/make/unit-tests/job-output-null.mk Sun Sep 12 10:26:49 2021 @@ -1,4 +1,4 @@ -# $NetBSD: job-output-null.mk,v 1.2 2021/07/03 22:39:40 rillig Exp $ +# $NetBSD: job-output-null.mk,v 1.3 2021/09/12 10:26:49 rillig Exp $ # # Test how null bytes in the output of a command are handled. Make processes # them using null-terminated strings, which may cut off some of the output. @@ -26,14 +26,14 @@ all: .PHONY # The null byte from the command output is kept as-is. # See CollectOutput, which looks like it intended to replace these # null bytes with simple spaces. - @printf 'hello\0world\n' + @printf '1\0trailing\n' # Give the parent process a chance to see the above output, but not # yet the output from the next printf command. @sleep 1 # All null bytes from the command output are kept as-is. - @printf 'hello\0world\n''hello\0world\n''hello\0world\n' + @printf '2a\0trailing\n''2b\0trailing\n''2c\0trailing\n' @sleep 1 @@ -42,4 +42,4 @@ all: .PHONY # # The three null bytes in a row test whether this output is # compressed to a single space like in DebugFailedTarget. It isn't. - @printf 'hello\0without\0\0\0newline, hello\0without\0\0\0newline.' + @printf '3a\0without\0\0\0newline, 3b\0without\0\0\0newline.'