Message ID | 20230106102332.1019632-5-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 p1csp749156wrt; Fri, 6 Jan 2023 02:27:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXt7IoM5NQScn+hKorTjtmekst161radcpKET0q5Q5O4NQqjZTkauxc0fU26c8hZqj4aWTWT X-Received: by 2002:aa7:c418:0:b0:492:609a:f148 with SMTP id j24-20020aa7c418000000b00492609af148mr4281289edq.3.1673000820024; Fri, 06 Jan 2023 02:27:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673000820; cv=none; d=google.com; s=arc-20160816; b=kHvdv/jJlGdFjZM+9F2pcTaDBEn9aW8NFRKdy59g+k6KJFiTO39uZuCVabzx8//yP3 +p/EdTc2x9S2Ckg2P3Ta4+Ga6xxwQ0pWKp4lBIO8vrZalEuJRRJJohu12NcV5U0kEjeF fSPI8mxS1Qig/8D9VTiHXxJTMf6xkzL+5c9prwrjMhIjrwOf98GuxVWQG1JAuD5dkwcr m750pj+rSz/pmLhwpSILMr2ZhezuR8KIAZY54yCd+m8N469mtJPPervKgTS4mHNeEq2c TGdNWQ52wwWqU4yLDeSxPwYxpo7FhPatIfWMZTE72E8ZZZc1WQcGNnbt5ivZu5ELZVxa s4uA== 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=ztyIBIxcHYqumQP7zYVgFBLV7rCWswuTV76ikP7BGbs=; b=LqCGQhtxuXaU+8ZEDViJo0mfpTnk/Kbtjiw2t0yMQT5KPGX6XptyBgY6Z8ZXX32+xX nDjDi73Rbp+kOqm0Xav8zZQDgahtn1XAHiaD49ul9Pi6Yrf8OSq2D/TbSykIvibpEMhB xR1cXrTOszKQ81hxhcfyQAU0E8MW2Oied9arYFngXHQyLrl391XZj5irdEChB6QxT4QP pgKWD5FZbppYHI5Fq5psce1m8bdoWVCfy3yPFeA7odEFjFPVoKq+we91m/iabrKG7iEA vPOI/om5u2cjJyznTUFoOqqqYLuWEBwyF6dPcoBI+RgBfWMtFAuJktfa8rQY5tTCfqcS J/Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e5UPN1Xz; 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 ef4-20020a05640228c400b00461bde34a12si1093090edb.627.2023.01.06.02.26.35; Fri, 06 Jan 2023 02:26:59 -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=e5UPN1Xz; 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 S233747AbjAFKZX (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Fri, 6 Jan 2023 05:25:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233800AbjAFKYj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Jan 2023 05:24:39 -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 D6EC06ADB1 for <linux-kernel@vger.kernel.org>; Fri, 6 Jan 2023 02:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673000630; 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=ztyIBIxcHYqumQP7zYVgFBLV7rCWswuTV76ikP7BGbs=; b=e5UPN1XzHOgKQ/yVXEDULC+/4AUlBUCKLKoyu1IqCIxw1P80xR/2FnJvd2Gp8AUNt4BO1V n/OcvOSUUq4LhcJlsRVn/K/9CXUAtNEtXITRjOoJnsFTpmFIiGVvw5KWaZ/pNgkXpR9Dto 3uKezOygkUbFjWnPD21AKILvPrPTe64= 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-231--5QtOql2NIGxdsUPGnnDIQ-1; Fri, 06 Jan 2023 05:23:49 -0500 X-MC-Unique: -5QtOql2NIGxdsUPGnnDIQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A246A802C1C; Fri, 6 Jan 2023 10:23:48 +0000 (UTC) Received: from plouf.redhat.com (unknown [10.39.192.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0731C15BAD; Fri, 6 Jan 2023 10:23:46 +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 v1 4/9] selftests: hid: ensure the program is correctly pinned Date: Fri, 6 Jan 2023 11:23:27 +0100 Message-Id: <20230106102332.1019632-5-benjamin.tissoires@redhat.com> In-Reply-To: <20230106102332.1019632-1-benjamin.tissoires@redhat.com> References: <20230106102332.1019632-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=ham 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?1754268507781137452?= X-GMAIL-MSGID: =?utf-8?q?1754268507781137452?= |
Series |
HID-BPF LLVM fixes, no more hacks
|
|
Commit Message
Benjamin Tissoires
Jan. 6, 2023, 10:23 a.m. UTC
Turns out that if bpffs was not mounted, the test was silently passing.
So ensure it passes by checking the mount command result.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
tools/testing/selftests/hid/hid_bpf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/hid/hid_bpf.c b/tools/testing/selftests/hid/hid_bpf.c index d215bb492eb4..3b204a15e44b 100644 --- a/tools/testing/selftests/hid/hid_bpf.c +++ b/tools/testing/selftests/hid/hid_bpf.c @@ -640,7 +640,8 @@ TEST_F(hid_bpf, test_attach_detach) /* pin the first program and immediately unpin it */ #define PIN_PATH "/sys/fs/bpf/hid_first_event" - bpf_program__pin(self->skel->progs.hid_first_event, PIN_PATH); + err = bpf_program__pin(self->skel->progs.hid_first_event, PIN_PATH); + ASSERT_OK(err) TH_LOG("error while calling bpf_program__pin"); remove(PIN_PATH); #undef PIN_PATH usleep(100000);