From 6bcd4f460b7b41ba58a5548524efc346e340a4f1 Mon Sep 17 00:00:00 2001 From: "Christian A. Jacobsen" Date: Wed, 15 Oct 2025 13:46:36 +0200 Subject: [PATCH] test(log): add pointer test cases --- test/integration-ebpf/src/log.rs | 2 ++ test/integration-test/src/tests/log.rs | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/test/integration-ebpf/src/log.rs b/test/integration-ebpf/src/log.rs index 2abb5566..0177d9f9 100644 --- a/test/integration-ebpf/src/log.rs +++ b/test/integration-ebpf/src/log.rs @@ -89,6 +89,8 @@ fn test_log(ctx: ProbeContext) { &ctx, "{} {} {} {} {} {} {}", header, tmp, kind, value, size, op, buf ); + let ptr = 0xdeadbeef as *const u8; + debug!(&ctx, "ptr: {:p}, hex lc: {:x}, hex uc: {:X}", ptr, ptr, ptr); // Testing compilation only. if false { diff --git a/test/integration-test/src/tests/log.rs b/test/integration-test/src/tests/log.rs index e1659d54..600fddd8 100644 --- a/test/integration-test/src/tests/log.rs +++ b/test/integration-test/src/tests/log.rs @@ -187,6 +187,15 @@ fn log() { }) ); + assert_eq!( + records.next(), + Some(&CapturedLog { + body: "ptr: deadbeef, hex lc: deadbeef, hex uc: DEADBEEF".into(), + level: Level::Debug, + target: "log".into(), + }) + ); + assert_eq!( records.next(), Some(&CapturedLog {