History log of /linux-master/tools/testing/selftests/ir/ir_loopback.c
Revision Date Author Comments
# 183f80fd 01-Feb-2022 Sean Young <sean@mess.org>

selftests/ir: fix build with ancient kernel headers

Since commit e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h"),
the build of the selftests fails on rhel 8 since its version of
/usr/include/linux/lirc.h has no definition of RC_PROTO_RCMM32, etc [1].

[1] https://lkml.org/lkml/2022/1/28/275

Fixes: e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h")
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# 8eda7963 09-Dec-2021 Shuah Khan <skhan@linuxfoundation.org>

selftests/ir: remove ARRAY_SIZE define from ir_loopback.c

ARRAY_SIZE is defined in several selftests. Remove definitions from
individual test files and include header file for the define instead.
ARRAY_SIZE define is added in a separate patch to prepare for this
change.

Remove ARRAY_SIZE from ir_loopback.c and pickup the one defined
in kselftest.h.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>


# f1409116 09-Aug-2019 Sean Young <sean@mess.org>

media: selftests: ir: fix ir_loopback test failure

The decoder is called rc-mm, not rcmm. This was renamed late in the cycle
so this bug crept in.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# 721074b0 17-Jan-2019 Patrick Lerda <patrick9876@free.fr>

media: rc: rcmm decoder and encoder

media: add support for RCMM infrared remote controls.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# a5180977 31-Jan-2019 Shuah Khan <shuah@kernel.org>

selftests: ir: skip when lirc device doesn't exist.

Skip instead of fail when lirc device doesn't exist.

Signed-off-by: Shuah Khan <shuah@kernel.org>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>


# ed675ed9 31-Jan-2019 Shuah Khan <shuah@kernel.org>

selftests: ir: fix warning: "%s" directive output may be truncated ’ directive output may be truncated

Fix the following warning by sizing the buffer to max. of sysfs
path max. size + d_name max. size.

gcc -Wall -O2 -I../../../include/uapi ir_loopback.c -o ../tools/testing/selftests/ir/ir_loopback
ir_loopback.c: In function ‘lirc_open’:
ir_loopback.c:71:37: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 95 [-Wformat-truncation=]
snprintf(buf, sizeof(buf), "/dev/%s", dent->d_name);
^~
In file included from /usr/include/stdio.h:862:0,
from ir_loopback.c:14:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 6 and 261 bytes into a destination of size 100
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shuah Khan <shuah@kernel.org>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>


# e55c884e 16-Oct-2018 Sean Young <sean@mess.org>

media: rc: self test for IR encoders and decoders

ir-loopback can transmit IR on one rc device and check the correct
scancode and protocol is decoded on a different rc device. This can be
used to check IR transmission between two rc devices. Using rc-loopback,
we use it to check the IR encoders and decoders themselves.

No hardware is required for this test.

Signed-off-by: Sean Young <sean@mess.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>