[PATCH 00/35] fs-tests: integck: handle write errors

Artem Bityutskiy dedekind1 at gmail.com
Wed Apr 20 06:18:33 EDT 2011


Hi,

this is the continuation of my effort to improve integck. This series
of patches teaches integck to not die immediately when a write error
happens.

Currently integck exits if any unexpected error occurs. However, I am
going to make it usable for power-cut emulation testing, so when UBI
decides to emulate a power-cut and all write operation will return with
EROFS error, the test will also exit. So this patch-set teaches all
functions which do FS modifications to return an error up to the caller
if the operation fails. Then the error propagated to the main() function,
which currently just exits. But the plan is:

1. Make 'main()' unmount UBIFS, detach UBI, attach UBI back, mount UBIFS back.
2. Go through all files which were synchronized before the emulated power
   cut and check that the contents of these file is correct.
3. Restart the test.

And then the plan is to implement unstable bits emulation in UBI and run
this test, and catch bugs, and fix this.

So, this is just a preparation. The integck code is a bit dirty and was
written using "quick programming" approach. This patch-set tries to also
clean up the code a little bit.

Additionally, this patch-set fixes the huge amount of memory leaks the
test has had, and also lessens the memory consumption.

And finally, I tried to split the patches nicely, but I do not have much
time so the split is far far not ideal. I think it is good enough, though,
taking into account that there are only 2 users of this test I know.

Artem.



More information about the linux-mtd mailing list