From 551a50cd72675c831f416101299e669fec6d72ed Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Mon, 18 Dec 2023 19:56:15 +0000 Subject: [PATCH] tests: additional run-runk logging Add logging to run-runk, for debugging possible failures. Fixes: #8696 Signed-off-by: Dan Mihai --- tests/integration/runk/runk-tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration/runk/runk-tests.sh b/tests/integration/runk/runk-tests.sh index 714f10af50..210c60d845 100755 --- a/tests/integration/runk/runk-tests.sh +++ b/tests/integration/runk/runk-tests.sh @@ -40,8 +40,12 @@ test_runk() { echo "test ps command" sudo ctr t exec --detach --exec-id id1 ${CONTAINER_ID} sh - # one line is the titles, and the other 2 lines are porcess info - [ "3" == "$(sudo ctr t ps ${CONTAINER_ID} | wc -l)" ] || die "ps command failed" + ps_out="$(sudo ctr t ps ${CONTAINER_ID})" || die "ps command failed" + printf "ps output:\n%s\n" "${ps_out}" + lines_no="$(printf "%s\n" "${ps_out}" | wc -l)" + echo "ps output lines: ${lines_no}" + # one line is the titles, and the other 2 lines are process info + [ "3" == "${lines_no}" ] || die "unexpected ps command output" echo "test pause and resume" # The process outputs lines into /tmp/{CONTAINER_ID}, which can be read in host when it's frozon.