Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4662177rdh; Wed, 29 Nov 2023 07:25:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeYHu1WVasv7WjczsxQyzss7Yzj6IyxVLMklGiZRm+dfVv9hfkskuNiot2nIkwcfvXAZ5A X-Received: by 2002:a05:6a20:5498:b0:18c:1d42:4e12 with SMTP id i24-20020a056a20549800b0018c1d424e12mr17367181pzk.18.1701271519734; Wed, 29 Nov 2023 07:25:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701271519; cv=none; d=google.com; s=arc-20160816; b=O9nKwUNEBeJguqp/JQ+GvGxcHAUIqaDNqorgjHBMHYzRdklIXGOzuGqO9gU8evSzU9 TJNk3pww4KFqmSNARHvV00N27GKmtvK7QT798EUQd3i1Pw9JI0GbdnAyUWGLxD6AvL+A 3Ur6kMtumXvIv3/PNAwso/1jzDWrK/a5IP39SPj74aGqpuhEuqbIHky5p+zNOLTyzJ4h ceoNsSVvd+W4TdqKEF5H7O6+c0O2xoYGfaEzwL861/FID1XBNI7n5BAOeBYMsPYL9R10 Kft+KIzENTvjI6dhvCS0o3sIGwLE5EKEHw8PF5tCsJfRskwFz2dRkNlbBS7OsjAEWQqk Ufwg== 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=o9FCpfvF6aS30/PHjAOqH+fLs3CX31/kqMYtx9WJceY=; fh=M/4CRKlsQR53kOvbvsHfGDOrpcvBUt/h3Rh4tB3zkdA=; b=Xbq8/p3Uuf6wMaUFvQrWuNsfHkAhnq69Yx/fkNNVPkcDQAkC3jCD0RX7X92Nr20ocS AbCgparrcRoXz+jtAuj/cJUpZxZagqzGnWnDSJ/umbR7LNXWExBgAul7oRv5oLPFGcOQ P/ypyf2bIoMg52A1eTpejbKV9H8893DOPS13o+MaZqVvWwQ49UDVfloEoFOEeAJ4q/Wx 7NHhAyRnVsIwMLNnnozrP6qsC8IYaX6Gd5KtzfUSlhI7Gt48oGTorp7rsbIaqQxI2RvL S7IXVNiCyXBNl0gQxuM6aZBjTVWMnLGnM3iGeEZT0ABRRN6hqCPqo/KQCkzZJzNeSliX AZCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dGCduNII; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p12-20020a63f44c000000b005b928c7b284si14342959pgk.587.2023.11.29.07.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 07:25:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dGCduNII; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 39C3D802FD3B; Wed, 29 Nov 2023 07:25:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234888AbjK2PZE (ORCPT + 99 others); Wed, 29 Nov 2023 10:25:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234901AbjK2PZB (ORCPT ); Wed, 29 Nov 2023 10:25:01 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7306BE for ; Wed, 29 Nov 2023 07:25:07 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E34D4C433CB; Wed, 29 Nov 2023 15:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701271507; bh=kG2+ej6cJ+ghQo+0P11j+c5Gws+B/g/6ONT5dR7kBSg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dGCduNIIvZgqq/TxuYMezF3tHg4UfzJwkO+QFU+etNx5EnXi07/Dq/aHCLz5bQzqu gK9S/QFt7JL+C3Pw8OcXQ87oMJ47zQu7+pjtlmEvITlVIbzQm2JrmWf6/+nmUkP3ei 48NIvmprJGh8PHWIGPSIkreSxwNU6dSty+MOxBErDg7y53pMTifxQPTeCRBnV8HQoY lrEs1zX8tXjYCh8sdzhrL3rczWjkrjGNKX+62qTgcpCcT6+MDHCbOBfPWbB0JeCdxE q+4/+TJh42PO2n+dmLa7RUMdn56EBVFUDhr8aQB/dwvilxA+g/qkGw0nttTgwOtdne nzqoAeVbNJyLg== From: Benjamin Tissoires Date: Wed, 29 Nov 2023 16:24:28 +0100 Subject: [PATCH 03/12] 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: <20231129-wip-selftests-v1-3-ba15a1fe1b0d@kernel.org> References: <20231129-wip-selftests-v1-0-ba15a1fe1b0d@kernel.org> In-Reply-To: <20231129-wip-selftests-v1-0-ba15a1fe1b0d@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=1701271499; l=1211; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=kG2+ej6cJ+ghQo+0P11j+c5Gws+B/g/6ONT5dR7kBSg=; b=cRFybPnwZ68SH5mCbsRVxDJcFgImN6Y5PIICvbba808TbqdFz1Ch3p8CQc+UIyA6tVhJaY+bY zLd5oD03G7bD+zF5g/bCAs6eMhzDrtSDwOw2wyqAvs2ZkwA226KbLuS X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= 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_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 07:25:17 -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 Signed-off-by: Benjamin Tissoires --- 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