* [PATCH] Input: tests - fix input_test_match_device_id test
@ 2023-05-03 20:49 Dmitry Torokhov
  2023-05-03 21:55 ` Javier Martinez Canillas
  2023-05-04  6:51 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2023-05-03 20:49 UTC (permalink / raw)
  To: linux-input; +Cc: Javier Martinez Canillas, Geert Uytterhoeven, linux-kernel
Properly initialize input_device_id structure in
input_test_match_device_id test to make sure it contains no garbage
causing the test to randomly fail.
Fixes: fdefcbdd6f36 ("Input: Add KUnit tests for some of the input core helper functions")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/tests/input_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/tests/input_test.c b/drivers/input/tests/input_test.c
index 8b8ac3412a70..0540225f0288 100644
--- a/drivers/input/tests/input_test.c
+++ b/drivers/input/tests/input_test.c
@@ -87,7 +87,7 @@ static void input_test_timestamp(struct kunit *test)
 static void input_test_match_device_id(struct kunit *test)
 {
 	struct input_dev *input_dev = test->priv;
-	struct input_device_id id;
+	struct input_device_id id = { 0 };
 
 	/*
 	 * Must match when the input device bus, vendor, product, version
-- 
2.40.1.495.gc816e09b53d-goog
-- 
Dmitry
^ permalink raw reply related	[flat|nested] 3+ messages in thread- * Re: [PATCH] Input: tests - fix input_test_match_device_id test
  2023-05-03 20:49 [PATCH] Input: tests - fix input_test_match_device_id test Dmitry Torokhov
@ 2023-05-03 21:55 ` Javier Martinez Canillas
  2023-05-04  6:51 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-05-03 21:55 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: Geert Uytterhoeven, linux-kernel
Dmitry Torokhov <dmitry.torokhov@gmail.com> writes:
Hello Dmitry,
> Properly initialize input_device_id structure in
> input_test_match_device_id test to make sure it contains no garbage
> causing the test to randomly fail.
>
> Fixes: fdefcbdd6f36 ("Input: Add KUnit tests for some of the input core helper functions")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
Thanks a lot for fixing this!
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
-- 
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply	[flat|nested] 3+ messages in thread
- * Re: [PATCH] Input: tests - fix input_test_match_device_id test
  2023-05-03 20:49 [PATCH] Input: tests - fix input_test_match_device_id test Dmitry Torokhov
  2023-05-03 21:55 ` Javier Martinez Canillas
@ 2023-05-04  6:51 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-05-04  6:51 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Javier Martinez Canillas, linux-kernel
On Wed, May 3, 2023 at 10:49 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Properly initialize input_device_id structure in
> input_test_match_device_id test to make sure it contains no garbage
> causing the test to randomly fail.
>
> Fixes: fdefcbdd6f36 ("Input: Add KUnit tests for some of the input core helper functions")
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
                        Geert
-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
^ permalink raw reply	[flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-04  6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 20:49 [PATCH] Input: tests - fix input_test_match_device_id test Dmitry Torokhov
2023-05-03 21:55 ` Javier Martinez Canillas
2023-05-04  6:51 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).