Skip to content

Commit fc1b43f

Browse files
committed
CI: Add debug output for functional test investigation
GNU functional tests (mutex, semaphore) are timing out at 30s without producing any QEMU output. Add debug output showing the first 500 characters of QEMU output to help diagnose whether: 1. Tests produce no output (indicating execution/build issue) 2. Tests produce output but fail to print PASS criteria 3. Tests are simply too slow and need more optimization The tests enter infinite loops after printing results (by design to prevent kernel panic), so QEMU never exits naturally. Regular app tests accept timeout as valid, but functional tests need specific PASS criteria strings.
1 parent 1b77dcb commit fc1b43f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.ci/run-functional-tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ test_functional_app() {
5858
output=$(timeout ${TIMEOUT}s qemu-system-riscv32 -nographic -machine virt -bios none -kernel build/image.elf 2>&1)
5959
exit_code=$?
6060

61+
# Debug: Show first 500 chars of output
62+
if [ -n "$output" ]; then
63+
echo "[DEBUG] Output preview (first 500 chars):"
64+
echo "$output" | head -c 500
65+
echo ""
66+
else
67+
echo "[DEBUG] No output captured from QEMU"
68+
fi
69+
6170
# Parse expected criteria
6271
local expected_passes="${FUNCTIONAL_TESTS[$test]}"
6372
IFS=',' read -ra PASS_CRITERIA <<<"$expected_passes"

0 commit comments

Comments
 (0)