Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1448675lqh; Mon, 6 May 2024 08:04:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLG9zuu+frv4YCJ/KJvHGXoXyoD9sbMAbUGOo3k5hxGxSW/SvmfLDeqFVOsl2opmhVnhtCVntma3FOZ87vxevpUeIqyX1zAsk1iTmYvg== X-Google-Smtp-Source: AGHT+IEKLVoUDV4K6lNdbD5AgS2j0WC4oiwItoGFqVyQh4HvDSkW/5n+yt4lBgmo5PNuBaR78ZDh X-Received: by 2002:a17:903:22ce:b0:1e1:6850:f823 with SMTP id y14-20020a17090322ce00b001e16850f823mr12296353plg.13.1715007844257; Mon, 06 May 2024 08:04:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715007844; cv=pass; d=google.com; s=arc-20160816; b=yqELltRrl8nOFS+lLYxwoHd1SoDrvGOyL/5EF8U9myoLElX/LCEu6mqTXmoB3Qrjfd gFLBaUp+sELmaEozq4PiCd2gU1jhJ5oU29wH3JT/ky3Dp1yJ09cDMUjDup2ymRBRXMGZ 4Lqkzo9JxddQ6N3YYeiqGcBKR2DFgjyeLjPfoMXCYFDoMApirr55GzetYJ3zQzuJPeZD zGFC+Sff1Smt2fHxJGOPmOFyL9FwHhAqST5hK/vg/7El+rmMCCpCHX1Wjh0ov2aJtRjl WT6jpLPLH9O7TrsLUdQnM+NnprMC6QxX/tqvPjP0k4jKV3EJfCTMg/UojDhCMCIdvbCK VYkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=uE0kUpcUyVfe14I80qk3Hfrjc9cRcqsBJqstTdj7Yvw=; fh=BtMyikvQ+4F7du21Hdq5jlP/mTiKJny9JIk2/ldAEE0=; b=E7m0v/nCKzzCdzx1vbnOIBaG4apAE6ci69CFoXA5NRZ6viYXDIkytutO1utp+mYeTA h/Kw482nd4DzfF/s8x/mvJJp0RT3PsWyWK0l1V3cbTwrDPcCZKaTS9XNlvRkKL/pTi7q zDm65VRVHAPLHrg6RCQWGNrcBjv6ErhEPwSrsIL+cBl5173I6hJVCInlSAa3HrFmHBTR VyTkX/O9z9SW5WsY4qc8n87B/5kiet6Lvvr7vwtVTTIch50FPIi2RFtjMeKpYnQiF27U smxK4lS/8bnmXF2gd42hESGkL3efOdpgM18ZJ47/UWthONTdbpcinrAU5SoVjLzjE/tM wdGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=COVf006+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m1-20020a170902db0100b001ea594ae4d0si8583760plx.222.2024.05.06.08.04.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 08:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=COVf006+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6365EB21AD0 for ; Mon, 6 May 2024 14:36:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5DA5152526; Mon, 6 May 2024 14:36:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="COVf006+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3B6C393; Mon, 6 May 2024 14:36:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715006190; cv=none; b=N453hYpxke5bPIzRo/KaqkLDGohZWIFBLSeCLbc4I7kn25xfh+uO7gvBd1M8y1HmjV7CrDvP6ewHj/dOvU11td6UDMNcdujaxlAScI2N911syqSlPtlWiWAbmsIoYa2PIfosYsvGp33YzBR27K0N1qEboyN2QxUHsaWtZe9y3HQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715006190; c=relaxed/simple; bh=epnKmSLmSfc49HA+0nn+hCuYqMrBtCrmccfzKmBeUjc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B4ZdmzhLOhr1aylN5LCnMxktY8J3W1aw1RUftgT9aNhkK44fow9wOj9mCl3+zLQnICOcuFRadUUq6eGkyfylbuduWj/9x/Y40NdsN58jNEQT7ZeOO9ym2uWuI70aIzpkgBgimOT75jWhR7O6fZoa4ZTlRGjk2ezPYhEQX7tKaQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=COVf006+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 068BFC116B1; Mon, 6 May 2024 14:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715006190; bh=epnKmSLmSfc49HA+0nn+hCuYqMrBtCrmccfzKmBeUjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=COVf006+4LUh9tpH9/x1fyFrKQB4M58metJs3z4CDtyVj9gd0FPOtjLgwP8q2u0PP MvAkeQr835kn7NUTaQ6NGCLDMmTino4vsX1SfOnLwgfZ09eOSEknM12iUdoF89fovm l8LRQ4eFv2UxvMJX31UVlYfqxzYQEszz54qmTzK86eOLQbauHEGQvqGKaVFZm5D0rp n3xFRaxUQUa/9G66kN1tWJ2N269uSbergwrOR/fuB4q5k+dT0DfX8ThhiIjgoS2Hkv Cg2eXaI25JVkcogM2HeYuNhfaXOLDB/ggM/2GruBHJqDlfE9sUT06x7avGJFNTgOsL VXGub0uvz6uRQ== From: bentiss@kernel.org To: Jiri Kosina , Peter Hutterer , Shuah Khan Cc: Benjamin Tissoires , linux-input@vger.kernel.org, Martin Sivak , Ping Cheng , Jason Gerecke , Aaron Armstrong Skomra , Joshua Dickens , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 19/18] selftests/hid: skip tests with HID-BPF if udev-hid-bpf is not installed Date: Mon, 6 May 2024 16:36:12 +0200 Message-ID: <20240506143612.148031-1-bentiss@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240410-bpf_sources-v1-0-a8bf16033ef8@kernel.org> References: <20240410-bpf_sources-v1-0-a8bf16033ef8@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Benjamin Tissoires udev-hid-bpf is still not installed everywhere, and we should probably not assume it is installed automatically. Signed-off-by: Benjamin Tissoires --- I wanted to apply this series given that it wasn't reviewed in a month, but I thought that maybe I should not enforce ude-hid-bpf to be installed everywhere. I'll probably push this series tomorrow so it makes the 6.10 cut. Cheers, Benjamin tools/testing/selftests/hid/tests/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/hid/tests/base.py b/tools/testing/selftests/hid/tests/base.py index 2d006c0f5fcd..3a465768e507 100644 --- a/tools/testing/selftests/hid/tests/base.py +++ b/tools/testing/selftests/hid/tests/base.py @@ -8,6 +8,7 @@ import libevdev import os import pytest +import shutil import subprocess import time @@ -240,6 +241,10 @@ class BaseTestCase: root_dir = (script_dir / "../../../../..").resolve() bpf_dir = root_dir / "drivers/hid/bpf/progs" + udev_hid_bpf = shutil.which("udev-hid-bpf") + if not udev_hid_bpf: + pytest.skip("udev-hid-bpf not found in $PATH, skipping") + wait = False for _, rdesc_fixup in self.hid_bpfs: if rdesc_fixup: -- 2.44.0