pci-bus registers and reports what it scans (M19.2)
Each function is registered under the bridge with the config-space slice and BARs sized by the same all-ones probe the kernel uses — byte-for-byte equal descriptors, so the idempotent register returns the kernel's existing node ids during coexistence instead of duplicating the tree. The bridge gained the 16-bit io_port aperture that functions' I/O BARs need to pass containment. Reports carry the registered device_id, and the pci-scan scenario drills a forced restart: kill the enumerator after its reports, watch the respawn re-scan, and assert the broker's PCI node count never grew. The usb-restart test trigger is pinned to the xHCI reporter (pci-bus racing it to two reports used to steal the kill). Harness hardening: failing cases preserve their serial logs; the heavy scenarios run at 150s.
This commit is contained in:
+11
-5
@@ -168,7 +168,7 @@ CASES = [
|
||||
# Stress the big kernel lock across cores; heavier, so a longer timeout.
|
||||
{"name": "smp-stress",
|
||||
"smp": 4,
|
||||
"timeout": 90,
|
||||
"timeout": 150,
|
||||
"expect": r"DANOS-TEST-RESULT: PASS",
|
||||
"fail": r"DANOS-TEST-RESULT: FAIL"},
|
||||
# Retry: a forced first-wake failure must still bring every core online.
|
||||
@@ -263,7 +263,7 @@ CASES = [
|
||||
# death, and the respawned driver re-reports (docs/device-manager.md).
|
||||
{"name": "usb-report",
|
||||
"smp": 4,
|
||||
"timeout": 90,
|
||||
"timeout": 150,
|
||||
"qemu_extra": ["-device", "qemu-xhci,id=xhci",
|
||||
"-device", "usb-kbd,bus=xhci.0",
|
||||
"-device", "usb-mouse,bus=xhci.0"],
|
||||
@@ -286,11 +286,11 @@ CASES = [
|
||||
# the reporter's test-kill produces (docs/device-manager.md).
|
||||
{"name": "device-list",
|
||||
"smp": 4,
|
||||
"timeout": 90,
|
||||
"timeout": 150,
|
||||
"qemu_extra": ["-device", "qemu-xhci,id=xhci",
|
||||
"-device", "usb-kbd,bus=xhci.0",
|
||||
"-device", "usb-mouse,bus=xhci.0"],
|
||||
"expect": r"device-list: 2 devices[\s\S]*"
|
||||
"expect": r"device-list: \d+ devices[\s\S]*"
|
||||
r"device-list: subscribed[\s\S]*"
|
||||
r"device-manager: test mode: killing the reporter[\s\S]*"
|
||||
r"device-list: removed \(device[\s\S]*"
|
||||
@@ -301,7 +301,7 @@ CASES = [
|
||||
# each time), and hits the crash-loop cap (docs/device-manager.md).
|
||||
{"name": "driver-restart",
|
||||
"smp": 4,
|
||||
"timeout": 90,
|
||||
"timeout": 150,
|
||||
"qemu_extra": ["-device", "qemu-xhci,id=xhci",
|
||||
"-device", "usb-kbd,bus=xhci.0",
|
||||
"-device", "usb-mouse,bus=xhci.0"],
|
||||
@@ -479,6 +479,12 @@ def main():
|
||||
for case in selected:
|
||||
print(f" {case['name']:<12} ... ", end="", flush=True)
|
||||
ok, detail = run_case(arch, case)
|
||||
if not ok:
|
||||
# Keep the evidence: serial.log is otherwise overwritten by the
|
||||
# next case, and an intermittent failure's log is unrecoverable.
|
||||
source = os.path.join(WORK, "serial.log")
|
||||
if os.path.exists(source):
|
||||
shutil.copy(source, os.path.join(WORK, f"{case['name']}-failed-serial.log"))
|
||||
print(("PASS" if ok else "FAIL") + f" ({detail})")
|
||||
if not ok:
|
||||
failures += 1
|
||||
|
||||
Reference in New Issue
Block a user