Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp884722rdb; Wed, 6 Dec 2023 02:47:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXpbV8GkxddkoxSo+8xuGZWzBGCovlTPMkil7kTBa1gT8lWXDe+fRNrelQubSWEMotUKDW X-Received: by 2002:a05:6870:f14e:b0:1fa:1d84:e330 with SMTP id l14-20020a056870f14e00b001fa1d84e330mr535077oac.39.1701859627350; Wed, 06 Dec 2023 02:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701859627; cv=none; d=google.com; s=arc-20160816; b=egDQmDk9UCu5hlk37BNQXJShxxQXo1uV3im/ji3fZA2AgPL5DHKmqlqhDs9hinmNP+ GfVigW+JpLw/RRZ3pTkA8mDpqafgKknb/apn4T6zwnq+FnH/XeGRXb1OFxzuoLzHVpkH soQjecXG338dN6rtFOJoomqnfGPnD68G99RuMtVWv3Jkz6OzP4F286HIgCNluH4Ud0Jt R00VKVuyympJAnItv0KAkhyW253Rg6dtjv+N5cJmbNi7wQsSZE7mcFf0G2DRcy2kXt/7 cGjV5M72oEsvq2niTtU+sQy4ELbqwyxO21NYG6zT7VQlgRuvWv4z7TqY3SHLCo4aDqbI sq6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=gCCRr4cJs3H7PAJIFHfbgN3A2GRoUylQVyTf/03y3M0=; fh=M/4CRKlsQR53kOvbvsHfGDOrpcvBUt/h3Rh4tB3zkdA=; b=ZeEOzrc3W+GVeyYCNsqB7pCqIMItmsNVqzYT/3dzJog8YvAtWE//8EKul6mPLwGrtz YrDdt3qguysJ3XChxdBC7Cs5rwc6iuZip+Pds4sqDx2lILdVRPUMLUxR9rvp0/CNzOPo oMUuMcFnLYpV9TPaMvw4xd1Hz2tk3uV7zr2eXaq66kUOy3gPfyyuAV+7pr8JoHhhF2Io jNCbiyYs583dzBaYlhfKTLlu4y+uSg8qFirnWwumQnIgk0SxOyGbRNpKD5iO8BkWFyXX m9RHl6v2hUeavxl3vN2nY/1BfCHZq+aa4gzphdcLsOLF73Q/oKyT0TQ5HvX6ifD06otS 6CIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fKQwYsHH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id be7-20020a656e47000000b005bdf5961826si11791734pgb.136.2023.12.06.02.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 02:47:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fKQwYsHH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 43CA880204B8; Wed, 6 Dec 2023 02:47:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377721AbjLFKqZ (ORCPT + 99 others); Wed, 6 Dec 2023 05:46:25 -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: 7bit 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= X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 02:47:04 -0800 (PST) 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-code 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/selftests/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 = request.node.get_closest_marker("skip_if_uhdev") - if skip_cond: + for skip_cond in request.node.iter_markers("skip_if_uhdev"): test, message, *rest = skip_cond.args if test(self.uhdev): -- 2.41.0