diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2023-01-13 10:09:33 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-01-18 22:08:38 +0100 |
commit | 6e021d64e4897759e19ce431ee6a366338c00be8 (patch) | |
tree | e8766eacb5c99432fa6b2021bc2acac547a146ca /tools/testing/selftests/hid | |
parent | 4b9a3f49f02bf682eedfde23ef56a8df82c1e5d2 (diff) | |
download | linux-6e021d64e4897759e19ce431ee6a366338c00be8.tar.gz linux-6e021d64e4897759e19ce431ee6a366338c00be8.tar.bz2 linux-6e021d64e4897759e19ce431ee6a366338c00be8.zip |
selftests: hid: enforce new attach API
Now that the new API for hid_bpf_attach_prog() is in place, ensure we
get an fd when calling this function. And remove the fallback code.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools/testing/selftests/hid')
-rw-r--r-- | tools/testing/selftests/hid/hid_bpf.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/testing/selftests/hid/hid_bpf.c b/tools/testing/selftests/hid/hid_bpf.c index 9a262fe99b32..2cf96f818f25 100644 --- a/tools/testing/selftests/hid/hid_bpf.c +++ b/tools/testing/selftests/hid/hid_bpf.c @@ -638,11 +638,7 @@ TEST_F(hid_bpf, test_attach_detach) LOAD_PROGRAMS(progs); link = self->hid_links[0]; - /* we might not be using the new code path where hid_bpf_attach_prog() - * returns a link. - */ - if (!link) - link = bpf_program__fd(self->skel->progs.hid_first_event); + ASSERT_GT(link, 0) TH_LOG("HID-BPF link not created"); /* inject one event */ buf[0] = 1; |