aboutsummaryrefslogtreecommitdiff
path: root/tools/testing
AgeCommit message (Collapse)AuthorFilesLines
2023-03-28selftests/bpf: Remove verifier/xdp_direct_packet_access.c, converted to ↵Eduard Zingerman1-1468/+0
progs/verifier_xdp_direct_packet_access.c Removing verifier/xdp_direct_packet_access.c.c as it was automatically converted to use inline assembly in the previous commit. It is available in progs/verifier_xdp_direct_packet_access.c.c. Signed-off-by: Eduard Zingerman <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
2023-03-28selftests/bpf: Verifier/xdp_direct_packet_access.c converted to inline assemblyEduard Zingerman2-0/+1724
Test verifier/xdp_direct_packet_access.c automatically converted to use inline assembly. Original test would be removed in the next patch. Signed-off-by: Eduard Zingerman <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
2023-03-28Merge tag 'linux-kselftest-fixes-6.3-rc5' of ↵Linus Torvalds2-6/+24
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "One single fix for sigaltstack test -Wuninitialized warning found when building with clang" * tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: sigaltstack: fix -Wuninitialized
2023-03-28selftests: prctl: Add new prctl test for PR_SET_VMA actionIvan Orlov5-1/+108
This patch will add the new test, which covers the prctl call with PR_SET_VMA command. The test tries to give a name to the anonymous VMA within the process memory map, and then checks the result of the operation by parsing 'maps' virtual file. Additionally, the test tries to call the prctl PR_SET_VMA command with invalid arguments, and checks the error codes for correctness. At the moment anonymous VMA naming through prctl call functionality is not covered with any tests, so I think implementing it makes sense. In version 2 of this patch I consider the selftest Makefile rule about TARGETS entries order - I moved the 'prctl' entry in the Makefile to follow the lexicographic order. In version 1 it was placed at the end of the list. Signed-off-by: Ivan Orlov <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2023-03-28selftests: sched: Add more core schedule prctl callsIvan Orlov1-0/+6
The core sched kselftest makes prctl calls only with correct parameters. This patch will extend this test with more core schedule prctl calls with wrong parameters to increase code coverage. Signed-off-by: Ivan Orlov <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2023-03-28selftests: cgroup: Add 'malloc' failures checks in test_memcontrolIvan Orlov1-0/+15
There are several 'malloc' calls in test_memcontrol, which can be unsuccessful. This patch will add 'malloc' failures checking to give more details about test's fail reasons and avoid possible undefined behavior during the future null dereference (like the one in alloc_anon_50M_check_swap function). Signed-off-by: Ivan Orlov <[email protected]> Reviewed-by: Muchun Song <[email protected]> Acked-by: Shakeel Butt <[email protected]> Acked-by: Roman Gushchin <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2023-03-28selftests: Refactor 'peeksiginfo' ptrace test partIvan Orlov1-7/+7
peeksiginfo creates an array of 10 instances of 'siginfo_t', but actually uses only one. This patch will reduce amount of memory on the stack used by the peeksiginfo test. Signed-off-by: Ivan Orlov <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2023-03-27tools/nolibc: x86_64: add stackprotector supportThomas Weißschuh1-0/+2
Enable the new stackprotector support for x86_64. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2023-03-27tools/nolibc: i386: add stackprotector supportThomas Weißschuh1-0/+1
Enable the new stackprotector support for i386. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2023-03-27tools/nolibc: tests: add test for -fstack-protectorThomas Weißschuh2-2/+63
Test the previously introduce stack protector functionality in nolibc. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2023-03-27tools/nolibc: tests: fold in no-stack-protector cflagsThomas Weißschuh1-2/+3
For the cflags to enable stack protectors to work properly they need to be specified after -fno-stack-protector. To do this fold all cflags into a single variable and move -fno-stack-protector before the arch-specific cflags and another one specific to stack protectors since we don't want to enable them on all archs. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2023-03-27tools/nolibc: tests: constify test_namesThomas Weißschuh1-1/+1
Nothing ever modifies this structure. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2023-03-27selftests/bpf: Don't assume page size is 4096Hengqi Chen1-1/+1
The verifier test creates BPF ringbuf maps using hard-coded 4096 as max_entries. Some tests will fail if the page size of the running kernel is not 4096. Use getpagesize() instead. Signed-off-by: Hengqi Chen <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
2023-03-27rcutorture: Add srcu_lockdep.shPaul E. McKenney1-0/+78
This commit adds an srcu_lockdep.sh script that checks whether lockdep correctly classifies SRCU-based, SRCU/mutex-based, and SRCU/rwsem-based deadlocks. Signed-off-by: Paul E. McKenney <[email protected]> [ boqun: Fix "RCUTORTURE" with "$RCUTORTURE" ] Acked-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Boqun Feng <[email protected]>
2023-03-27selftests: tls: add a test for queuing data before setting the ULPJakub Kicinski1-0/+45
Other tests set up the connection fully on both ends before communicating any data. Add a test which will queue up TLS records to TCP before the TLS ULP is installed. Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2023-03-26Merge tag 'x86_urgent_for_v6.3_rc4' of ↵Linus Torvalds1-3/+105
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Add a AMX ptrace self test - Prevent a false-positive warning when retrieving the (invalid) address of dynamic FPU features in their init state which are not saved in init_fpstate at all - Randomize per-CPU entry areas only when KASLR is enabled * tag 'x86_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/x86/amx: Add a ptrace test x86/fpu/xstate: Prevent false-positive warning in __copy_xstate_uabi_buf() x86/mm: Do not shuffle CPU entry areas without KASLR
2023-03-25selftests/bpf: Add bench for task storage creationMartin KaFai Lau3-14/+164
This patch adds a task storage benchmark to the existing local-storage-create benchmark. For task storage, ./bench --storage-type task --batch-size 32: bpf_ma: Summary: creates 30.456 ± 0.507k/s ( 30.456k/prod), 6.08 kmallocs/create no bpf_ma: Summary: creates 31.962 ± 0.486k/s ( 31.962k/prod), 6.13 kmallocs/create ./bench --storage-type task --batch-size 64: bpf_ma: Summary: creates 30.197 ± 1.476k/s ( 30.197k/prod), 6.08 kmallocs/create no bpf_ma: Summary: creates 31.103 ± 0.297k/s ( 31.103k/prod), 6.13 kmallocs/create Signed-off-by: Martin KaFai Lau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: Test task storage when local_storage->smap is NULLMartin KaFai Lau2-17/+46
The current sk storage test ensures the memory free works when the local_storage->smap is NULL. This patch adds a task storage test to ensure the memory free code path works when local_storage->smap is NULL. Signed-off-by: Martin KaFai Lau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/xdp.c converted to inline assemblyEduard Zingerman3-14/+26
Test verifier/xdp.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/xadd.c converted to inline assemblyEduard Zingerman3-97/+126
Test verifier/xadd.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/var_off.c converted to inline assemblyEduard Zingerman3-291/+351
Test verifier/var_off.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/value_or_null.c converted to inline assemblyEduard Zingerman3-220/+290
Test verifier/value_or_null.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/value.c converted to inline assemblyEduard Zingerman3-104/+160
Test verifier/value.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/value_adj_spill.c converted to inline assemblyEduard Zingerman3-43/+80
Test verifier/value_adj_spill.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/uninit.c converted to inline assemblyEduard Zingerman3-39/+63
Test verifier/uninit.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/stack_ptr.c converted to inline assemblyEduard Zingerman3-359/+486
Test verifier/stack_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/spill_fill.c converted to inline assemblyEduard Zingerman3-345/+376
Test verifier/spill_fill.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/ringbuf.c converted to inline assemblyEduard Zingerman3-95/+133
Test verifier/ringbuf.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/raw_tp_writable.c converted to inline assemblyEduard Zingerman3-35/+52
Test verifier/raw_tp_writable.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/raw_stack.c converted to inline assemblyEduard Zingerman3-305/+373
Test verifier/raw_stack.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/meta_access.c converted to inline assemblyEduard Zingerman3-235/+286
Test verifier/meta_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/masking.c converted to inline assemblyEduard Zingerman3-322/+412
Test verifier/masking.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/map_ret_val.c converted to inline assemblyEduard Zingerman3-65/+112
Test verifier/map_ret_val.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/map_ptr.c converted to inline assemblyEduard Zingerman3-99/+161
Test verifier/map_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/leak_ptr.c converted to inline assemblyEduard Zingerman3-67/+94
Test verifier/leak_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/ld_ind.c converted to inline assemblyEduard Zingerman3-72/+112
Test verifier/ld_ind.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/int_ptr.c converted to inline assemblyEduard Zingerman3-161/+159
Test verifier/int_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/helper_value_access.c converted to inline assemblyEduard Zingerman3-953/+1247
Test verifier/helper_value_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/helper_restricted.c converted to inline assemblyEduard Zingerman3-196/+281
Test verifier/helper_restricted.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/helper_packet_access.c converted to inline assemblyEduard Zingerman3-460/+552
Test verifier/helper_packet_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/helper_access_var_len.c converted to inline assemblyEduard Zingerman3-650/+827
Test verifier/helper_access_var_len.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/div_overflow.c converted to inline assemblyEduard Zingerman3-110/+146
Test verifier/div_overflow.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/div0.c converted to inline assemblyEduard Zingerman3-184/+215
Test verifier/div0.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/direct_stack_access_wraparound.c converted to inline ↵Eduard Zingerman3-40/+58
assembly Test verifier/direct_stack_access_wraparound.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/ctx_sk_msg.c converted to inline assemblyEduard Zingerman3-181/+230
Test verifier/ctx_sk_msg.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/const_or.c converted to inline assemblyEduard Zingerman3-60/+84
Test verifier/const_or.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/cgroup_storage.c converted to inline assemblyEduard Zingerman3-220/+310
Test verifier/cgroup_storage.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/cgroup_skb.c converted to inline assemblyEduard Zingerman3-197/+229
Test verifier/cgroup_skb.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/cgroup_inv_retcode.c converted to inline assemblyEduard Zingerman3-72/+91
Test verifier/cgroup_inv_retcode.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
2023-03-25selftests/bpf: verifier/cfg.c converted to inline assemblyEduard Zingerman3-73/+102
Test verifier/cfg.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>