diff options
Diffstat (limited to 'poky/meta/recipes-connectivity/openssh')
4 files changed, 76 insertions, 35 deletions
diff --git a/poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch b/poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch deleted file mode 100644 index baa68dc6ff..0000000000 --- a/poky/meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 554f7baed050f89ffc2a7192d3071e8c5420f6d3 Mon Sep 17 00:00:00 2001 -From: Mikko Rapeli <mikko.rapeli@linaro.org> -Date: Fri, 25 Aug 2023 10:35:28 +0000 -Subject: [PATCH] openssh regress/Makefile: print logs if test fails - -Some tests are failing in CI runs and reproduction has failed. Print -the captured sshd and ssh client logs if test fails. This should -help to fix the root causes. - -Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178 - -Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> ---- - regress/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Upstream-Status: Submitted [https://github.com/openssh/openssh-portable/pull/437] - -diff --git a/regress/Makefile b/regress/Makefile -index d80bf59..a972dff 100644 ---- a/regress/Makefile -+++ b/regress/Makefile -@@ -229,7 +229,7 @@ t-exec: ${LTESTS:=.sh} - done; \ - if [ "x$${skip}" = "xno" ]; then \ - echo "run test $${TEST}" ... 1>&2; \ -- (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} ${TEST_SHELL} ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ -+ (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} ${TEST_SHELL} ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || (echo return value: $$?; echo capturing logs; cat *.log; exit 1); \ - else \ - echo skip test $${TEST} 1>&2; \ - fi; \ --- -2.34.1 - diff --git a/poky/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch b/poky/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/poky/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch @@ -0,0 +1,61 @@ +From f5a4dacc987ca548fc86577c2dba121c86da3c34 Mon Sep 17 00:00:00 2001 +From: Mikko Rapeli <mikko.rapeli@linaro.org> +Date: Mon, 11 Sep 2023 09:55:21 +0100 +Subject: [PATCH] regress/banner.sh: log input and output files on error + +Some test environments like yocto with qemu are seeing these +tests failing. There may be additional error messages in the +stderr of ssh cloent command. busybox cmp shows this error when +first input file has less new line characters then second +input file: + +cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in + +Logging the full banner.out will show what other error messages +are captured in addition of the expected banner. + +Full log of a failing banner test runs is: + +run test banner.sh ... +test banner: missing banner file +test banner: size 0 +cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in +banner size 0 mismatch +test banner: size 10 +test banner: size 100 +cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in +banner size 100 mismatch +test banner: size 1000 +test banner: size 10000 +test banner: size 100000 +test banner: suppress banner (-q) +FAIL: banner +return value: 1 + +See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178 + +Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> +--- + regress/banner.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Upstream-Status: Denied [https://github.com/openssh/openssh-portable/pull/437] + +diff --git a/regress/banner.sh b/regress/banner.sh +index a84feb5a..de84957a 100644 +--- a/regress/banner.sh ++++ b/regress/banner.sh +@@ -32,7 +32,9 @@ for s in 0 10 100 1000 10000 100000 ; do + verbose "test $tid: size $s" + ( ${SSH} -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \ + cmp $OBJ/banner.in $OBJ/banner.out ) || \ +- fail "banner size $s mismatch" ++ ( verbose "Contents of $OBJ/banner.in:"; cat $OBJ/banner.in; \ ++ verbose "Contents of $OBJ/banner.out:"; cat $OBJ/banner.out; \ ++ fail "banner size $s mismatch" ) + done + + trace "test suppress banner (-q)" +-- +2.34.1 + diff --git a/poky/meta/recipes-connectivity/openssh/openssh/run-ptest b/poky/meta/recipes-connectivity/openssh/openssh/run-ptest index 8a9b770d59..1e6eec5799 100755 --- a/poky/meta/recipes-connectivity/openssh/openssh/run-ptest +++ b/poky/meta/recipes-connectivity/openssh/openssh/run-ptest @@ -4,6 +4,20 @@ export TEST_SHELL=sh export SKIP_UNIT=1 cd regress + +# copied from openssh-portable/.github/run_test.sh +output_failed_logs() { + for i in failed*.log; do + if [ -f "$i" ]; then + echo ------------------------------------------------------------------------- + echo LOGFILE $i + cat $i + echo ------------------------------------------------------------------------- + fi + done +} +trap output_failed_logs 0 + sed -i "/\t\tagent-ptrace /d" Makefile make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \ | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' diff --git a/poky/meta/recipes-connectivity/openssh/openssh_9.4p1.bb b/poky/meta/recipes-connectivity/openssh/openssh_9.4p1.bb index 2c85780e4d..a38d9c2b81 100644 --- a/poky/meta/recipes-connectivity/openssh/openssh_9.4p1.bb +++ b/poky/meta/recipes-connectivity/openssh/openssh_9.4p1.bb @@ -24,7 +24,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ file://sshd_check_keys \ file://add-test-support-for-busybox.patch \ - file://0001-openssh-regress-Makefile-print-logs-if-test-fails.patch \ + file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \ " SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85" |