Unit test for cfi_cmdset_0001.c
Eric W. Biederman
ebiederman at lnxi.com
Fri Jan 28 01:11:02 EST 2005
Jared Hulbert <jaredeh at gmail.com> writes:
> I plan on creating a unit test based on cutest.sourceforge.net for
> cfi_cmdset_0001.c.
> In order to stub out the various functions inside I will have to:
>
> 1. Manually strip out functions for each version.
> 2. Add #if''s
> 3. fork this file into 2-3 files.
>
> I prefer option 3. As it seems cleaner to me and more maintainable.
Why would you even need to split the file into multiple pieces to
provide test wrappers? cutest does not seem to add that requirement.
I'm not certain what value cutest actually provides. A test harness
that would require the source file to be split into multiple pieces
seems to indicate a flaw in the test harness.
> The reason for the unit tests is to help us find bugs in the code
> paths not easily tested and to enable more rapid updates for new flash
> or features mtd doesn't currently support.
The hardest code paths to test are code paths for hardware that
is usable but not quite right. How do you plan on testing that?
Which features for flash chips are you thinking about supporting that
are not currently supported?
Eric
More information about the linux-mtd
mailing list