Skip to contentSkip to conversation

openssh: capture ptest regression test failure logs

PATCH In review Mikko Rapeli 2 participants 2 messages Sep 6, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 openssh: capture ptest regression test failure logs

When tests fail, capture the sshd and ssh client logs from the failing test run. These are needed to investigate the root cause.

Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178

---
 ...ss-Makefile-print-logs-if-test-fails.patch | 34 +++++++++++++++++++
 .../openssh/openssh_9.4p1.bb                  |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch

v2: Upstream-Status from Pending to Submitted, https://github.com/openssh/openssh-portable/pull/437

v1: https://lists.openembedded.org/g/openembedded-core/message/187315

meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch new file +34 -0
new file mode 100644
index 0000000000..baa68dc6ff
@@ -0,0 +1,34 @@
+From 554f7baed050f89ffc2a7192d3071e8c5420f6d3 Mon Sep 17 00:00:00 2001
+From: Mikko Rapeli <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-connectivity/openssh/openssh_9.4p1.bb +1 -0
index 3f232a839d..2c85780e4d 100644
@@ -24,6 +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 \
            "
 SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85"
 
Signature · 1 line
2.34.1
#1 lore raw

Thanks!

Alex

Quoted 82 lines · Mikko Rapeli

When tests fail, capture the sshd and ssh client logs from the failing test run. These are needed to investigate the root cause.

Reference: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178

---
 ...ss-Makefile-print-logs-if-test-fails.patch | 34 +++++++++++++++++++
 .../openssh/openssh_9.4p1.bb                  |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch

v2: Upstream-Status from Pending to Submitted, https://github.com/openssh/openssh-portable/pull/437

v1: https://lists.openembedded.org/g/openembedded-core/message/187315

meta/recipes-connectivity/openssh/openssh/0001-openssh-regress-Makefile-print-logs-if-test-fails.patch new file +34 -0
new file mode 100644
index 0000000000..baa68dc6ff
@@ -0,0 +1,34 @@
+From 554f7baed050f89ffc2a7192d3071e8c5420f6d3 Mon Sep 17 00:00:00 2001
+From: Mikko Rapeli <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-connectivity/openssh/openssh_9.4p1.bb +1 -1
index 3f232a839d..2c85780e4d 100644
@@ -24,6 +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 \
            "
 SRC_URI[sha256sum] = "3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85"
 
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187317): https://lists.openembedded.org/g/openembedded-core/message/187317
Mute This Topic: https://lists.openembedded.org/mt/101193789/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-