Message ID | 20230113090935.1763477-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 p1csp166714wrt; Fri, 13 Jan 2023 01:15:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXvFqh24Wnby+1IT44ad9XLKX/vz9scSFiNyTj0tIBo7kR6dyEZSF4FRcgpCUNBpTcJ3bT6J X-Received: by 2002:a17:907:73c1:b0:7e8:cf25:4b9c with SMTP id es1-20020a17090773c100b007e8cf254b9cmr62847192ejc.59.1673601311220; 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=y7yXbpwTfPJlnoEDHjkNquZaRBfkYrHmFd/X+0gjFKZ38Hm4pZd3XNHa2Weg/0BSFf 2+tt+CbZWLHOMnANKqkbdHFS2PekHAyo8LP6/dDRTeK3E5SXPaljrRiQpsV0JxQdYlox VDkWdf4YYrmlja+51eRO9IHGp/2JKRj+nOPYkvEqMZvgnz0kq3Ljx0G6aO/fAHSpUX/h fmIL/6/5WjV/YGUkfWA5UJnsNiVvkfyPf61CEksZTMyQUYSfgSBa5eNMWlR0tt2zWX1h yamKF3FHuXtPlY3PdUbwZmqN+OdPZIhv3Cs/DH0HvTSMa0kqJ2GyfF+hQrGbXJllSrRP QLPg== 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=vxQrOpngc5m5sJ3ndl/6WbG/qisMRAH+hUsUrxa1xvM=; b=PmePFY63ej3amUHdwhExUUCEn4t2mSZR2gC52QW7gaGdjr4y/coxPJRi56BKb01ubJ CAoLgkAwHTXCbeGzhcg0ZoZsUuhhdqgy/TAceKRkM7SkVGE2/8WOz6zfQHIDUbiPw7wf XKLby1D0Mpgu6RWFs3plpR35rWHMFk1575W204GeKh8VUNYXqokS2NDEcNpZh2YD/+/t D8+r55/24y2AgDQs+gTxZvI26TF9KvwOk8a4z1o71krnDGH1LVakkkgd/ZmYSl9od1wO X7VosajAVMKoaTStcB/yq62oBl3HV+Nyvr2ogPWOIG8RygQqddbkCyfg9A19JA71uNEc Ijkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PLJecUx0; 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 hr27-20020a1709073f9b00b0078dcd448f97si22768548ejc.801.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=PLJecUx0; 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 S241266AbjAMJNV (ORCPT <rfc822;callmefire3@gmail.com> + 99 others); Fri, 13 Jan 2023 04:13:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241128AbjAMJMP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Jan 2023 04:12:15 -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 31AD6A478 for <linux-kernel@vger.kernel.org>; Fri, 13 Jan 2023 01:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673600993; 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=vxQrOpngc5m5sJ3ndl/6WbG/qisMRAH+hUsUrxa1xvM=; b=PLJecUx0e284E3MWLfVn4iI4ZbSLFZWq8wRVk6fUj9KDr51nn8tREKmRulCrMqLD67dxE4 DaR6T6hVRLZLGLzpde6557FPae2J9ojKoppp9MJJtr/cSmqwYGWp6WdJjFKyKdYj1gtnpG 9tens7riA0ze3gPbDahRhN244emHHrc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-669-JHAzXNGBM9es748yubQ6Qw-1; Fri, 13 Jan 2023 04:09:50 -0500 X-MC-Unique: JHAzXNGBM9es748yubQ6Qw-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 A6BB43C16E9C; Fri, 13 Jan 2023 09:09:49 +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 778171121314; Fri, 13 Jan 2023 09:09:47 +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 4/9] selftests: hid: ensure the program is correctly pinned Date: Fri, 13 Jan 2023 10:09:30 +0100 Message-Id: <20230113090935.1763477-5-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?1754898168452356133?= X-GMAIL-MSGID: =?utf-8?q?1754898168452356133?= |
Series |
HID-BPF LLVM fixes, no more hacks
|
|
Commit Message
Benjamin Tissoires
Jan. 13, 2023, 9:09 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>
---
no changes in v2
---
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);