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] [thread-next>] [day] [month] [year] [list]
Message-ID: <53C2A9E1.2080807@roeck-us.net>
Date:	Sun, 13 Jul 2014 08:46:41 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Jean Delvare <jdelvare@...e.de>
CC:	Wolfram Sang <wsa@...-dreams.de>,
	Randy Dunlap <rdunlap@...radead.org>,
	linux-i2c@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] i2c: stub: Add support for SMBus block commands

On 07/13/2014 08:13 AM, Jean Delvare wrote:
> On Sun, 13 Jul 2014 08:04:54 -0700, Guenter Roeck wrote:
>> On 07/13/2014 12:21 AM, Jean Delvare wrote:
>>> Hi Guenter,
>>>
>>> On Sat, 12 Jul 2014 08:05:49 -0700, Guenter Roeck wrote:
>>>> Any idea how we could inject errors ? Error path testing would be quite useful.
>>>
>>> Good idea. This should probably be done with a sysfs attribute so that
>>> it can be turned on and off as desired. Off by default, of course. Some
>>> other subsystems already support error injection, you could check how
>>> they are doing it, do that we do not diverge needlessly.
>>>
>>> Do you think there is any value in failing with different error codes,
>>> or just -EIO is enough?
>>
>> How about writing the error code to return into the attribute ?
>> Write anything negative, and it is returned as error. Write 0,
>> and the driver works as normal.
>
> This is smart, I like it :)
>
>>> Do you think it should fail all the time when error injection is
>>> enabled, or is there a value in having only a certain % of commands
>>> fail?
>>
>> For my purposes I would want it to fail reliably. We could add some fanciness,
>> though: Provide a second attribute which specifies how many operations should
>> pass before the first failure.
>
> Let's start simple and just implement what you need.
>

I would actually benefit from both. The ability to return an error unconditionally
lets me test the first error path. The ability to return an error starting with the
n-th transfer lets me test the n-th error path.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ