lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 May 2024 15:43:58 +1000
From: Peter Hutterer <peter.hutterer@...-t.net>
To: bentiss@...nel.org
Cc: Jiri Kosina <jikos@...nel.org>, Shuah Khan <shuah@...nel.org>,
	linux-input@...r.kernel.org, Martin Sivak <mars@...tik.net>,
	Ping Cheng <pinglinux@...il.com>,
	Jason Gerecke <killertofu@...il.com>,
	Aaron Armstrong Skomra <skomra@...il.com>,
	Joshua Dickens <Joshua@...hua-dickens.com>,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 19/18] selftests/hid: skip tests with HID-BPF if
 udev-hid-bpf is not installed

On Mon, May 06, 2024 at 04:36:12PM +0200, bentiss@...nel.org wrote:
> From: Benjamin Tissoires <bentiss@...nel.org>
> 
> udev-hid-bpf is still not installed everywhere, and we should probably
> not assume it is installed automatically.
> 
> Signed-off-by: Benjamin Tissoires <bentiss@...nel.org>
> ---
> 
> I wanted to apply this series given that it wasn't reviewed in a month,

apologies. Reviewed-by: Peter Hutterer <peter.hutterer@...-t.net>

(I have a few improvement suggestions for the hidtools code but it's
better to do those there and then sync back).

Cheers,
  Peter

> 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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ