bpf, tests: Add more ALU32 tests for BPF_LSH/RSH/ARSH
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Mon, 9 Aug 2021 09:18:20 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 10 Aug 2021 09:33:05 +0000 (11:33 +0200)
commit0f2fca1ab18319dcb47f6b15b7c5d3f29da84b6d
treef8b9ccac1e0fecf806251913454e6a78885d4c4c
parentba89bcf78fba8ff99d84b762c56fbfdabc97731c
bpf, tests: Add more ALU32 tests for BPF_LSH/RSH/ARSH

This patch adds more tests of ALU32 shift operations BPF_LSH and BPF_RSH,
including the special case of a zero immediate. Also add corresponding
BPF_ARSH tests which were missing for ALU32.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210809091829.810076-6-johan.almbladh@anyfinetworks.com
lib/test_bpf.c