Commit 6e021d64 authored by Benjamin Tissoires's avatar Benjamin Tissoires Committed by Jiri Kosina

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: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 4b9a3f49
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment