Re: [PATCH v3] selftests/bpf: convert lirc_mode2 to prog_tests and extend coverage

[email protected]
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comments use C++ style `//` instead of the mandated kernel `/* ... */` format.
--

--- Patch [1]: [PATCH v3] selftests/bpf: convert lirc_mode2 to prog_tests and extend coverage ---
commit 5795d2e92debc935e217deb800d55dcb81234f7f
Author: Sean Young <[email protected]>

selftests/bpf: convert lirc_mode2 to prog_tests and extend coverage

This commit ports the lirc_mode2 test to the prog_tests framework and
extends coverage of the BPF_LIRC_MODE2 attach/detach/query APIs. It also
removes the obsolete user and kernel test files alongside the shell script.

> diff --git a/tools/testing/selftests/bpf/prog_tests/lirc_mode2.c b/tools/testing/selftests/bpf/prog_tests/lirc_mode2.c
> new file mode 100644
> index 0000000000000..7b7352dbcd826
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/lirc_mode2.c
> @@ -0,0 +1,334 @@
> +// SPDX-License-Identifier: GPL-2.0
> +// test ir decoder
> +//
> +// Copyright (C) 2018 Sean Young <[email protected]>
> +
> +// A lirc chardev is a device representing a consumer IR (cir) device which
> +// can receive infrared signals from remote control and/or transmit IR.
> +//
> +// IR is sent as a series of pulses and space somewhat like morse code. The
> +// BPF program can decode this into scancodes so that rc-core can translate
> +// this into input key codes using the rc keymap.

[Severity: Low]
This isn't a bug, but does this violate the BPF subsystem comment style?
Multi-line comments under the BPF subsystem generally require the standard
kernel C-style block comment format, with the opening /* on its own line.

Should these be converted to the /* ... */ format?

[ ... ]

> diff --git a/tools/testing/selftests/bpf/progs/lirc_mode2.c b/tools/testing/selftests/bpf/progs/lirc_mode2.c
> new file mode 100644
> index 0000000000000..98137f3c5c03d
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/lirc_mode2.c
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0
> +// test ir decoder
> +//
> +// Copyright (C) 2018 Sean Young <[email protected]>

[Severity: Low]
This isn't a bug, but this file header also uses the C++ style multi-line
comments instead of the preferred kernel block comment format.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.