summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-09-11 16:39:50 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-12 07:45:52 +0100
commit38106afd0b85084848877fb237f08d3dd056bd53 (patch)
tree370340ac115483e9378a5ad8b04b0ee42ca93f50 /meta/recipes-connectivity/openssh
parentac070117aef2133066dcf10131fa9bf3fe5e5408 (diff)
downloadpoky-38106afd0b85084848877fb237f08d3dd056bd53.tar.gz
openssh: improve banner ptest failure logging
Log the input and output banner files. Output seems to contain more lines than input which fails the test but it's not clear what is in there from the ssh command stderr. So print them out to dig deeper into the root cause. Upstream rejected previous logging patch so they will likely do the same for this: https://github.com/openssh/openssh-portable/pull/437 Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178 (From OE-Core rev: 3230378d651ecc53ff5cac1aaa24f35d5cea8665) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssh')
-rw-r--r--meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch61
-rw-r--r--meta/recipes-connectivity/openssh/openssh_9.4p1.bb1
2 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch b/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch
new file mode 100644
index 0000000000..2c14014fed
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch
@@ -0,0 +1,61 @@
1From f5a4dacc987ca548fc86577c2dba121c86da3c34 Mon Sep 17 00:00:00 2001
2From: Mikko Rapeli <mikko.rapeli@linaro.org>
3Date: Mon, 11 Sep 2023 09:55:21 +0100
4Subject: [PATCH] regress/banner.sh: log input and output files on error
5
6Some test environments like yocto with qemu are seeing these
7tests failing. There may be additional error messages in the
8stderr of ssh cloent command. busybox cmp shows this error when
9first input file has less new line characters then second
10input file:
11
12cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in
13
14Logging the full banner.out will show what other error messages
15are captured in addition of the expected banner.
16
17Full log of a failing banner test runs is:
18
19run test banner.sh ...
20test banner: missing banner file
21test banner: size 0
22cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in
23banner size 0 mismatch
24test banner: size 10
25test banner: size 100
26cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in
27banner size 100 mismatch
28test banner: size 1000
29test banner: size 10000
30test banner: size 100000
31test banner: suppress banner (-q)
32FAIL: banner
33return value: 1
34
35See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178
36
37Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
38---
39 regress/banner.sh | 4 +++-
40 1 file changed, 3 insertions(+), 1 deletion(-)
41
42Upstream-Status: Denied [https://github.com/openssh/openssh-portable/pull/437]
43
44diff --git a/regress/banner.sh b/regress/banner.sh
45index 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" )
56 done
57
58 trace "test suppress banner (-q)"
59--
602.34.1
61
diff --git a/meta/recipes-connectivity/openssh/openssh_9.4p1.bb b/meta/recipes-connectivity/openssh/openssh_9.4p1.bb
index 2c85780e4d..1cf6937038 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.4p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_9.4p1.bb
@@ -25,6 +25,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
25 file://sshd_check_keys \ 25 file://sshd_check_keys \
26 file://add-test-support-for-busybox.patch \ 26 file://add-test-support-for-busybox.patch \
27 file://0001-openssh-regress-Makefile-print-logs-if-test-fails.patch \ 27 file://0001-openssh-regress-Makefile-print-logs-if-test-fails.patch \
28 file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \
28 " 29 "
29SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85" 30SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85"
30 31