* [LTP] [PATCH] bpf_prog05: Use 64bit wide integer constant on m32
@ 2021-05-07 8:17 Richard Palethorpe
2021-05-07 8:28 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Richard Palethorpe @ 2021-05-07 8:17 UTC (permalink / raw)
To: ltp
On 32bit 1UL is only 32bits wide. We need it to be 64bits.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
testcases/kernel/syscalls/bpf/bpf_prog05.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/bpf/bpf_prog05.c b/testcases/kernel/syscalls/bpf/bpf_prog05.c
index f2e0e4698..2dce72ee8 100644
--- a/testcases/kernel/syscalls/bpf/bpf_prog05.c
+++ b/testcases/kernel/syscalls/bpf/bpf_prog05.c
@@ -142,11 +142,11 @@ static void run(void)
*key = 0;
tst_res(TINFO, "Check w7(-1) /= w6(0) [r7 = -1, r6 = 1 << 32]");
- expect_reg_val("src(r6)", 1UL << 32);
+ expect_reg_val("src(r6)", 1ULL << 32);
expect_reg_val("dst(r7)", 0);
tst_res(TINFO, "Check w7(-1) %%= w6(0) [r7 = -1, r6 = 1 << 32]");
- expect_reg_val("src(r6)", 1UL << 32);
+ expect_reg_val("src(r6)", 1ULL << 32);
expect_reg_val("dst(r7)", (uint32_t)-1);
SAFE_CLOSE(map_fd);
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-07 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-07 8:17 [LTP] [PATCH] bpf_prog05: Use 64bit wide integer constant on m32 Richard Palethorpe
2021-05-07 8:28 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox