From 26d63d0a1fca8879f1b08074fdd315089eeb6232 Mon Sep 17 00:00:00 2001 From: Kamoltat Sirivadhna Date: Sat, 28 Jun 2025 20:06:52 +0000 Subject: [PATCH] qa/workunits/rados/test.sh: Create XML report for timeout tests Currently the failure description in teuthology doesn't give us much detail rather than COMMAND_FAILURE when the test timedout, this is because when we timeout and kill the process there are no XML files generated, therefore, this commit will create an XML file report when we decide to timeout and kill the long running test process. Fixes: https://tracker.ceph.com/issues/70772 Signed-off-by: Kamoltat Sirivadhna --- qa/workunits/rados/test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/qa/workunits/rados/test.sh b/qa/workunits/rados/test.sh index 41096528563..09f39809288 100755 --- a/qa/workunits/rados/test.sh +++ b/qa/workunits/rados/test.sh @@ -119,6 +119,28 @@ do if [ $waited -ge $max_wait ]; then # Process timed out echo "ERROR: Test $t ($pid) - TIMED OUT after $max_wait seconds" + + # Create fallback XML file + xml_path="$GTEST_OUTPUT_DIR/$t.xml" + if [[ $t == neorados_* ]]; then + xml_path="$GTEST_OUTPUT_DIR/neorados_$t.xml" + fi + + echo "Creating fallback XML report at $xml_path" + cat > "$xml_path" << EOF + + + + + + The test suite ${t} (PID ${pid}) exceeded the maximum allowed execution time of ${max_wait} seconds. + Unable to determine which specific test case was running when the timeout occurred. + Please check the logs for more details, this may indicate a hang, deadlock, or extremely slow performance. + + + + +EOF kill -9 $pid 2>/dev/null || true ret=1 break -- 2.47.3