From nobody Thu Dec 18 05:08:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EA03C4167B for ; Wed, 6 Dec 2023 10:46:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377726AbjLFKq0 (ORCPT ); Wed, 6 Dec 2023 05:46:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377591AbjLFKqN (ORCPT ); Wed, 6 Dec 2023 05:46:13 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31A810E4 for ; Wed, 6 Dec 2023 02:46:13 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5A80C433C9; Wed, 6 Dec 2023 10:46:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701859573; bh=bOE6yEXLphMEqWjRTeCXJQbg+0EMud/88Rsqb9t5l5E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fKQwYsHHE13PYh9LBiopiY18h9aNZqyT/kp/CrUa5v+Yg44M7fkuLeo3fEwGJoWqb 3qhAFjiO5X6F0z5/bFYI6Gi273CBIF6sb1FLKHBzndMI/AIk/xKaEvUSQ9ige0E9S/ hvpRcpSW3LjTu1KIoJdLjZM/cbuQU7aOHgoQj1T6XBNvXQErG+STENx+maq7dUR7gS ntw+ctU8cUq6OkXOHuxjDnxpFiWr0y/Lmj6FStb/mVdjYCFok+4Qq824N0CjwXSUA3 /kGAhs+p6NtLnTF55JPDeYeRZYEOgU+TZfp+eYZsKaSp0y4YOtpguyJ4HrDMLoFnXI KD0nuupmsheYg== From: Benjamin Tissoires Date: Wed, 06 Dec 2023 11:45:54 +0100 Subject: [PATCH v2 03/15] selftests/hid: base: allow for multiple skip_if_uhdev MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231206-wip-selftests-v2-3-c0350c2f5986@kernel.org> References: <20231206-wip-selftests-v2-0-c0350c2f5986@kernel.org> In-Reply-To: <20231206-wip-selftests-v2-0-c0350c2f5986@kernel.org> To: Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Hutterer Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701859565; l=1292; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=bOE6yEXLphMEqWjRTeCXJQbg+0EMud/88Rsqb9t5l5E=; b=YmF07rZ0fvqbn4E0ltVG89A/3NDLNAd85T6nXnHOVec7pFT482QYSqybb0L/HL2Qv5oZ5gLYw ARMqfkEEmogCu9p8yytaX5ruU3tWIrUeBe/MhUw4ujTcZhvDrl9uF0R X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can actually have multiple occurences of `skip_if_uhdev` if we follow the information from the pytest doc[0]. This is not immediately used, but can be if we need multiple conditions on a given test. [0] https://docs.pytest.org/en/latest/historical-notes.html#update-marker-c= ode Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/tests/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/hid/tests/base.py b/tools/testing/self= tests/hid/tests/base.py index 1305cfc9646e..5d9c26dfc460 100644 --- a/tools/testing/selftests/hid/tests/base.py +++ b/tools/testing/selftests/hid/tests/base.py @@ -238,8 +238,7 @@ class BaseTestCase: try: with HIDTestUdevRule.instance(): with new_uhdev as self.uhdev: - skip_cond =3D request.node.get_closest_marker("ski= p_if_uhdev") - if skip_cond: + for skip_cond in request.node.iter_markers("skip_i= f_uhdev"): test, message, *rest =3D skip_cond.args =20 if test(self.uhdev): --=20 2.41.0