From 0a84e52bf8819bf25187421995bde348d7c9e642 Mon Sep 17 00:00:00 2001 From: Daniel Samson <12231216+daniel-samson@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:22:58 +0100 Subject: [PATCH] tests: match task names by basename; path-tolerant harness regexes processRunning compared literal names against task names that are now full binary paths; the acpi-ps2/usb-report harness regexes assumed unprefixed driver names in device-manager spawn/restart lines. --- system/kernel/tests.zig | 3 ++- test/qemu_test.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/kernel/tests.zig b/system/kernel/tests.zig index 519e0c8..b4f6111 100644 --- a/system/kernel/tests.zig +++ b/system/kernel/tests.zig @@ -3242,7 +3242,8 @@ fn processRunning(name: []const u8) bool { var table: [64]abi.ProcessDescriptor = undefined; const total = scheduler.enumerate(&table); for (table[0..@min(total, table.len)]) |d| { - if (std.mem.eql(u8, d.name[0..d.name_length], name)) return true; + // Task names are full binary paths; callers pass either form. + if (std.mem.eql(u8, initial_ramdisk.basename(d.name[0..d.name_length]), name)) return true; } return false; } diff --git a/test/qemu_test.py b/test/qemu_test.py index 19e0eff..a34a1fc 100644 --- a/test/qemu_test.py +++ b/test/qemu_test.py @@ -527,7 +527,7 @@ CASES = [ "smp": 4, "timeout": 150, "expect": r"acpi: reported PNP0303[\s\S]*" - r"device-manager: spawned ps2-bus[\s\S]*" + r"device-manager: spawned \S*ps2-bus[\s\S]*" r"ps2-bus: keyboard driver attached", "fail": r"DANOS-TEST-RESULT: FAIL"}, # M21.1: the SCI + power button. Boot the manager (which spawns the acpi