[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87v8gp92u0.fsf@minerva.mail-host-address-is-not-set>
Date: Thu, 18 May 2023 15:38:47 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Dana Elfassy <delfassy@...hat.com>, eballetb@...hat.com,
dmitry.torokhov@...il.com, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Dana Elfassy <dangel101@...il.com>
Subject: Re: [PATCH v2] Input: tests: add test to cover all
input_grab_device() function
Dana Elfassy <delfassy@...hat.com> writes:
Hello Dana,
> Currently input_grab_device() isn't covered by any tests
> Thus, adding a test to cover the cases:
> 1. The device is grabbed successfully
> 2. Trying to grab a device that is already grabbed by another input
> handle
>
> Signed-off-by: Dana Elfassy <dangel101@...il.com>
> Tested-by: Javier Martinez Canillas <javierm@...hat.com>
> Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>
> ---
[...]
> +
> + handle.dev = input_get_device(input_dev);
> + handle.name = dev_name(&input_dev->dev);
> + handle.handler = &handler;
> + res = input_grab_device(&handle);
Another thing I noticed is that your test will try to grab the same
input_handle twice. So you need to remove the line above I believe.
> + KUNIT_ASSERT_TRUE(test, input_grab_device(&handle));
> +
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
Powered by blists - more mailing lists