[PATCH] libtraceevent: fix type of args in test_btf_read

Emil Thorsoe <[email protected]> Wed, 6 May 2026 22:13:30 +0300
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
On 32-bit system args contains values that do not fit in 32 long,
use uint64_t.

Signed-off-by: Emil Thorsoe <[email protected]>
---
 utest/traceevent-utest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utest/traceevent-utest.c b/utest/traceevent-utest.c
index 7d09bf2..6980a29 100644
--- a/utest/traceevent-utest.c
+++ b/utest/traceevent-utest.c
@@ -382,7 +382,7 @@ static void test_parse_sizeof_undef(void)
 
 static void test_btf_read(void)
 {
-	unsigned long args[] = {0x7ffe7d33f3d0, 0, 0, 0, 0, 0};
+	uint64_t args[] = {0x7ffe7d33f3d0, 0, 0, 0, 0, 0};
 	const char *func = "getname_flags";
 	struct trace_seq *s = test_seq;
 	struct stat st;
@@ -420,7 +420,7 @@ static void test_btf_read(void)
 	trace_seq_init(s);
 	trace_seq_printf(s, "%s(", func);
 
-	CU_TEST(tep_btf_print_args(test_tep, s, args, nr, sizeof(long), func) == 0);
+	CU_TEST(tep_btf_print_args(test_tep, s, args, nr, sizeof(*args), func) == 0);
 
 	trace_seq_puts(s, ")\n");
 	trace_seq_terminate(s);
-- 
2.53.0