lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ