test: show 'Skipped' for disabled tests instead of 'Pass'

When a test suite returns an empty function list (e.g., a disabled test),
run_test_in_child() was printing 'Pass' because the while(*func) loop
never executed. This was misleading - a disabled test should not report
as passing.

Add a check for empty test list and print 'Skipped' instead. This makes
disabled tests visible in CI output and prevents false positives.

Fixes the issue where protocol_xigetselectedevents_test (disabled) was
reporting 'Pass' instead of 'Skipped'.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2026-10-04 19:15:23 +02:00 • committed by Enrico Weigelt
commit 767b7413f1

View file

@ -43,6 +43,11 @@ run_test_in_child(const testfunc_t* (*suite)(void), const char *funcname)
printf("\n---------------------\n%s...\n", funcname);
if (!*func) {
printf(" Skipped\n");
return;
}
while (*func)
{
cpid = fork();