From 8008a2655c0f0c9b9890fb4866f774c9b50e170c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 12:23:33 -0300 Subject: kernel: on today's main Symbols come from Symbols (perf.lookup is gone), string ids from event.stringId, and ptrace.Process is used as it is now. A USDT semaphore of the program itself is raised by the tracer: the kernel's counter landed on the wrong word of a small lld-linked target, whose page of the file is mapped writable twice. test-kernel also runs the library tests of perf, usdt and bpf. Co-Authored-By: Claude Fable 5.2 --- build/kernel.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build/kernel.zig') diff --git a/build/kernel.zig b/build/kernel.zig index bbed126..aae593a 100644 --- a/build/kernel.zig +++ b/build/kernel.zig @@ -27,6 +27,8 @@ pub fn add(ctx: Ctx) void { .imports = &.{ .{ .name = "ztrace", .module = ctx.ztrace }, .{ .name = "targets", .module = paths.createModule() } }, }) }); step.dependOn(&b.addRunArtifact(tests).step); + // ... and the library's own tests of this area: what needs no target. + step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = ctx.ztrace, .filters = &.{ "perf.test", "usdt.test", "bpf.test" } })).step); // The BPF side for real: this machine's kernel booted in QEMU, where we // are root. Not part of `test`: it wants qemu, /dev/kvm, cpio and a @@ -47,7 +49,7 @@ pub fn add(ctx: Ctx) void { // in libc; step(1002, 2001) in the thread; tick(3, 14) with its semaphore. for ([_][]const u8{ "(0 lost)", " syscall_enter ", " aux=230 ", " sched ", - " a=7166cdb822920ddd 3eb ", " a=a02712eb14a9b985 3ea 7d1 ", " a=7f4909df02928d94 3 e ", + " a=f166cdb822920ddd 3eb ", " a=a02712eb14a9b985 3ea 7d1 ", " a=ff4909df02928d94 3 e ", }) |expected| vm.expectStdOutMatch(expected); b.step("test-kernel-vm", "Run the BPF programs as root in a QEMU VM of this kernel").dependOn(&vm.step); } -- cgit v1.3