[LTP] [PATCH] input_helper: Modify the check range of the input event number

Petr Vorel pvorel@suse.cz
Thu Mar 28 11:42:26 CET 2024


Hi,

> If the input event number is greater than 32, the newly added event ID
> will be 256 or later.
> When there were already 32 input events in the device, this test program
> only checked 0~99, so it failed because it could not find a new input
> event ID.

> In order to eliminate this failure, we changed the event ID range to be
> checked by this test program to 0~1023.
> (https://github.com/torvalds/linux/commit/7f8d4cad1e4e11a45d02bd6e024cc2812963c38a, it looks like the upper limit should be 1023.)

For 1024:
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Ideally you would send v2, but we can also update the commit message and code
before merge.

Kind regards,
Petr

> ---

> diff --git a/testcases/kernel/input/input_helper.c b/testcases/kernel/input/input_helper.c
> index 09530fb..6b60d17 100644
> --- a/testcases/kernel/input/input_helper.c
> +++ b/testcases/kernel/input/input_helper.c
> @@ -40,7 +40,7 @@
>       int ret, fd = -1;
>       unsigned int i;

> -     for (i = 0; i < 100; i++) {
> +     for (i = 0; i < 1024; i++) {
>             snprintf(path, sizeof(path), "/dev/input/event%i", i);


More information about the ltp mailing list