kernel_samsung_a53x/tools/testing/selftests
Zijian Zhang fb0c9a0102 selftests/bpf: Fix msg_verify_data in test_sockmap
[ Upstream commit ee9b352ce4650ffc0d8ca0ac373d7c009c7e561e ]

Function msg_verify_data should have context of bytes_cnt and k instead of
assuming they are zero. Otherwise, test_sockmap with data integrity test
will report some errors. I also fix the logic related to size and index j

1/ 6  sockmap::txmsg test passthrough:FAIL
2/ 6  sockmap::txmsg test redirect:FAIL
7/12  sockmap::txmsg test apply:FAIL
10/11  sockmap::txmsg test push_data:FAIL
11/17  sockmap::txmsg test pull-data:FAIL
12/ 9  sockmap::txmsg test pop-data:FAIL
13/ 1  sockmap::txmsg test push/pop data:FAIL
...
Pass: 24 Fail: 52

After applying this patch, some of the errors are solved, but for push,
pull and pop, we may need more fixes to msg_verify_data, added a TODO

10/11  sockmap::txmsg test push_data:FAIL
11/17  sockmap::txmsg test pull-data:FAIL
12/ 9  sockmap::txmsg test pop-data:FAIL
...
Pass: 37 Fail: 15

Besides, added a custom errno EDATAINTEGRITY for msg_verify_data, we
shall not ignore the error in txmsg_cork case.

Fixes: 753fb2ee0934 ("bpf: sockmap, add msg_peek tests to test_sockmap")
Fixes: 16edddfe3c5d ("selftests/bpf: test_sockmap, check test failure")
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
Link: https://lore.kernel.org/r/20241012203731.1248619-2-zijianzhang@bytedance.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:24:05 +01:00
..
android Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm64 kselftest/arm64: mte: fix printf type warnings about longs 2024-12-17 13:23:58 +01:00
bpf selftests/bpf: Fix msg_verify_data in test_sockmap 2024-12-17 13:24:05 +01:00
breakpoints Revert "selftests: breakpoints: use remaining time to check if suspend succeed" 2024-11-24 00:23:05 +01:00
capabilities Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cgroup Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clone3 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE 2024-11-23 23:20:42 +01:00
cpu-hotplug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpufreq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
damon Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dmabuf-heaps Revert "kselftests: dmabuf-heaps: Ensure the driver name is null-terminated" 2024-11-24 00:23:39 +01:00
drivers mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors 2024-11-23 23:20:07 +01:00
efivarfs selftests/efivarfs: create-read: fix a resource leak 2024-11-18 11:43:13 +01:00
exec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filesystems selftests/binderfs: use the Makefile's rules, not Make's implicit rules 2024-11-19 12:26:56 +01:00
firmware Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace tracing/selftests: Fix kprobe event name test for .isra. functions 2024-11-19 14:19:00 +01:00
futex Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ia64 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_pstate Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ir Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kcmp selftests/kcmp: remove unused open mode 2024-11-19 12:26:59 +01:00
kexec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kmod Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kselftest Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lib Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
livepatch Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lkdtm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
locking Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
media_tests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
membarrier Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memfd Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memory-hotplug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mincore Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mount Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mqueue selftests/mqueue: Set timeout to 180 seconds 2024-11-19 09:22:15 +01:00
net net: Add l3mdev index to flow struct and avoid oif reset for port devices 2024-11-23 23:21:52 +01:00
netfilter Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ntb Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
openat2 selftests/openat2: Fix build warnings on ppc64 2024-11-19 14:19:47 +01:00
pid_namespace Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pidfd selftests/pidfd: Fix ksft print formats 2024-11-18 11:43:02 +01:00
powerpc selftests/powerpc: Fix error handling in FPU/VMX preemption tests 2024-11-18 12:12:20 +01:00
prctl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pstore Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptrace Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcutorture Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resctrl selftests/resctrl: Protect against array overrun during iMC config parsing 2024-12-17 13:24:03 +01:00
rseq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
safesetid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seccomp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sigaltstack selftests/sigaltstack: Fix ppc64 GCC build 2024-11-23 23:20:15 +01:00
size Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sparc64 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
splice Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
static_keys Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sync Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysctl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tc-testing Revert "tc-testing: don't access non-existent variable on exception" 2024-11-24 00:23:52 +01:00
timens Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timers selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior 2024-11-19 11:32:44 +01:00
tmpfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tpm2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uevent Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vDSO Revert "selftests: vDSO: fix vDSO symbols lookup for powerpc64" 2024-11-24 00:23:05 +01:00
vm Revert "selftests/mm: fix charge_reserved_hugetlb.sh test" 2024-11-24 00:23:05 +01:00
watchdog selftests/watchdog-test: Fix system accidentally reset after watchdog-test 2024-12-17 13:23:57 +01:00
wireguard Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
x86 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zram Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gen_kselftest_tar.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kselftest.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kselftest_deps.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kselftest_harness.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kselftest_install.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kselftest_module.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lib.mk Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
run_kselftest.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00