Module Name: src Committed By: riastradh Date: Thu Apr 4 17:27:32 UTC 2024
Modified Files: src/tests/rump/rumpkern: t_sp.sh Log Message: rumpkern/t_sp: Save stdout and stderr to report on failure. This is not very tidy at the moment, but it's an experiment using the approach in PR bin/58112, to diagnose why t_sp:sigsafe keeps failing intermittently. If this works, perhaps can tidy it up and apply it to all the other tests that run rump_servers. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/rump/rumpkern/t_sp.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/rump/rumpkern/t_sp.sh diff -u src/tests/rump/rumpkern/t_sp.sh:1.17 src/tests/rump/rumpkern/t_sp.sh:1.18 --- src/tests/rump/rumpkern/t_sp.sh:1.17 Tue Sep 1 18:40:09 2020 +++ src/tests/rump/rumpkern/t_sp.sh Thu Apr 4 17:27:32 2024 @@ -1,4 +1,4 @@ -# $NetBSD: t_sp.sh,v 1.17 2020/09/01 18:40:09 gson Exp $ +# $NetBSD: t_sp.sh,v 1.18 2024/04/04 17:27:32 riastradh Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -66,6 +66,18 @@ test_case signal signal # test_case reconnect reconnect test_case_skip reconnect kern/55304 "leftover rump_server" +RUN_CLIENT=' + if "$@"; then + exit 0 + else + status=$? + fi + RUMP_SERVER=unix://commsock rump.halt + cat stdout + cat stderr >&2 + exit $status +' + basic() { export RUMP_SERVER=unix://commsock @@ -105,9 +117,11 @@ sigsafe() { export RUMP_SERVER=unix://commsock + export RUMP_STDOUT="$(pwd)/stdout" + export RUMP_STDERR="$(pwd)/stderr" atf_check -s exit:0 rump_server ${RUMP_SERVER} - atf_check -s exit:0 $(atf_get_srcdir)/h_client/h_sigcli - + atf_check -s exit:0 sh -c "$RUN_CLIENT" -- \ + "$(atf_get_srcdir)"/h_client/h_sigcli } signal()