Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: disk write testing
From: Daniel Stenberg (daniel_at_haxx.se)
Date: 2002-10-30


On Wed, 30 Oct 2002, Greg Haerr wrote:

> I was thinking of getting involved with the disk writing code in Rockbox,
> and that perhaps this would be easier to provide quality by implementing it
> in the simulator. What do you think about using a loopback device to a
> large disk file to enable testing? This would be easy to implement and
> would allow a number of FAT32 read/write/create/seek tests to be easily run
> on the desktop.

I'm not 100% sure. And I'll let you know what I mean:

I'm fine with you wanting to join in and play with that fat write code. The
more the merrier.

Björn already wrote the test code to work on a single file that you can
populate and work with fine (like mounting it vfat) on a Linux system since
it lets you use 'dosfsck' and other tools to verify that things work fine.

But, the downside is that it becomes very Linux-specific and it even requires
you to run the test as root as mere users aren't allowed to mount like that.

Personally, I think the way to go is keeping the API identical in the
simulators and in the target and by extending the test suite for the fat code
to test most of everything. And as soon as we figure out a bug anywhere, we
write a test case that repeats it first and then we fix the code and make
sure the test cas works fine.

Of course, perhaps the coolest thing would be if you could optionally build
the simulator to use this FAT filemount or optionally use the good old
approach, since then each developer can chose his favourite.

-- 
Daniel "Bagder" Stenberg -- http://rockbox.haxx.se/



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa