Unit test for cfi_cmdset_0001.c

Josh Boyer jdub at us.ibm.com
Thu Jan 27 21:16:29 EST 2005


On Thu, 2005-01-27 at 17:20 -0800, Jared Hulbert wrote:
> I plan on creating a unit test based on cutest.sourceforge.net for
> cfi_cmdset_0001.c.

How feasible is a framework like that for things that deal with
hardware?  Are you planning on emulating flash chips somehow?

> In order to stub out the various functions inside I will have to:
> 
> 1. Manually strip out functions for each version.

Not sure what you mean.  Could be partially due to my ignorance of
cuTest, so bear with me :).

> 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. 

Maybe an example of what you intend here?

> But I want to know which option is more "commitable."   Of course the
> test be made availiable, I would hope we can get the tests commited
> too.  CuTest is zlib licenced.  Is that a problem?
> 
> 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.
> 
> Thoughts, flames, jokes?

I'm all for a test suite for MTD/JFFS[23].  Maybe cuTest could help,
maybe not.  Artem has a NAND flash simulator.  Maybe that would help
testing as well.

josh





More information about the linux-mtd mailing list