summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-07-10 11:48:04 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-07-10 11:48:04 +0800
commitb9ff206e6bd3f4d67851263a6f2acb5f575cf3b0 (patch)
tree701314c3aedaa5684e9d4e8f55e261a10b4875f8 /test
parente90b72ec3082588b296956730bd2930cf8d5d671 (diff)
downloadlume-b9ff206e6bd3f4d67851263a6f2acb5f575cf3b0.tar.gz
lume-b9ff206e6bd3f4d67851263a6f2acb5f575cf3b0.tar.xz
fix: match all FDT compatible strings
Walk the complete NUL-separated compatible property when binding platform devices so the QEMU PLIC probes correctly and UART receive interrupts reach the TTY. Add a boot-time regression assertion for IRQ-chip binding.
Diffstat (limited to 'test')
-rw-r--r--test/test_driver_model.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_driver_model.cc b/test/test_driver_model.cc
index 8f105b3..074a84e 100644
--- a/test/test_driver_model.cc
+++ b/test/test_driver_model.cc
@@ -11,6 +11,7 @@
#include <lume/kref.h>
#include <lume/kobject.h>
#include <lume/device.h>
+#include <lume/irq.h>
/* ------------------------------------------------------------------ */
/* Test 1: kref get/put + release fires exactly once */
@@ -206,4 +207,8 @@ void selftest_driver_model()
test_kref();
test_kobject_hierarchy();
test_bus_bind();
+
+ st_begin("driver model: platform IRQ chip probed");
+ ST_ASSERT(g_irq_manager.get_chip() != nullptr);
+ st_pass();
}