summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-09-14 13:36:43 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-14 21:57:16 +0100
commitaee5f979ed77c12b225ad8618e16ad0dc83fee3c (patch)
treee5ddf4dfb1832b60f5a23486622fb328475c9d83 /meta/recipes-connectivity/openssh
parentfd72958ca003046bbe10d8f50c7f3830311be520 (diff)
downloadpoky-aee5f979ed77c12b225ad8618e16ad0dc83fee3c.tar.gz
openssh: capture logs in run-ptest
Drop patch to improve logging since upstream rejected it but capture failure logs in run-ptests with similar code as what upstream uses when running the tests via https://github.com/openssh/openssh-portable/blob/master/.github/run_test.sh#L23 (From OE-Core rev: 5f817f5a3897bca39eb832bb910b032632f275b8) 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-openssh-regress-Makefile-print-logs-if-test-fails.patch34
-rwxr-xr-xmeta/recipes-connectivity/openssh/openssh/run-ptest14
-rw-r--r--meta/recipes-connectivity/openssh/openssh_9.4p1.bb1
3 files changed, 14 insertions, 35 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch b/meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch
deleted file mode 100644
index 3355ac4f23..0000000000
--- a/meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 554f7baed050f89ffc2a7192d3071e8c5420f6d3 Mon Sep 17 00:00:00 2001
2From: Mikko Rapeli <mikko.rapeli@linaro.org>
3Date: Fri, 25 Aug 2023 10:35:28 +0000
4Subject: [PATCH] openssh regress/Makefile: print logs if test fails
5
6Some tests are failing in CI runs and reproduction has failed. Print
7the captured sshd and ssh client logs if test fails. This should
8help to fix the root causes.
9
10Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178
11
12Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
13---
14 regress/Makefile | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17Upstream-Status: Denied [https://github.com/openssh/openssh-portable/pull/437]
18
19diff --git a/regress/Makefile b/regress/Makefile
20index d80bf59..a972dff 100644
21--- a/regress/Makefile
22+++ b/regress/Makefile
23@@ -229,7 +229,7 @@ t-exec: ${LTESTS:=.sh}
24 done; \
25 if [ "x$${skip}" = "xno" ]; then \
26 echo "run test $${TEST}" ... 1>&2; \
27- (env SUDO="${SUDO}" TEST_ENV=${TEST_ENV} ${TEST_SHELL} ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
28+ (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); \
29 else \
30 echo skip test $${TEST} 1>&2; \
31 fi; \
32--
332.34.1
34
diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest b/meta/recipes-connectivity/openssh/openssh/run-ptest
index 8a9b770d59..1e6eec5799 100755
--- a/meta/recipes-connectivity/openssh/openssh/run-ptest
+++ b/meta/recipes-connectivity/openssh/openssh/run-ptest
@@ -4,6 +4,20 @@ export TEST_SHELL=sh
4export SKIP_UNIT=1 4export SKIP_UNIT=1
5 5
6cd regress 6cd regress
7
8# copied from openssh-portable/.github/run_test.sh
9output_failed_logs() {
10 for i in failed*.log; do
11 if [ -f "$i" ]; then
12 echo -------------------------------------------------------------------------
13 echo LOGFILE $i
14 cat $i
15 echo -------------------------------------------------------------------------
16 fi
17 done
18}
19trap output_failed_logs 0
20
7sed -i "/\t\tagent-ptrace /d" Makefile 21sed -i "/\t\tagent-ptrace /d" Makefile
8make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \ 22make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
9 | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' 23 | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
diff --git a/meta/recipes-connectivity/openssh/openssh_9.4p1.bb b/meta/recipes-connectivity/openssh/openssh_9.4p1.bb
index 1cf6937038..a38d9c2b81 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.4p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_9.4p1.bb
@@ -24,7 +24,6 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
24 file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ 24 file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
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 \
28 file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \ 27 file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \
29 " 28 "
30SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85" 29SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85"