Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2143554rwl; Fri, 6 Jan 2023 02:28:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXvms9sGHa8EGx1fHcJtuYDCdkn9QShWsnUDAvWORRBInt6jqzHKiWdn0epoTMIAzT/L8TCc X-Received: by 2002:a05:6402:1486:b0:482:ab74:6432 with SMTP id e6-20020a056402148600b00482ab746432mr40385348edv.20.1673000882353; Fri, 06 Jan 2023 02:28:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673000882; cv=none; d=google.com; s=arc-20160816; b=aM/U1iQZY1uoCVR2jvNTF7/8Vhvsy/09WIy1zPQgFzPTQ5R1WqQPSQhMHfNdgK2pS1 f6MgMNhceS7SnvAYwXpvTyKz/h+l1O2aUTx8Y/9gityDPu5FSrp9ahtwSpBMJOMLmoRt 28rVbqG+htGq3Ls6HZyMqQWDcNH+dkLUgiVxqeo/j8C1C5mUR8gcIpehsWwW9Dk3LsO5 IWpUCSEYdQznAXOGAZNxb1F2MGtnAdA6oovS8bKVJqjvORNpXF39oHKOwFWSr2p8cgrO ow3Zxss4elY4IzrI+TyT0YOBSaDPX9OX11d/rhXEBNObRl12qqZkjlmEmGnkPu0QHEBo GB8A== 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 Return-Path: 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.27.49; Fri, 06 Jan 2023 02:28:02 -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 + 54 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 ); 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 ; 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 To: Greg KH , Jiri Kosina , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Dmitry Torokhov Cc: Tero Kristo , 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.38.1