summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 12:23:33 -0300
committerGabriel Schneider <[email protected]>2026-11-10 12:23:41 -0300
commit8008a2655c0f0c9b9890fb4866f774c9b50e170c (patch)
treeec54af73611e686751dd74dd3f4a585198a91de5 /build
parent2e01933dc5c0c1903c1b7f86e453829fee9a541b (diff)
downloadcomputeranim-8008a2655c0f0c9b9890fb4866f774c9b50e170c.tar.gz
computeranim-8008a2655c0f0c9b9890fb4866f774c9b50e170c.zip
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 <[email protected]>
Diffstat (limited to 'build')
-rw-r--r--build/kernel.zig4
1 files changed, 3 insertions, 1 deletions
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);
}