]> Git Repo - linux.git/commitdiff
Merge tag 'linux_kselftest-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kerne...
authorLinus Torvalds <[email protected]>
Tue, 17 Sep 2024 14:49:56 +0000 (16:49 +0200)
committerLinus Torvalds <[email protected]>
Tue, 17 Sep 2024 14:49:56 +0000 (16:49 +0200)
Pull kselftest update from Shuah Khan:

 - test coverage for dup_fd() failure handling in unshare_fd()

 - new selftest for the acct() syscall

 - basic uprobe testcase

 - several small fixes and cleanups to existing tests

 - user and strscpy removal as they became kunit tests

 - fixes to build failures and warnings

* tag 'linux_kselftest-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
  selftests: kselftest: Use strerror() on nolibc
  selftests/timers: Remove unused NSEC_PER_SEC macro
  selftests:resctrl: Fix build failure on archs without __cpuid_count()
  selftests/ftrace: Fix eventfs ownership testcase to find mount point
  selftests: filesystems: fix warn_unused_result build warnings
  selftests:core: test coverage for dup_fd() failure handling in unshare_fd()
  selftests/ftrace: Fix test to handle both old and new kernels
  kselftest: timers: Fix const correctness
  selftests/ftrace: Add required dependency for kprobe tests
  selftests: rust: config: disable GCC_PLUGINS
  selftests: rust: config: add trailing newline
  tracing/selftests: Run the ownership test twice
  selftests/uprobes: Add a basic uprobe testcase
  selftests: harness: rename __constructor_order for clarification
  selftests: harness: remove unneeded __constructor_order_last()
  selftest: acct: Add selftest for the acct() syscall
  selftests: lib: remove strscpy test
  selftests: user: remove user suite
  kselftest: cpufreq: Add RTC wakeup alarm
  selftests/exec: Fix grammar in an error message.
  ...

1  2 
tools/testing/selftests/Makefile
tools/testing/selftests/hid/hid_bpf.c

index 3b7df547731709b754f5c28db4ae4786e897750c,f51fcceb45fd6b3d56022613bc3cf4a3c5227643..b38199965f99014f3e2636fe8d705972f2c0d148
@@@ -1,4 -1,5 +1,5 @@@
  # SPDX-License-Identifier: GPL-2.0
+ TARGETS += acct
  TARGETS += alsa
  TARGETS += amd-pstate
  TARGETS += arm64
@@@ -65,11 -66,9 +66,11 @@@ TARGETS += net/af_uni
  TARGETS += net/forwarding
  TARGETS += net/hsr
  TARGETS += net/mptcp
 +TARGETS += net/netfilter
  TARGETS += net/openvswitch
 +TARGETS += net/packetdrill
 +TARGETS += net/rds
  TARGETS += net/tcp_ao
 -TARGETS += net/netfilter
  TARGETS += nsfs
  TARGETS += perf_events
  TARGETS += pidfd
@@@ -109,7 -108,6 +110,6 @@@ TARGETS += tmpf
  TARGETS += tpm2
  TARGETS += tty
  TARGETS += uevent
- TARGETS += user
  TARGETS += user_events
  TARGETS += vDSO
  TARGETS += mm
index 75b7b4ef6cfaa7e324a043fb97f7a720804aff55,f2bd20ca88bb7b9a3442ae3cdc053bc26534820c..c4bc2aa508c324b1da16028a23850e969f0e518b
@@@ -532,7 -532,6 +532,7 @@@ static void load_programs(const struct 
                          FIXTURE_DATA(hid_bpf) * self,
                          const FIXTURE_VARIANT(hid_bpf) * variant)
  {
 +      struct bpf_map *iter_map;
        int err = -EINVAL;
  
        ASSERT_LE(progs_count, ARRAY_SIZE(self->hid_links))
                *ops_hid_id = self->hid_id;
        }
  
 +      /* we disable the auto-attach feature of all maps because we
 +       * only want the tested one to be manually attached in the next
 +       * call to bpf_map__attach_struct_ops()
 +       */
 +      bpf_object__for_each_map(iter_map, *self->skel->skeleton->obj)
 +              bpf_map__set_autoattach(iter_map, false);
 +
        err = hid__load(self->skel);
        ASSERT_OK(err) TH_LOG("hid_skel_load failed: %d", err);
  
@@@ -694,24 -686,6 +694,24 @@@ TEST_F(hid_bpf, subprog_raw_event
        ASSERT_EQ(buf[2], 52);
  }
  
 +/*
 + * Attach hid_first_event to the given uhid device,
 + * attempt at re-attaching it, we should not lock and
 + * return an invalid struct bpf_link
 + */
 +TEST_F(hid_bpf, multiple_attach)
 +{
 +      const struct test_program progs[] = {
 +              { .name = "hid_first_event" },
 +      };
 +      struct bpf_link *link;
 +
 +      LOAD_PROGRAMS(progs);
 +
 +      link = bpf_map__attach_struct_ops(self->skel->maps.first_event);
 +      ASSERT_NULL(link) TH_LOG("unexpected return value when re-attaching the struct_ops");
 +}
 +
  /*
   * Ensures that we can attach/detach programs
   */
@@@ -1357,12 -1331,6 +1357,6 @@@ static int libbpf_print_fn(enum libbpf_
        return 0;
  }
  
- static void __attribute__((constructor)) __constructor_order_last(void)
- {
-       if (!__constructor_order)
-               __constructor_order = _CONSTRUCTOR_ORDER_BACKWARD;
- }
  int main(int argc, char **argv)
  {
        /* Use libbpf 1.0 API mode */
This page took 0.070755 seconds and 4 git commands to generate.