public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] input_helper: Modify the check range of the input event number
@ 2024-03-28 23:59 Kogure Akihisa ( 小暮 明久 )
  2024-04-12 13:58 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Kogure Akihisa ( 小暮 明久 ) @ 2024-03-28 23:59 UTC (permalink / raw)
  To: ltp@lists.linux.it

The following commit was set to 1023 for the upper limit of event IDs, so we changed it to check up to 0-1023.
https://github.com/torvalds/linux/commit/7f8d4cad1e4e11a45d02bd6e024cc2812963c38a

---
Changes in v2:
- Changed it to check up to 0-1023.
---
---

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.

---

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);

            fd = open(path, O_RDONLY);



---
Akihisa Kogure
akihisa.kogure.ke@kyocera.jp

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH v2] input_helper: Modify the check range of the input event number
  2024-03-28 23:59 [LTP] [PATCH v2] input_helper: Modify the check range of the input event number Kogure Akihisa ( 小暮 明久 )
@ 2024-04-12 13:58 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2024-04-12 13:58 UTC (permalink / raw)
  To: Kogure Akihisa ( 小暮 明久 )
  Cc: ltp@lists.linux.it

Hi!
The patch looks good, however ti does not apply for a several reasons.

> The following commit was set to 1023 for the upper limit of event IDs, so we changed it to check up to 0-1023.
> https://github.com/torvalds/linux/commit/7f8d4cad1e4e11a45d02bd6e024cc2812963c38a
> 
> ---
> Changes in v2:
> - Changed it to check up to 0-1023.
> ---
> ---

These sequencies of --- actually corrupt the patch, since --- has a
special meaning, it divides the description from the actual changes in
code.

But even when I remove this part of the patch it does not apply because
the patch itself was corrupted by your email client, the tabs \t were
replaced with spaces.

See: https://www.kernel.org/doc/html/next/process/email-clients.html

> 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.

You are missing signed-off-by line here, see:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html?highlight=signed%20off#developer-s-certificate-of-origin-1-1


> ---
> 
> 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);
> 
>             fd = open(path, O_RDONLY);
> 
> 
> 
> ---
> Akihisa Kogure
> akihisa.kogure.ke@kyocera.jp
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-12 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-28 23:59 [LTP] [PATCH v2] input_helper: Modify the check range of the input event number Kogure Akihisa ( 小暮 明久 )
2024-04-12 13:58 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox