diff options
| author | Jakub Kicinski <[email protected]> | 2021-11-01 19:59:45 -0700 | 
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2021-11-01 19:59:46 -0700 | 
| commit | b7b98f868987cd3e86c9bd9a6db048614933d7a0 (patch) | |
| tree | 8651e9d44726348ea56692d988b26c273e129c7a /tools/testing/selftests/bpf/prog_tests/atomics.c | |
| parent | 52fa3ee0cce60a04739f4a5ca1c9d5c2a8ee1578 (diff) | |
| parent | 0b170456e0dda92b8925d40e217461fcc4e1efc9 (diff) | |
Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Alexei Starovoitov says:
====================
pull-request: bpf-next 2021-11-01
We've added 181 non-merge commits during the last 28 day(s) which contain
a total of 280 files changed, 11791 insertions(+), 5879 deletions(-).
The main changes are:
1) Fix bpf verifier propagation of 64-bit bounds, from Alexei.
2) Parallelize bpf test_progs, from Yucong and Andrii.
3) Deprecate various libbpf apis including af_xdp, from Andrii, Hengqi, Magnus.
4) Improve bpf selftests on s390, from Ilya.
5) bloomfilter bpf map type, from Joanne.
6) Big improvements to JIT tests especially on Mips, from Johan.
7) Support kernel module function calls from bpf, from Kumar.
8) Support typeless and weak ksym in light skeleton, from Kumar.
9) Disallow unprivileged bpf by default, from Pawan.
10) BTF_KIND_DECL_TAG support, from Yonghong.
11) Various bpftool cleanups, from Quentin.
* https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (181 commits)
  libbpf: Deprecate AF_XDP support
  kbuild: Unify options for BTF generation for vmlinux and modules
  selftests/bpf: Add a testcase for 64-bit bounds propagation issue.
  bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit.
  bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off.
  selftests/bpf: Fix also no-alu32 strobemeta selftest
  bpf: Add missing map_delete_elem method to bloom filter map
  selftests/bpf: Add bloom map success test for userspace calls
  bpf: Add alignment padding for "map_extra" + consolidate holes
  bpf: Bloom filter map naming fixups
  selftests/bpf: Add test cases for struct_ops prog
  bpf: Add dummy BPF STRUCT_OPS for test purpose
  bpf: Factor out helpers for ctx access checking
  bpf: Factor out a helper to prepare trampoline for struct_ops prog
  selftests, bpf: Fix broken riscv build
  riscv, libbpf: Add RISC-V (RV64) support to bpf_tracing.h
  tools, build: Add RISC-V to HOSTARCH parsing
  riscv, bpf: Increase the maximum number of iterations
  selftests, bpf: Add one test for sockmap with strparser
  selftests, bpf: Fix test_txmsg_ingress_parser error
  ...
====================
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/atomics.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/atomics.c | 35 | 
1 files changed, 18 insertions, 17 deletions
| diff --git a/tools/testing/selftests/bpf/prog_tests/atomics.c b/tools/testing/selftests/bpf/prog_tests/atomics.c index ba0e1efe5a45..0f9525293881 100644 --- a/tools/testing/selftests/bpf/prog_tests/atomics.c +++ b/tools/testing/selftests/bpf/prog_tests/atomics.c @@ -4,13 +4,13 @@  #include "atomics.lskel.h" -static void test_add(struct atomics *skel) +static void test_add(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__add__attach(skel); +	link_fd = atomics_lskel__add__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(add)"))  		return; @@ -36,13 +36,13 @@ cleanup:  	close(link_fd);  } -static void test_sub(struct atomics *skel) +static void test_sub(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__sub__attach(skel); +	link_fd = atomics_lskel__sub__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(sub)"))  		return; @@ -69,13 +69,13 @@ cleanup:  	close(link_fd);  } -static void test_and(struct atomics *skel) +static void test_and(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__and__attach(skel); +	link_fd = atomics_lskel__and__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(and)"))  		return; @@ -97,13 +97,13 @@ cleanup:  	close(link_fd);  } -static void test_or(struct atomics *skel) +static void test_or(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__or__attach(skel); +	link_fd = atomics_lskel__or__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(or)"))  		return; @@ -126,13 +126,13 @@ cleanup:  	close(link_fd);  } -static void test_xor(struct atomics *skel) +static void test_xor(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__xor__attach(skel); +	link_fd = atomics_lskel__xor__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(xor)"))  		return; @@ -154,13 +154,13 @@ cleanup:  	close(link_fd);  } -static void test_cmpxchg(struct atomics *skel) +static void test_cmpxchg(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__cmpxchg__attach(skel); +	link_fd = atomics_lskel__cmpxchg__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(cmpxchg)"))  		return; @@ -183,13 +183,13 @@ cleanup:  	close(link_fd);  } -static void test_xchg(struct atomics *skel) +static void test_xchg(struct atomics_lskel *skel)  {  	int err, prog_fd;  	__u32 duration = 0, retval;  	int link_fd; -	link_fd = atomics__xchg__attach(skel); +	link_fd = atomics_lskel__xchg__attach(skel);  	if (!ASSERT_GT(link_fd, 0, "attach(xchg)"))  		return; @@ -212,10 +212,10 @@ cleanup:  void test_atomics(void)  { -	struct atomics *skel; +	struct atomics_lskel *skel;  	__u32 duration = 0; -	skel = atomics__open_and_load(); +	skel = atomics_lskel__open_and_load();  	if (CHECK(!skel, "skel_load", "atomics skeleton failed\n"))  		return; @@ -225,6 +225,7 @@ void test_atomics(void)  		test__skip();  		goto cleanup;  	} +	skel->bss->pid = getpid();  	if (test__start_subtest("add"))  		test_add(skel); @@ -242,5 +243,5 @@ void test_atomics(void)  		test_xchg(skel);  cleanup: -	atomics__destroy(skel); +	atomics_lskel__destroy(skel);  } |