Skip to content

Commit

Permalink
test_bpf: Rename second ALU64_SMOD_X to ALU64_SMOD_K
Browse files Browse the repository at this point in the history
Currently, there are two test cases with same name
"ALU64_SMOD_X: -7 % 2 = -1", the first one is right,
the second one should be ALU64_SMOD_K because its
code is BPF_ALU64 | BPF_MOD | BPF_K.

Before:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS

After:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Tiezhu Yang <[email protected]>
  • Loading branch information
Tiezhu Yang authored and intel-lab-lkp committed Dec 7, 2023
1 parent 2146f7f commit e16a6d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/test_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6277,7 +6277,7 @@ static struct bpf_test tests[] = {
},
/* BPF_ALU64 | BPF_MOD | BPF_K off=1 (SMOD64) */
{
"ALU64_SMOD_X: -7 % 2 = -1",
"ALU64_SMOD_K: -7 % 2 = -1",
.u.insns_int = {
BPF_LD_IMM64(R0, -7),
BPF_ALU64_IMM_OFF(BPF_MOD, R0, 2, 1),
Expand Down

0 comments on commit e16a6d1

Please sign in to comment.