runtime: std.log for every user binary — kernel-stamped attribution
library/runtime/log.zig wires std.log to the tagged ring: the root shim installs std_options for every binary (programs may override), logFn formats one line per record and emits it with its level via debug_write — the payload no longer carries the process's name; the kernel stamps identity structurally and the serial renderer prints the '<binary path>: ' prefix, so the transcript keeps its shape. Migrate every writeLine/logLine/log helper family (init, vfs, fat, device-manager, acpi, pci-bus, ps2-bus x3, usb-hid x2, usb-storage, usb-xhci-bus, virtio-gpu — 104 call sites) to std.log.info, dropping the hand-written prefixes. A leveled record is a complete line by contract (raw emissions may still build lines from pieces). Test fixtures and the display/input services keep raw writes for now — their ring records are attributed by the kernel regardless. Harness regexes follow the renamed prefixes (usb-hid-keyboard, discovery) and path-named restart lines.
This commit is contained in:
+5
-5
@@ -458,7 +458,7 @@ CASES = [
|
||||
"smp": 4,
|
||||
"timeout": 150,
|
||||
# usb-kbd/usb-mouse ride the default boot xHCI bus (see qemu_args).
|
||||
"expect": r"(?=[\s\S]*usb-hid/keyboard: ok)(?=[\s\S]*usb-hid/mouse: ok)",
|
||||
"expect": r"(?=[\s\S]*usb-hid-keyboard: ok)(?=[\s\S]*usb-hid-mouse: ok)",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL"},
|
||||
# USB mass storage end to end: the boot usb-storage device (the FAT32 image,
|
||||
# which has a real 0x55AA boot sector) is enough — the manager spawns
|
||||
@@ -526,7 +526,7 @@ CASES = [
|
||||
{"name": "acpi-ps2",
|
||||
"smp": 4,
|
||||
"timeout": 150,
|
||||
"expect": r"acpi: reported PNP0303[\s\S]*"
|
||||
"expect": r"discovery: reported PNP0303[\s\S]*"
|
||||
r"device-manager: spawned \S*ps2-bus[\s\S]*"
|
||||
r"ps2-bus: keyboard driver attached",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL"},
|
||||
@@ -572,8 +572,8 @@ CASES = [
|
||||
{"name": "acpi-report",
|
||||
"smp": 4,
|
||||
"timeout": 150,
|
||||
"expect": r"acpi: reported PNP0303 \(device \d+, 3 resources\)[\s\S]*"
|
||||
r"acpi: reported PNP0F13 \(device \d+, 1 resources\)",
|
||||
"expect": r"discovery: reported PNP0303 \(device \d+, 3 resources\)[\s\S]*"
|
||||
r"discovery: reported PNP0F13 \(device \d+, 1 resources\)",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL"},
|
||||
# M19.1/M19.3: the ring-3 PCI scan. pci-bus walks the ECAM through its mmio_map
|
||||
# grant and registers every function it finds; the kernel's own walk retired, so
|
||||
@@ -589,7 +589,7 @@ CASES = [
|
||||
"timeout": 60,
|
||||
"expect": r"pci-bus: (\d+) functions found[\s\S]*"
|
||||
r"device-manager: test mode: killing the reporter[\s\S]*"
|
||||
r"device-manager: restarting pci-bus[\s\S]*"
|
||||
r"device-manager: restarting \S*pci-bus[\s\S]*"
|
||||
r"pci-bus: \1 functions found[\s\S]*"
|
||||
r"DANOS-TEST-RESULT: PASS",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL"},
|
||||
|
||||
Reference in New Issue
Block a user