* [PATCH bpf-next] bpf/selftests: remove lirc test
@ 2026-06-05 7:58 Bastien Curutchet (eBPF Foundation)
2026-06-05 13:39 ` Alexei Starovoitov
0 siblings, 1 reply; 6+ messages in thread
From: Bastien Curutchet (eBPF Foundation) @ 2026-06-05 7:58 UTC (permalink / raw)
To: Andrii Nakryiko, Eduard Zingerman, Alexei Starovoitov,
Daniel Borkmann, Martin KaFai Lau, Kumar Kartikeya Dwivedi,
Song Liu, Yonghong Song, Jiri Olsa, Shuah Khan
Cc: Thomas Petazzoni, Alexis Lothore, linux-kernel, bpf,
linux-kselftest, Bastien Curutchet (eBPF Foundation)
test_lirc_mode.sh fails with the following when run from the vmtest VM:
root@(none):/root/bpf# ./test_lirc_mode2.sh
Failed to read decoded IR: Resource temporarily unavailable
FAIL: lirc_mode2
As part of the ongoing effort to get rid of any standalone test, this
script should either be fixed and converted to test_progs or removed.
Remove it.
Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
---
Hi all,
I went back up to v6.13 without finding a working commit. Maybe
something's wrong with my setup but comments inside
test_lirc_mode2_user.c say that three kernel configurations are needed
to have the test working and I ensured they were indeed enabled (with
s/BPF_RAWIR_EVENT/BPF_LIRC_MODE2).
If someone disagrees with this removal please speak up and I'll
investigate this further.
Best regards,
Bastien
---
tools/testing/selftests/bpf/.gitignore | 1 -
tools/testing/selftests/bpf/Makefile | 3 -
.../selftests/bpf/progs/test_lirc_mode2_kern.c | 26 ---
tools/testing/selftests/bpf/test_lirc_mode2.sh | 41 -----
tools/testing/selftests/bpf/test_lirc_mode2_user.c | 177 ---------------------
5 files changed, 248 deletions(-)
diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 986a6389186ba..b815bf0d88774 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -17,7 +17,6 @@ test_verifier_log
feature
urandom_read
test_sockmap
-test_lirc_mode2_user
flow_dissector_load
test_tcpnotify_user
test_libbpf
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index bc049620c7745..653c949fc854d 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -117,7 +117,6 @@ TEST_FILES = xsk_prereqs.sh $(wildcard progs/btf_dump_test_case_*.c)
# Order correspond to 'make run_tests' order
TEST_PROGS := test_kmod.sh \
- test_lirc_mode2.sh \
test_bpftool_build.sh \
test_doc_build.sh \
test_xsk.sh \
@@ -135,7 +134,6 @@ TEST_GEN_PROGS_EXTENDED = \
bench \
flow_dissector_load \
test_cpp \
- test_lirc_mode2_user \
veristat \
xdp_features \
xdp_hw_metadata \
@@ -325,7 +323,6 @@ $(OUTPUT)/test_sockmap: $(CGROUP_HELPERS) $(TESTING_HELPERS)
$(OUTPUT)/test_tcpnotify_user: $(CGROUP_HELPERS) $(TESTING_HELPERS) $(TRACE_HELPERS)
$(OUTPUT)/test_sock_fields: $(CGROUP_HELPERS) $(TESTING_HELPERS)
$(OUTPUT)/test_tag: $(TESTING_HELPERS)
-$(OUTPUT)/test_lirc_mode2_user: $(TESTING_HELPERS)
$(OUTPUT)/flow_dissector_load: $(TESTING_HELPERS)
$(OUTPUT)/test_maps: $(TESTING_HELPERS)
$(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) $(UNPRIV_HELPERS)
diff --git a/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c b/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
deleted file mode 100644
index 7a6620671a833..0000000000000
--- a/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-// test ir decoder
-//
-// Copyright (C) 2018 Sean Young <sean@mess.org>
-
-#include <linux/bpf.h>
-#include <linux/lirc.h>
-#include <bpf/bpf_helpers.h>
-
-SEC("lirc_mode2")
-int bpf_decoder(unsigned int *sample)
-{
- if (LIRC_IS_PULSE(*sample)) {
- unsigned int duration = LIRC_VALUE(*sample);
-
- if (duration & 0x10000)
- bpf_rc_keydown(sample, 0x40, duration & 0xffff, 0);
- if (duration & 0x20000)
- bpf_rc_pointer_rel(sample, (duration >> 8) & 0xff,
- duration & 0xff);
- }
-
- return 0;
-}
-
-char _license[] SEC("license") = "GPL";
diff --git a/tools/testing/selftests/bpf/test_lirc_mode2.sh b/tools/testing/selftests/bpf/test_lirc_mode2.sh
deleted file mode 100755
index 5252b91f48a18..0000000000000
--- a/tools/testing/selftests/bpf/test_lirc_mode2.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0
-
-# Kselftest framework requirement - SKIP code is 4.
-ksft_skip=4
-ret=$ksft_skip
-
-msg="skip all tests:"
-if [ $UID != 0 ]; then
- echo $msg please run this as root >&2
- exit $ksft_skip
-fi
-
-GREEN='\033[0;92m'
-RED='\033[0;31m'
-NC='\033[0m' # No Color
-
-modprobe rc-loopback
-
-for i in /sys/class/rc/rc*
-do
- if grep -q DRV_NAME=rc-loopback $i/uevent
- then
- LIRCDEV=$(grep DEVNAME= $i/lirc*/uevent | sed sQDEVNAME=Q/dev/Q)
- INPUTDEV=$(grep DEVNAME= $i/input*/event*/uevent | sed sQDEVNAME=Q/dev/Q)
- fi
-done
-
-if [ -n "$LIRCDEV" ];
-then
- TYPE=lirc_mode2
- ./test_lirc_mode2_user $LIRCDEV $INPUTDEV
- ret=$?
- if [ $ret -ne 0 ]; then
- echo -e ${RED}"FAIL: $TYPE"${NC}
- else
- echo -e ${GREEN}"PASS: $TYPE"${NC}
- fi
-fi
-
-exit $ret
diff --git a/tools/testing/selftests/bpf/test_lirc_mode2_user.c b/tools/testing/selftests/bpf/test_lirc_mode2_user.c
deleted file mode 100644
index 88e4aeab21b7b..0000000000000
--- a/tools/testing/selftests/bpf/test_lirc_mode2_user.c
+++ /dev/null
@@ -1,177 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-// test ir decoder
-//
-// Copyright (C) 2018 Sean Young <sean@mess.org>
-
-// 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.
-//
-// This test works by sending IR over rc-loopback, so the IR is processed by
-// BPF and then decoded into scancodes. The lirc chardev must be the one
-// associated with rc-loopback, see the output of ir-keytable(1).
-//
-// The following CONFIG options must be enabled for the test to succeed:
-// CONFIG_RC_CORE=y
-// CONFIG_BPF_RAWIR_EVENT=y
-// CONFIG_RC_LOOPBACK=y
-
-// Steps:
-// 1. Open the /dev/lircN device for rc-loopback (given on command line)
-// 2. Attach bpf_lirc_mode2 program which decodes some IR.
-// 3. Send some IR to the same IR device; since it is loopback, this will
-// end up in the bpf program
-// 4. bpf program should decode IR and report keycode
-// 5. We can read keycode from same /dev/lirc device
-
-#include <linux/bpf.h>
-#include <linux/input.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <poll.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "bpf_util.h"
-#include <bpf/bpf.h>
-#include <bpf/libbpf.h>
-
-#include "testing_helpers.h"
-
-int main(int argc, char **argv)
-{
- struct bpf_object *obj;
- int ret, lircfd, progfd, inputfd;
- int testir1 = 0x1dead;
- int testir2 = 0x20101;
- u32 prog_ids[10], prog_flags[10], prog_cnt;
-
- if (argc != 3) {
- printf("Usage: %s /dev/lircN /dev/input/eventM\n", argv[0]);
- return 2;
- }
-
- ret = bpf_prog_test_load("test_lirc_mode2_kern.bpf.o",
- BPF_PROG_TYPE_LIRC_MODE2, &obj, &progfd);
- if (ret) {
- printf("Failed to load bpf program\n");
- return 1;
- }
-
- lircfd = open(argv[1], O_RDWR | O_NONBLOCK);
- if (lircfd == -1) {
- printf("failed to open lirc device %s: %m\n", argv[1]);
- return 1;
- }
-
- /* Let's try detach it before it was ever attached */
- ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
- if (ret != -ENOENT) {
- printf("bpf_prog_detach2 not attached should fail: %m\n");
- return 1;
- }
-
- inputfd = open(argv[2], O_RDONLY | O_NONBLOCK);
- if (inputfd == -1) {
- printf("failed to open input device %s: %m\n", argv[1]);
- return 1;
- }
-
- prog_cnt = 10;
- ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids,
- &prog_cnt);
- if (ret) {
- printf("Failed to query bpf programs on lirc device: %m\n");
- return 1;
- }
-
- if (prog_cnt != 0) {
- printf("Expected nothing to be attached\n");
- return 1;
- }
-
- ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0);
- if (ret) {
- printf("Failed to attach bpf to lirc device: %m\n");
- return 1;
- }
-
- /* Write raw IR */
- ret = write(lircfd, &testir1, sizeof(testir1));
- if (ret != sizeof(testir1)) {
- printf("Failed to send test IR message: %m\n");
- return 1;
- }
-
- struct pollfd pfd = { .fd = inputfd, .events = POLLIN };
- struct input_event event;
-
- for (;;) {
- poll(&pfd, 1, 100);
-
- /* Read decoded IR */
- ret = read(inputfd, &event, sizeof(event));
- if (ret != sizeof(event)) {
- printf("Failed to read decoded IR: %m\n");
- return 1;
- }
-
- if (event.type == EV_MSC && event.code == MSC_SCAN &&
- event.value == 0xdead) {
- break;
- }
- }
-
- /* Write raw IR */
- ret = write(lircfd, &testir2, sizeof(testir2));
- if (ret != sizeof(testir2)) {
- printf("Failed to send test IR message: %m\n");
- return 1;
- }
-
- for (;;) {
- poll(&pfd, 1, 100);
-
- /* Read decoded IR */
- ret = read(inputfd, &event, sizeof(event));
- if (ret != sizeof(event)) {
- printf("Failed to read decoded IR: %m\n");
- return 1;
- }
-
- if (event.type == EV_REL && event.code == REL_Y &&
- event.value == 1 ) {
- break;
- }
- }
-
- prog_cnt = 10;
- ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids,
- &prog_cnt);
- if (ret) {
- printf("Failed to query bpf programs on lirc device: %m\n");
- return 1;
- }
-
- if (prog_cnt != 1) {
- printf("Expected one program to be attached\n");
- return 1;
- }
-
- /* Let's try detaching it now it is actually attached */
- ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
- if (ret) {
- printf("bpf_prog_detach2: returned %m\n");
- return 1;
- }
-
- return 0;
-}
---
base-commit: 73f574b0cd0ef87a25afdffe1d907b55f7fcc940
change-id: 20260604-remove-lirc-test-fc8afa634f3a
Best regards,
--
Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf/selftests: remove lirc test
2026-06-05 7:58 [PATCH bpf-next] bpf/selftests: remove lirc test Bastien Curutchet (eBPF Foundation)
@ 2026-06-05 13:39 ` Alexei Starovoitov
2026-06-05 15:21 ` Sean Young
0 siblings, 1 reply; 6+ messages in thread
From: Alexei Starovoitov @ 2026-06-05 13:39 UTC (permalink / raw)
To: Bastien Curutchet (eBPF Foundation), Sean Young
Cc: Andrii Nakryiko, Eduard Zingerman, Alexei Starovoitov,
Daniel Borkmann, Martin KaFai Lau, Kumar Kartikeya Dwivedi,
Song Liu, Yonghong Song, Jiri Olsa, Shuah Khan, Thomas Petazzoni,
Alexis Lothore, LKML, bpf, open list:KERNEL SELFTEST FRAMEWORK
On Fri, Jun 5, 2026 at 12:58 AM Bastien Curutchet (eBPF Foundation)
<bastien.curutchet@bootlin.com> wrote:
>
> test_lirc_mode.sh fails with the following when run from the vmtest VM:
> root@(none):/root/bpf# ./test_lirc_mode2.sh
> Failed to read decoded IR: Resource temporarily unavailable
> FAIL: lirc_mode2
>
> As part of the ongoing effort to get rid of any standalone test, this
> script should either be fixed and converted to test_progs or removed.
>
> Remove it.
cc Sean
> Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
> ---
> Hi all,
>
> I went back up to v6.13 without finding a working commit. Maybe
> something's wrong with my setup but comments inside
> test_lirc_mode2_user.c say that three kernel configurations are needed
> to have the test working and I ensured they were indeed enabled (with
> s/BPF_RAWIR_EVENT/BPF_LIRC_MODE2).
>
> If someone disagrees with this removal please speak up and I'll
> investigate this further.
>
> Best regards,
> Bastien
> ---
> tools/testing/selftests/bpf/.gitignore | 1 -
> tools/testing/selftests/bpf/Makefile | 3 -
> .../selftests/bpf/progs/test_lirc_mode2_kern.c | 26 ---
> tools/testing/selftests/bpf/test_lirc_mode2.sh | 41 -----
> tools/testing/selftests/bpf/test_lirc_mode2_user.c | 177 ---------------------
> 5 files changed, 248 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
> index 986a6389186ba..b815bf0d88774 100644
> --- a/tools/testing/selftests/bpf/.gitignore
> +++ b/tools/testing/selftests/bpf/.gitignore
> @@ -17,7 +17,6 @@ test_verifier_log
> feature
> urandom_read
> test_sockmap
> -test_lirc_mode2_user
> flow_dissector_load
> test_tcpnotify_user
> test_libbpf
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index bc049620c7745..653c949fc854d 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -117,7 +117,6 @@ TEST_FILES = xsk_prereqs.sh $(wildcard progs/btf_dump_test_case_*.c)
>
> # Order correspond to 'make run_tests' order
> TEST_PROGS := test_kmod.sh \
> - test_lirc_mode2.sh \
> test_bpftool_build.sh \
> test_doc_build.sh \
> test_xsk.sh \
> @@ -135,7 +134,6 @@ TEST_GEN_PROGS_EXTENDED = \
> bench \
> flow_dissector_load \
> test_cpp \
> - test_lirc_mode2_user \
> veristat \
> xdp_features \
> xdp_hw_metadata \
> @@ -325,7 +323,6 @@ $(OUTPUT)/test_sockmap: $(CGROUP_HELPERS) $(TESTING_HELPERS)
> $(OUTPUT)/test_tcpnotify_user: $(CGROUP_HELPERS) $(TESTING_HELPERS) $(TRACE_HELPERS)
> $(OUTPUT)/test_sock_fields: $(CGROUP_HELPERS) $(TESTING_HELPERS)
> $(OUTPUT)/test_tag: $(TESTING_HELPERS)
> -$(OUTPUT)/test_lirc_mode2_user: $(TESTING_HELPERS)
> $(OUTPUT)/flow_dissector_load: $(TESTING_HELPERS)
> $(OUTPUT)/test_maps: $(TESTING_HELPERS)
> $(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) $(UNPRIV_HELPERS)
> diff --git a/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c b/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
> deleted file mode 100644
> index 7a6620671a833..0000000000000
> --- a/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -// test ir decoder
> -//
> -// Copyright (C) 2018 Sean Young <sean@mess.org>
> -
> -#include <linux/bpf.h>
> -#include <linux/lirc.h>
> -#include <bpf/bpf_helpers.h>
> -
> -SEC("lirc_mode2")
> -int bpf_decoder(unsigned int *sample)
> -{
> - if (LIRC_IS_PULSE(*sample)) {
> - unsigned int duration = LIRC_VALUE(*sample);
> -
> - if (duration & 0x10000)
> - bpf_rc_keydown(sample, 0x40, duration & 0xffff, 0);
> - if (duration & 0x20000)
> - bpf_rc_pointer_rel(sample, (duration >> 8) & 0xff,
> - duration & 0xff);
> - }
> -
> - return 0;
> -}
> -
> -char _license[] SEC("license") = "GPL";
> diff --git a/tools/testing/selftests/bpf/test_lirc_mode2.sh b/tools/testing/selftests/bpf/test_lirc_mode2.sh
> deleted file mode 100755
> index 5252b91f48a18..0000000000000
> --- a/tools/testing/selftests/bpf/test_lirc_mode2.sh
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -#!/bin/bash
> -# SPDX-License-Identifier: GPL-2.0
> -
> -# Kselftest framework requirement - SKIP code is 4.
> -ksft_skip=4
> -ret=$ksft_skip
> -
> -msg="skip all tests:"
> -if [ $UID != 0 ]; then
> - echo $msg please run this as root >&2
> - exit $ksft_skip
> -fi
> -
> -GREEN='\033[0;92m'
> -RED='\033[0;31m'
> -NC='\033[0m' # No Color
> -
> -modprobe rc-loopback
> -
> -for i in /sys/class/rc/rc*
> -do
> - if grep -q DRV_NAME=rc-loopback $i/uevent
> - then
> - LIRCDEV=$(grep DEVNAME= $i/lirc*/uevent | sed sQDEVNAME=Q/dev/Q)
> - INPUTDEV=$(grep DEVNAME= $i/input*/event*/uevent | sed sQDEVNAME=Q/dev/Q)
> - fi
> -done
> -
> -if [ -n "$LIRCDEV" ];
> -then
> - TYPE=lirc_mode2
> - ./test_lirc_mode2_user $LIRCDEV $INPUTDEV
> - ret=$?
> - if [ $ret -ne 0 ]; then
> - echo -e ${RED}"FAIL: $TYPE"${NC}
> - else
> - echo -e ${GREEN}"PASS: $TYPE"${NC}
> - fi
> -fi
> -
> -exit $ret
> diff --git a/tools/testing/selftests/bpf/test_lirc_mode2_user.c b/tools/testing/selftests/bpf/test_lirc_mode2_user.c
> deleted file mode 100644
> index 88e4aeab21b7b..0000000000000
> --- a/tools/testing/selftests/bpf/test_lirc_mode2_user.c
> +++ /dev/null
> @@ -1,177 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -// test ir decoder
> -//
> -// Copyright (C) 2018 Sean Young <sean@mess.org>
> -
> -// 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.
> -//
> -// This test works by sending IR over rc-loopback, so the IR is processed by
> -// BPF and then decoded into scancodes. The lirc chardev must be the one
> -// associated with rc-loopback, see the output of ir-keytable(1).
> -//
> -// The following CONFIG options must be enabled for the test to succeed:
> -// CONFIG_RC_CORE=y
> -// CONFIG_BPF_RAWIR_EVENT=y
> -// CONFIG_RC_LOOPBACK=y
> -
> -// Steps:
> -// 1. Open the /dev/lircN device for rc-loopback (given on command line)
> -// 2. Attach bpf_lirc_mode2 program which decodes some IR.
> -// 3. Send some IR to the same IR device; since it is loopback, this will
> -// end up in the bpf program
> -// 4. bpf program should decode IR and report keycode
> -// 5. We can read keycode from same /dev/lirc device
> -
> -#include <linux/bpf.h>
> -#include <linux/input.h>
> -#include <errno.h>
> -#include <stdio.h>
> -#include <stdlib.h>
> -#include <string.h>
> -#include <unistd.h>
> -#include <poll.h>
> -#include <sys/types.h>
> -#include <sys/ioctl.h>
> -#include <sys/stat.h>
> -#include <fcntl.h>
> -
> -#include "bpf_util.h"
> -#include <bpf/bpf.h>
> -#include <bpf/libbpf.h>
> -
> -#include "testing_helpers.h"
> -
> -int main(int argc, char **argv)
> -{
> - struct bpf_object *obj;
> - int ret, lircfd, progfd, inputfd;
> - int testir1 = 0x1dead;
> - int testir2 = 0x20101;
> - u32 prog_ids[10], prog_flags[10], prog_cnt;
> -
> - if (argc != 3) {
> - printf("Usage: %s /dev/lircN /dev/input/eventM\n", argv[0]);
> - return 2;
> - }
> -
> - ret = bpf_prog_test_load("test_lirc_mode2_kern.bpf.o",
> - BPF_PROG_TYPE_LIRC_MODE2, &obj, &progfd);
> - if (ret) {
> - printf("Failed to load bpf program\n");
> - return 1;
> - }
> -
> - lircfd = open(argv[1], O_RDWR | O_NONBLOCK);
> - if (lircfd == -1) {
> - printf("failed to open lirc device %s: %m\n", argv[1]);
> - return 1;
> - }
> -
> - /* Let's try detach it before it was ever attached */
> - ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
> - if (ret != -ENOENT) {
> - printf("bpf_prog_detach2 not attached should fail: %m\n");
> - return 1;
> - }
> -
> - inputfd = open(argv[2], O_RDONLY | O_NONBLOCK);
> - if (inputfd == -1) {
> - printf("failed to open input device %s: %m\n", argv[1]);
> - return 1;
> - }
> -
> - prog_cnt = 10;
> - ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids,
> - &prog_cnt);
> - if (ret) {
> - printf("Failed to query bpf programs on lirc device: %m\n");
> - return 1;
> - }
> -
> - if (prog_cnt != 0) {
> - printf("Expected nothing to be attached\n");
> - return 1;
> - }
> -
> - ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0);
> - if (ret) {
> - printf("Failed to attach bpf to lirc device: %m\n");
> - return 1;
> - }
> -
> - /* Write raw IR */
> - ret = write(lircfd, &testir1, sizeof(testir1));
> - if (ret != sizeof(testir1)) {
> - printf("Failed to send test IR message: %m\n");
> - return 1;
> - }
> -
> - struct pollfd pfd = { .fd = inputfd, .events = POLLIN };
> - struct input_event event;
> -
> - for (;;) {
> - poll(&pfd, 1, 100);
> -
> - /* Read decoded IR */
> - ret = read(inputfd, &event, sizeof(event));
> - if (ret != sizeof(event)) {
> - printf("Failed to read decoded IR: %m\n");
> - return 1;
> - }
> -
> - if (event.type == EV_MSC && event.code == MSC_SCAN &&
> - event.value == 0xdead) {
> - break;
> - }
> - }
> -
> - /* Write raw IR */
> - ret = write(lircfd, &testir2, sizeof(testir2));
> - if (ret != sizeof(testir2)) {
> - printf("Failed to send test IR message: %m\n");
> - return 1;
> - }
> -
> - for (;;) {
> - poll(&pfd, 1, 100);
> -
> - /* Read decoded IR */
> - ret = read(inputfd, &event, sizeof(event));
> - if (ret != sizeof(event)) {
> - printf("Failed to read decoded IR: %m\n");
> - return 1;
> - }
> -
> - if (event.type == EV_REL && event.code == REL_Y &&
> - event.value == 1 ) {
> - break;
> - }
> - }
> -
> - prog_cnt = 10;
> - ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids,
> - &prog_cnt);
> - if (ret) {
> - printf("Failed to query bpf programs on lirc device: %m\n");
> - return 1;
> - }
> -
> - if (prog_cnt != 1) {
> - printf("Expected one program to be attached\n");
> - return 1;
> - }
> -
> - /* Let's try detaching it now it is actually attached */
> - ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
> - if (ret) {
> - printf("bpf_prog_detach2: returned %m\n");
> - return 1;
> - }
> -
> - return 0;
> -}
>
> ---
> base-commit: 73f574b0cd0ef87a25afdffe1d907b55f7fcc940
> change-id: 20260604-remove-lirc-test-fc8afa634f3a
>
> Best regards,
> --
> Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf/selftests: remove lirc test
2026-06-05 13:39 ` Alexei Starovoitov
@ 2026-06-05 15:21 ` Sean Young
2026-06-08 12:51 ` Bastien Curutchet
0 siblings, 1 reply; 6+ messages in thread
From: Sean Young @ 2026-06-05 15:21 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Bastien Curutchet (eBPF Foundation), Andrii Nakryiko,
Eduard Zingerman, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Kumar Kartikeya Dwivedi, Song Liu,
Yonghong Song, Jiri Olsa, Shuah Khan, Thomas Petazzoni,
Alexis Lothore, LKML, bpf, open list:KERNEL SELFTEST FRAMEWORK
On Fri, Jun 05, 2026 at 06:39:51AM -0700, Alexei Starovoitov wrote:
> On Fri, Jun 5, 2026 at 12:58 AM Bastien Curutchet (eBPF Foundation)
> <bastien.curutchet@bootlin.com> wrote:
> >
> > test_lirc_mode.sh fails with the following when run from the vmtest VM:
> > root@(none):/root/bpf# ./test_lirc_mode2.sh
> > Failed to read decoded IR: Resource temporarily unavailable
> > FAIL: lirc_mode2
> >
> > As part of the ongoing effort to get rid of any standalone test, this
> > script should either be fixed and converted to test_progs or removed.
> >
> > Remove it.
>
> cc Sean
I've sent a fix to for the test in a separate email.
This regressed a long time ago; is anyone running these tests? There is
not much point to selftests if they're not run by anyone. I should add
them to linux-media CI, but is anyone in bpf running them?
I am not familiar with test_progs, what's that?
Sean
> > Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
> > ---
> > Hi all,
> >
> > I went back up to v6.13 without finding a working commit. Maybe
> > something's wrong with my setup but comments inside
> > test_lirc_mode2_user.c say that three kernel configurations are needed
> > to have the test working and I ensured they were indeed enabled (with
> > s/BPF_RAWIR_EVENT/BPF_LIRC_MODE2).
> >
> > If someone disagrees with this removal please speak up and I'll
> > investigate this further.
> >
> > Best regards,
> > Bastien
> > ---
> > tools/testing/selftests/bpf/.gitignore | 1 -
> > tools/testing/selftests/bpf/Makefile | 3 -
> > .../selftests/bpf/progs/test_lirc_mode2_kern.c | 26 ---
> > tools/testing/selftests/bpf/test_lirc_mode2.sh | 41 -----
> > tools/testing/selftests/bpf/test_lirc_mode2_user.c | 177 ---------------------
> > 5 files changed, 248 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
> > index 986a6389186ba..b815bf0d88774 100644
> > --- a/tools/testing/selftests/bpf/.gitignore
> > +++ b/tools/testing/selftests/bpf/.gitignore
> > @@ -17,7 +17,6 @@ test_verifier_log
> > feature
> > urandom_read
> > test_sockmap
> > -test_lirc_mode2_user
> > flow_dissector_load
> > test_tcpnotify_user
> > test_libbpf
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index bc049620c7745..653c949fc854d 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -117,7 +117,6 @@ TEST_FILES = xsk_prereqs.sh $(wildcard progs/btf_dump_test_case_*.c)
> >
> > # Order correspond to 'make run_tests' order
> > TEST_PROGS := test_kmod.sh \
> > - test_lirc_mode2.sh \
> > test_bpftool_build.sh \
> > test_doc_build.sh \
> > test_xsk.sh \
> > @@ -135,7 +134,6 @@ TEST_GEN_PROGS_EXTENDED = \
> > bench \
> > flow_dissector_load \
> > test_cpp \
> > - test_lirc_mode2_user \
> > veristat \
> > xdp_features \
> > xdp_hw_metadata \
> > @@ -325,7 +323,6 @@ $(OUTPUT)/test_sockmap: $(CGROUP_HELPERS) $(TESTING_HELPERS)
> > $(OUTPUT)/test_tcpnotify_user: $(CGROUP_HELPERS) $(TESTING_HELPERS) $(TRACE_HELPERS)
> > $(OUTPUT)/test_sock_fields: $(CGROUP_HELPERS) $(TESTING_HELPERS)
> > $(OUTPUT)/test_tag: $(TESTING_HELPERS)
> > -$(OUTPUT)/test_lirc_mode2_user: $(TESTING_HELPERS)
> > $(OUTPUT)/flow_dissector_load: $(TESTING_HELPERS)
> > $(OUTPUT)/test_maps: $(TESTING_HELPERS)
> > $(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) $(UNPRIV_HELPERS)
> > diff --git a/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c b/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
> > deleted file mode 100644
> > index 7a6620671a833..0000000000000
> > --- a/tools/testing/selftests/bpf/progs/test_lirc_mode2_kern.c
> > +++ /dev/null
> > @@ -1,26 +0,0 @@
> > -// SPDX-License-Identifier: GPL-2.0
> > -// test ir decoder
> > -//
> > -// Copyright (C) 2018 Sean Young <sean@mess.org>
> > -
> > -#include <linux/bpf.h>
> > -#include <linux/lirc.h>
> > -#include <bpf/bpf_helpers.h>
> > -
> > -SEC("lirc_mode2")
> > -int bpf_decoder(unsigned int *sample)
> > -{
> > - if (LIRC_IS_PULSE(*sample)) {
> > - unsigned int duration = LIRC_VALUE(*sample);
> > -
> > - if (duration & 0x10000)
> > - bpf_rc_keydown(sample, 0x40, duration & 0xffff, 0);
> > - if (duration & 0x20000)
> > - bpf_rc_pointer_rel(sample, (duration >> 8) & 0xff,
> > - duration & 0xff);
> > - }
> > -
> > - return 0;
> > -}
> > -
> > -char _license[] SEC("license") = "GPL";
> > diff --git a/tools/testing/selftests/bpf/test_lirc_mode2.sh b/tools/testing/selftests/bpf/test_lirc_mode2.sh
> > deleted file mode 100755
> > index 5252b91f48a18..0000000000000
> > --- a/tools/testing/selftests/bpf/test_lirc_mode2.sh
> > +++ /dev/null
> > @@ -1,41 +0,0 @@
> > -#!/bin/bash
> > -# SPDX-License-Identifier: GPL-2.0
> > -
> > -# Kselftest framework requirement - SKIP code is 4.
> > -ksft_skip=4
> > -ret=$ksft_skip
> > -
> > -msg="skip all tests:"
> > -if [ $UID != 0 ]; then
> > - echo $msg please run this as root >&2
> > - exit $ksft_skip
> > -fi
> > -
> > -GREEN='\033[0;92m'
> > -RED='\033[0;31m'
> > -NC='\033[0m' # No Color
> > -
> > -modprobe rc-loopback
> > -
> > -for i in /sys/class/rc/rc*
> > -do
> > - if grep -q DRV_NAME=rc-loopback $i/uevent
> > - then
> > - LIRCDEV=$(grep DEVNAME= $i/lirc*/uevent | sed sQDEVNAME=Q/dev/Q)
> > - INPUTDEV=$(grep DEVNAME= $i/input*/event*/uevent | sed sQDEVNAME=Q/dev/Q)
> > - fi
> > -done
> > -
> > -if [ -n "$LIRCDEV" ];
> > -then
> > - TYPE=lirc_mode2
> > - ./test_lirc_mode2_user $LIRCDEV $INPUTDEV
> > - ret=$?
> > - if [ $ret -ne 0 ]; then
> > - echo -e ${RED}"FAIL: $TYPE"${NC}
> > - else
> > - echo -e ${GREEN}"PASS: $TYPE"${NC}
> > - fi
> > -fi
> > -
> > -exit $ret
> > diff --git a/tools/testing/selftests/bpf/test_lirc_mode2_user.c b/tools/testing/selftests/bpf/test_lirc_mode2_user.c
> > deleted file mode 100644
> > index 88e4aeab21b7b..0000000000000
> > --- a/tools/testing/selftests/bpf/test_lirc_mode2_user.c
> > +++ /dev/null
> > @@ -1,177 +0,0 @@
> > -// SPDX-License-Identifier: GPL-2.0
> > -// test ir decoder
> > -//
> > -// Copyright (C) 2018 Sean Young <sean@mess.org>
> > -
> > -// 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.
> > -//
> > -// This test works by sending IR over rc-loopback, so the IR is processed by
> > -// BPF and then decoded into scancodes. The lirc chardev must be the one
> > -// associated with rc-loopback, see the output of ir-keytable(1).
> > -//
> > -// The following CONFIG options must be enabled for the test to succeed:
> > -// CONFIG_RC_CORE=y
> > -// CONFIG_BPF_RAWIR_EVENT=y
> > -// CONFIG_RC_LOOPBACK=y
> > -
> > -// Steps:
> > -// 1. Open the /dev/lircN device for rc-loopback (given on command line)
> > -// 2. Attach bpf_lirc_mode2 program which decodes some IR.
> > -// 3. Send some IR to the same IR device; since it is loopback, this will
> > -// end up in the bpf program
> > -// 4. bpf program should decode IR and report keycode
> > -// 5. We can read keycode from same /dev/lirc device
> > -
> > -#include <linux/bpf.h>
> > -#include <linux/input.h>
> > -#include <errno.h>
> > -#include <stdio.h>
> > -#include <stdlib.h>
> > -#include <string.h>
> > -#include <unistd.h>
> > -#include <poll.h>
> > -#include <sys/types.h>
> > -#include <sys/ioctl.h>
> > -#include <sys/stat.h>
> > -#include <fcntl.h>
> > -
> > -#include "bpf_util.h"
> > -#include <bpf/bpf.h>
> > -#include <bpf/libbpf.h>
> > -
> > -#include "testing_helpers.h"
> > -
> > -int main(int argc, char **argv)
> > -{
> > - struct bpf_object *obj;
> > - int ret, lircfd, progfd, inputfd;
> > - int testir1 = 0x1dead;
> > - int testir2 = 0x20101;
> > - u32 prog_ids[10], prog_flags[10], prog_cnt;
> > -
> > - if (argc != 3) {
> > - printf("Usage: %s /dev/lircN /dev/input/eventM\n", argv[0]);
> > - return 2;
> > - }
> > -
> > - ret = bpf_prog_test_load("test_lirc_mode2_kern.bpf.o",
> > - BPF_PROG_TYPE_LIRC_MODE2, &obj, &progfd);
> > - if (ret) {
> > - printf("Failed to load bpf program\n");
> > - return 1;
> > - }
> > -
> > - lircfd = open(argv[1], O_RDWR | O_NONBLOCK);
> > - if (lircfd == -1) {
> > - printf("failed to open lirc device %s: %m\n", argv[1]);
> > - return 1;
> > - }
> > -
> > - /* Let's try detach it before it was ever attached */
> > - ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
> > - if (ret != -ENOENT) {
> > - printf("bpf_prog_detach2 not attached should fail: %m\n");
> > - return 1;
> > - }
> > -
> > - inputfd = open(argv[2], O_RDONLY | O_NONBLOCK);
> > - if (inputfd == -1) {
> > - printf("failed to open input device %s: %m\n", argv[1]);
> > - return 1;
> > - }
> > -
> > - prog_cnt = 10;
> > - ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids,
> > - &prog_cnt);
> > - if (ret) {
> > - printf("Failed to query bpf programs on lirc device: %m\n");
> > - return 1;
> > - }
> > -
> > - if (prog_cnt != 0) {
> > - printf("Expected nothing to be attached\n");
> > - return 1;
> > - }
> > -
> > - ret = bpf_prog_attach(progfd, lircfd, BPF_LIRC_MODE2, 0);
> > - if (ret) {
> > - printf("Failed to attach bpf to lirc device: %m\n");
> > - return 1;
> > - }
> > -
> > - /* Write raw IR */
> > - ret = write(lircfd, &testir1, sizeof(testir1));
> > - if (ret != sizeof(testir1)) {
> > - printf("Failed to send test IR message: %m\n");
> > - return 1;
> > - }
> > -
> > - struct pollfd pfd = { .fd = inputfd, .events = POLLIN };
> > - struct input_event event;
> > -
> > - for (;;) {
> > - poll(&pfd, 1, 100);
> > -
> > - /* Read decoded IR */
> > - ret = read(inputfd, &event, sizeof(event));
> > - if (ret != sizeof(event)) {
> > - printf("Failed to read decoded IR: %m\n");
> > - return 1;
> > - }
> > -
> > - if (event.type == EV_MSC && event.code == MSC_SCAN &&
> > - event.value == 0xdead) {
> > - break;
> > - }
> > - }
> > -
> > - /* Write raw IR */
> > - ret = write(lircfd, &testir2, sizeof(testir2));
> > - if (ret != sizeof(testir2)) {
> > - printf("Failed to send test IR message: %m\n");
> > - return 1;
> > - }
> > -
> > - for (;;) {
> > - poll(&pfd, 1, 100);
> > -
> > - /* Read decoded IR */
> > - ret = read(inputfd, &event, sizeof(event));
> > - if (ret != sizeof(event)) {
> > - printf("Failed to read decoded IR: %m\n");
> > - return 1;
> > - }
> > -
> > - if (event.type == EV_REL && event.code == REL_Y &&
> > - event.value == 1 ) {
> > - break;
> > - }
> > - }
> > -
> > - prog_cnt = 10;
> > - ret = bpf_prog_query(lircfd, BPF_LIRC_MODE2, 0, prog_flags, prog_ids,
> > - &prog_cnt);
> > - if (ret) {
> > - printf("Failed to query bpf programs on lirc device: %m\n");
> > - return 1;
> > - }
> > -
> > - if (prog_cnt != 1) {
> > - printf("Expected one program to be attached\n");
> > - return 1;
> > - }
> > -
> > - /* Let's try detaching it now it is actually attached */
> > - ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
> > - if (ret) {
> > - printf("bpf_prog_detach2: returned %m\n");
> > - return 1;
> > - }
> > -
> > - return 0;
> > -}
> >
> > ---
> > base-commit: 73f574b0cd0ef87a25afdffe1d907b55f7fcc940
> > change-id: 20260604-remove-lirc-test-fc8afa634f3a
> >
> > Best regards,
> > --
> > Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf/selftests: remove lirc test
2026-06-05 15:21 ` Sean Young
@ 2026-06-08 12:51 ` Bastien Curutchet
2026-07-01 15:26 ` Bastien Curutchet
0 siblings, 1 reply; 6+ messages in thread
From: Bastien Curutchet @ 2026-06-08 12:51 UTC (permalink / raw)
To: Sean Young, Alexei Starovoitov
Cc: Andrii Nakryiko, Eduard Zingerman, Alexei Starovoitov,
Daniel Borkmann, Martin KaFai Lau, Kumar Kartikeya Dwivedi,
Song Liu, Yonghong Song, Jiri Olsa, Shuah Khan, Thomas Petazzoni,
Alexis Lothore, LKML, open list:KERNEL SELFTEST FRAMEWORK, bpf
Hi Sean,
On 6/5/26 5:21 PM, Sean Young wrote:
> On Fri, Jun 05, 2026 at 06:39:51AM -0700, Alexei Starovoitov wrote:
>> On Fri, Jun 5, 2026 at 12:58 AM Bastien Curutchet (eBPF Foundation)
>> <bastien.curutchet@bootlin.com> wrote:
>>>
>>> test_lirc_mode.sh fails with the following when run from the vmtest VM:
>>> root@(none):/root/bpf# ./test_lirc_mode2.sh
>>> Failed to read decoded IR: Resource temporarily unavailable
>>> FAIL: lirc_mode2
>>>
>>> As part of the ongoing effort to get rid of any standalone test, this
>>> script should either be fixed and converted to test_progs or removed.
>>>
>>> Remove it.
>>
>> cc Sean
>
> I've sent a fix to for the test in a separate email.
>
> This regressed a long time ago; is anyone running these tests? There is
> not much point to selftests if they're not run by anyone. I should add
> them to linux-media CI, but is anyone in bpf running them?
>
> I am not familiar with test_progs, what's that?
>
test_progs is the selftest's application run by the BPF CI for every
patch series sent to bpf@vger.kernel.org (or PR done to the BPF github).
It's made out of the C files located in
tools/testing/selftests/bpf/prog_tests/.
The shell scripts under tools/testing/selftests/bpf aren't run
automatically anywhere (to my knowledge at least). The goal of the
'on-going effort' I mentioned is to get rid of these scripts by either
integrating them to the 'test_progs infra' or removing them.
If you're going to add this script to the linux-media CI, maybe we could
remove it from here ?
Best regards,
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf/selftests: remove lirc test
2026-06-08 12:51 ` Bastien Curutchet
@ 2026-07-01 15:26 ` Bastien Curutchet
2026-07-01 16:41 ` Sean Young
0 siblings, 1 reply; 6+ messages in thread
From: Bastien Curutchet @ 2026-07-01 15:26 UTC (permalink / raw)
To: Sean Young, Alexei Starovoitov
Cc: Andrii Nakryiko, Eduard Zingerman, Alexei Starovoitov,
Daniel Borkmann, Martin KaFai Lau, Kumar Kartikeya Dwivedi,
Song Liu, Yonghong Song, Jiri Olsa, Shuah Khan, Thomas Petazzoni,
Alexis Lothore, LKML, open list:KERNEL SELFTEST FRAMEWORK, bpf
Hi Sean,
On 6/8/26 2:51 PM, Bastien Curutchet wrote:
> Hi Sean,
>
> On 6/5/26 5:21 PM, Sean Young wrote:
>> On Fri, Jun 05, 2026 at 06:39:51AM -0700, Alexei Starovoitov wrote:
>>> On Fri, Jun 5, 2026 at 12:58 AM Bastien Curutchet (eBPF Foundation)
>>> <bastien.curutchet@bootlin.com> wrote:
>>>>
>>>> test_lirc_mode.sh fails with the following when run from the vmtest VM:
>>>> root@(none):/root/bpf# ./test_lirc_mode2.sh
>>>> Failed to read decoded IR: Resource temporarily unavailable
>>>> FAIL: lirc_mode2
>>>>
>>>> As part of the ongoing effort to get rid of any standalone test, this
>>>> script should either be fixed and converted to test_progs or removed.
>>>>
>>>> Remove it.
>>>
>>> cc Sean
>>
>> I've sent a fix to for the test in a separate email.
>>
>> This regressed a long time ago; is anyone running these tests? There is
>> not much point to selftests if they're not run by anyone. I should add
>> them to linux-media CI, but is anyone in bpf running them?
>>
>> I am not familiar with test_progs, what's that?
>>
> test_progs is the selftest's application run by the BPF CI for every
> patch series sent to bpf@vger.kernel.org (or PR done to the BPF github).
> It's made out of the C files located in tools/testing/selftests/bpf/
> prog_tests/.
>
> The shell scripts under tools/testing/selftests/bpf aren't run
> automatically anywhere (to my knowledge at least). The goal of the 'on-
> going effort' I mentioned is to get rid of these scripts by either
> integrating them to the 'test_progs infra' or removing them.
>
> If you're going to add this script to the linux-media CI, maybe we could
> remove it from here ?
>
>
Gentle ping: would it be OK for you if we remove the test from here ?
I've seen your fix, the bug was introduced in 5.17, which means no one
had run it for 4 years. Given that, I'm not sure it's worth the effort
of porting it to the test_progs infra.
Best regards,
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH bpf-next] bpf/selftests: remove lirc test
2026-07-01 15:26 ` Bastien Curutchet
@ 2026-07-01 16:41 ` Sean Young
0 siblings, 0 replies; 6+ messages in thread
From: Sean Young @ 2026-07-01 16:41 UTC (permalink / raw)
To: Bastien Curutchet
Cc: Alexei Starovoitov, Andrii Nakryiko, Eduard Zingerman,
Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau,
Kumar Kartikeya Dwivedi, Song Liu, Yonghong Song, Jiri Olsa,
Shuah Khan, Thomas Petazzoni, Alexis Lothore, LKML,
open list:KERNEL SELFTEST FRAMEWORK, bpf
Hi Bastien,
On Wed, Jul 01, 2026 at 05:26:20PM +0200, Bastien Curutchet wrote:
> On 6/8/26 2:51 PM, Bastien Curutchet wrote:
> > On 6/5/26 5:21 PM, Sean Young wrote:
> > > On Fri, Jun 05, 2026 at 06:39:51AM -0700, Alexei Starovoitov wrote:
> > > > On Fri, Jun 5, 2026 at 12:58 AM Bastien Curutchet (eBPF Foundation)
> > > > <bastien.curutchet@bootlin.com> wrote:
> > > > >
> > > > > test_lirc_mode.sh fails with the following when run from the vmtest VM:
> > > > > root@(none):/root/bpf# ./test_lirc_mode2.sh
> > > > > Failed to read decoded IR: Resource temporarily unavailable
> > > > > FAIL: lirc_mode2
> > > > >
> > > > > As part of the ongoing effort to get rid of any standalone test, this
> > > > > script should either be fixed and converted to test_progs or removed.
> > > > >
> > > > > Remove it.
> > > >
> > > > cc Sean
> > >
> > > I've sent a fix to for the test in a separate email.
> > >
> > > This regressed a long time ago; is anyone running these tests? There is
> > > not much point to selftests if they're not run by anyone. I should add
> > > them to linux-media CI, but is anyone in bpf running them?
> > >
> > > I am not familiar with test_progs, what's that?
> > >
> > test_progs is the selftest's application run by the BPF CI for every
> > patch series sent to bpf@vger.kernel.org (or PR done to the BPF github).
> > It's made out of the C files located in tools/testing/selftests/bpf/
> > prog_tests/.
> >
> > The shell scripts under tools/testing/selftests/bpf aren't run
> > automatically anywhere (to my knowledge at least). The goal of the 'on-
> > going effort' I mentioned is to get rid of these scripts by either
> > integrating them to the 'test_progs infra' or removing them.
> >
> > If you're going to add this script to the linux-media CI, maybe we could
> > remove it from here ?
> >
> >
> Gentle ping: would it be OK for you if we remove the test from here ? I've
> seen your fix, the bug was introduced in 5.17, which means no one had run it
> for 4 years. Given that, I'm not sure it's worth the effort of porting it to
> the test_progs infra.
So the test is useful and should be run regularly. It should be ported to
test_progs or moved to media-ci. I haven't decided yet which way I want to
go. I'm just a bit busy right now, I'll get round to it soon.
Thanks,
Sean
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-01 16:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-05 7:58 [PATCH bpf-next] bpf/selftests: remove lirc test Bastien Curutchet (eBPF Foundation)
2026-06-05 13:39 ` Alexei Starovoitov
2026-06-05 15:21 ` Sean Young
2026-06-08 12:51 ` Bastien Curutchet
2026-07-01 15:26 ` Bastien Curutchet
2026-07-01 16:41 ` Sean Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox