From d0e07e542b0d72420e1725052d879674f0deea1f Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Mon, 17 Feb 2025 15:50:36 +0100 Subject: [PATCH 1/2] tests: do not display bash.err on XFAIL passes This makes no sense since the test has passed and there's nothing to look at in the log. Signed-off-by: Zygmunt Krynicki (cherry picked from commit 473e791e4efc8a8e637300f7c1cc485fcf80bd2f) Signed-off-by: John Johansen --- tests/regression/apparmor/task.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/regression/apparmor/task.yaml b/tests/regression/apparmor/task.yaml index 33b7b6d2e..eae9109a1 100644 --- a/tests/regression/apparmor/task.yaml +++ b/tests/regression/apparmor/task.yaml @@ -128,9 +128,6 @@ execute: | for xfail in ${XFAIL:-}; do if [ "$SPREAD_SYSTEM" = "$xfail" ]; then echo "Test $SPREAD_VARIANT has unexpectedly passed" - echo "Test execution logs are in the files bash.{log,err,trace} and are collected as artifacts" - echo "Bash errors are listed below:" - cat bash.err exit 1 fi done From 12941af65f599342bdd3b535f2427b47c8699975 Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Mon, 17 Feb 2025 15:50:57 +0100 Subject: [PATCH 2/2] tests: display tail of bash.trace on failure Signed-off-by: Zygmunt Krynicki (cherry picked from commit c268e5d11bc166fc2bf6c783f99410eda6ca1f1a) Signed-off-by: John Johansen --- tests/regression/apparmor/task.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/regression/apparmor/task.yaml b/tests/regression/apparmor/task.yaml index eae9109a1..cb1ff391e 100644 --- a/tests/regression/apparmor/task.yaml +++ b/tests/regression/apparmor/task.yaml @@ -123,6 +123,8 @@ execute: | echo "Test execution logs are in the files bash.{log,err,trace} and are collected as artifacts" echo "Bash errors are listed below:" cat bash.err + echo "Tail of the trace is:" + tail bash.trace exit 1 else for xfail in ${XFAIL:-}; do