1 From f5a4dacc987ca548fc86577c2dba121c86da3c34 Mon Sep 17 00:00:00 2001
2 From: Mikko Rapeli <mikko.rapeli@linaro.org>
3 Date: Mon, 11 Sep 2023 09:55:21 +0100
4 Subject: [PATCH] regress/banner.sh: log input and output files on error
6 Some test environments like yocto with qemu are seeing these
7 tests failing. There may be additional error messages in the
8 stderr of ssh cloent command. busybox cmp shows this error when
9 first input file has less new line characters then second
12 cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in
14 Logging the full banner.out will show what other error messages
15 are captured in addition of the expected banner.
17 Full log of a failing banner test runs is:
19 run test banner.sh ...
20 test banner: missing banner file
22 cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in
23 banner size 0 mismatch
26 cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in
27 banner size 100 mismatch
28 test banner: size 1000
29 test banner: size 10000
30 test banner: size 100000
31 test banner: suppress banner (-q)
35 See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178
37 Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
39 regress/banner.sh | 4 +++-
40 1 file changed, 3 insertions(+), 1 deletion(-)
42 Upstream-Status: Denied [https://github.com/openssh/openssh-portable/pull/437]
44 diff --git a/regress/banner.sh b/regress/banner.sh
45 index a84feb5a..de84957a 100644
46 --- a/regress/banner.sh
47 +++ b/regress/banner.sh
48 @@ -32,7 +32,9 @@ for s in 0 10 100 1000 10000 100000 ; do
49 verbose "test $tid: size $s"
50 ( ${SSH} -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \
51 cmp $OBJ/banner.in $OBJ/banner.out ) || \
52 - fail "banner size $s mismatch"
53 + ( verbose "Contents of $OBJ/banner.in:"; cat $OBJ/banner.in; \
54 + verbose "Contents of $OBJ/banner.out:"; cat $OBJ/banner.out; \
55 + fail "banner size $s mismatch" )
58 trace "test suppress banner (-q)"