Message ID | 20230113090935.1763477-8-benjamin.tissoires@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp166716wrt; Fri, 13 Jan 2023 01:15:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXtin5jDCRez+uyNXIo/gHlCDGtufTlRf/vJGDkkjV8TfmQAFGnfHE38//vA//pn+BVKkR5G X-Received: by 2002:a17:906:7fc2:b0:838:9c66:cd2f with SMTP id r2-20020a1709067fc200b008389c66cd2fmr64739463ejs.74.1673601311492; Fri, 13 Jan 2023 01:15:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673601311; cv=none; d=google.com; s=arc-20160816; b=ZJTarJaHER8Tl7lQYn4OaHIPwZxtA6oTFZz71MxydHqPAtgegTTe1JvGBzRvTv2Qh0 xemKTj0aE2IQvbGAv2mHQGftAebauwrOg7Og+lgSNj1BBFD5w5BRVabfNhFD8tNPR1qX TJMRS9ELQaXlPwE+PnLMpYUCt271B5u9U7kASvhPuhF/da4wbvRZe1LEDUUsmu6pLXBI 9D4UXDMz2ZH8FX1WwjNStdniSAIGJM8RCy2zEmGMMieIDhvfzCZ1eYaB7g1MekjJIAZI Mc9xJDkIbetsPfZfabDof/QS/b3QtpFVtc0tnoj4KIMh8HCR31uf2YnLTem8FOPL0AWm yqTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zSBi9fEVjxMCBgiA3KVP8rZ11VOYsIr1qRPkJekyhzo=; b=xxkaorG6tkehiK0mM9ijZLvloiKawxgHgSlv/VDnWJjyVj43NFOCHPvspZ+MVYLPpx rtpSE4qt5v3VVmoUH2evj+XyFYc4P1CUWiNNsKNyoywK4mLbGeg/wLRki1rL+dsYJZBZ J6fCWWjrsbadNHq9e/juLJe0pm5TioeDeRSU+ULmZk4TZO1q1AzOM2OygI62raMPhJYI zNt/+bkCTqxDZb8RhQqwBPObGtTRNuhNQ/Z/wzcv+82QFBSdTwhRS4+WCYBuEWwJoNc4 3oD5dV4ErZllcI0UqrXri/jEp8eFS4lxQj2xRc/nz8ZiYtkVTX2ZAjv8QHGOJ0caEdqK OvRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KTHI36SQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds12-20020a170907724c00b007ea638b5670si19635983ejc.485.2023.01.13.01.14.47; Fri, 13 Jan 2023 01:15:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KTHI36SQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241295AbjAMJNe (ORCPT <rfc822;callmefire3@gmail.com> + 99 others); Fri, 13 Jan 2023 04:13:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241130AbjAMJMW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Jan 2023 04:12:22 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D304FF00E for <linux-kernel@vger.kernel.org>; Fri, 13 Jan 2023 01:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673601003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zSBi9fEVjxMCBgiA3KVP8rZ11VOYsIr1qRPkJekyhzo=; b=KTHI36SQNcuSlPKQrwiL3wLhjkKg6ACK316ByHRgScm89G3nDD+xXueofY59YGH62nmYKX ne7by3J29BkHhTM97iAWwSXmn6t2HZji2hUZSoW0z3v1d+105bsbB4sl/v3ZG2ytPEsWV1 KRm+bJvLfV4i8NpHBwFfVEPE+HjumgQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-357-sAL87FzoO2mhn9iSm-k3qw-1; Fri, 13 Jan 2023 04:09:57 -0500 X-MC-Unique: sAL87FzoO2mhn9iSm-k3qw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 24862858F09; Fri, 13 Jan 2023 09:09:57 +0000 (UTC) Received: from plouf.redhat.com (ovpn-193-50.brq.redhat.com [10.40.193.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id E530D1121314; Fri, 13 Jan 2023 09:09:54 +0000 (UTC) From: Benjamin Tissoires <benjamin.tissoires@redhat.com> To: Greg KH <gregkh@linuxfoundation.org>, Jiri Kosina <jikos@kernel.org>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Andrii Nakryiko <andrii@kernel.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Tero Kristo <tero.kristo@linux.intel.com>, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Benjamin Tissoires <benjamin.tissoires@redhat.com> Subject: [PATCH HID for-next v2 7/9] selftests: hid: enforce new attach API Date: Fri, 13 Jan 2023 10:09:33 +0100 Message-Id: <20230113090935.1763477-8-benjamin.tissoires@redhat.com> In-Reply-To: <20230113090935.1763477-1-benjamin.tissoires@redhat.com> References: <20230113090935.1763477-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754898168727586351?= X-GMAIL-MSGID: =?utf-8?q?1754898168727586351?= |
Series |
HID-BPF LLVM fixes, no more hacks
|
|
Commit Message
Benjamin Tissoires
Jan. 13, 2023, 9:09 a.m. UTC
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>
---
no changes in v2
---
tools/testing/selftests/hid/hid_bpf.c | 6 +-----
1 file changed, 1 insertion(+), 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;