diff options
author | akihisa.kogure.ke <akihisa.kogure.ke@kyocera.jp> | 2024-03-21 07:41:49 +0000 |
---|---|---|
committer | akihisa.kogure.ke@kyocera.jp <akihisa.kogure.ke@kyocera.jp> | 2024-03-27 00:55:10 +0000 |
commit | 26a125c969109073ae74a948b3d8e4035cda4f7c (patch) | |
tree | 583cd4d74535872688f1124e3110e17e4c9b5e3d /testcases/kernel/input/input_helper.c | |
parent | 05db7dcf31e169aab2a9bdbcd05925cf32302c48 (diff) | |
download | ltp-26a125c969109073ae74a948b3d8e4035cda4f7c.tar.gz |
input_helper: Modify the check range of the input event number
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.)
Bug: 330269984
Test: ltp
Change-Id: I1b53008b15641fcdccf214af9183de1c29a3309c
Diffstat (limited to 'testcases/kernel/input/input_helper.c')
-rw-r--r-- | testcases/kernel/input/input_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testcases/kernel/input/input_helper.c b/testcases/kernel/input/input_helper.c index 09530fb4d..6b60d1711 100644 --- a/testcases/kernel/input/input_helper.c +++ b/testcases/kernel/input/input_helper.c @@ -40,7 +40,7 @@ static int try_open_device(void) 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); fd = open(path, O_RDONLY); |