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.
This commit is contained in:
Daniel Samson
2026-07-21 15:22:58 +01:00
parent 1cf9985da6
commit 0a84e52bf8
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -3242,7 +3242,8 @@ fn processRunning(name: []const u8) bool {
var table: [64]abi.ProcessDescriptor = undefined; var table: [64]abi.ProcessDescriptor = undefined;
const total = scheduler.enumerate(&table); const total = scheduler.enumerate(&table);
for (table[0..@min(total, table.len)]) |d| { 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; return false;
} }
+1 -1
View File
@@ -527,7 +527,7 @@ CASES = [
"smp": 4, "smp": 4,
"timeout": 150, "timeout": 150,
"expect": r"acpi: reported PNP0303[\s\S]*" "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", r"ps2-bus: keyboard driver attached",
"fail": r"DANOS-TEST-RESULT: FAIL"}, "fail": r"DANOS-TEST-RESULT: FAIL"},
# M21.1: the SCI + power button. Boot the manager (which spawns the acpi # M21.1: the SCI + power button. Boot the manager (which spawns the acpi