aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/hid
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2023-12-06 11:45:54 +0100
committerBenjamin Tissoires <bentiss@kernel.org>2023-12-07 09:52:03 +0100
commit110292a77f7c8d11eaa472e65f6a2084b25be2db (patch)
tree118e6010755eaab2597c252ddfdf29b11a53ad8b /tools/testing/selftests/hid
parentselftests/hid: vmtest.sh: allow finer control on the build steps (diff)
downloadwireguard-linux-110292a77f7c8d11eaa472e65f6a2084b25be2db.tar.xz
wireguard-linux-110292a77f7c8d11eaa472e65f6a2084b25be2db.zip
selftests/hid: base: allow for multiple skip_if_uhdev
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 <peter.hutterer@who-t.net> Acked-by: Jiri Kosina <jkosina@suse.com> Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-3-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/testing/selftests/hid')
-rw-r--r--tools/testing/selftests/hid/tests/base.py3
1 files changed, 1 insertions, 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):