Skip to content

fs-tests: integck: handle write errors

Artem Bityutskiy linux-mtd 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest35 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/35fs-tests: integck: introduce power cut testing argumentstests/fs-tests/integrity/integck.c+25 -60 replies
2/35fs-tests: integck: check deletion errors in rm_minus_rf_dirtests/fs-tests/integrity/integck.c+40 -140 replies
3/35fs-tests: integck: handle write failures in dir_newtests/fs-tests/integrity/integck.c+16 -160 replies
4/35fs-tests: integck: handle errors in remount_tested_fstests/fs-tests/integrity/integck.c+24 -110 replies
5/35fs-tests: integck: handle errors when creating test datatests/fs-tests/integrity/integck.c+71 -430 replies
6/35fs-tests: integck: make more functions propogate error uptests/fs-tests/integrity/integck.c+69 -570 replies
7/35fs-tests: integck: teach file_truncate return error codetests/fs-tests/integrity/integck.c+31 -130 replies
8/35fs-tests: integck: handle errors in file_deletetests/fs-tests/integrity/integck.c+54 -230 replies
9/35fs-tests: integck: handle all failures in operate_on_open_filetests/fs-tests/integrity/integck.c+17 -100 replies
10/35fs-tests: integck: handle errors in file_mmap_writetests/fs-tests/integrity/integck.c+23 -140 replies
11/35fs-tests: integck: teach file_write_data return an errortests/fs-tests/integrity/integck.c+21 -120 replies
12/35fs-tests: integck: rename BUFFER_SIZEtests/fs-tests/integrity/integck.c+29 -300 replies
13/35fs-tests: integck: use unsigned int everywheretests/fs-tests/integrity/integck.c+21 -230 replies
14/35fs-tests: integck: fix placeholders when printingtests/fs-tests/integrity/integck.c+20 -200 replies
15/35fs-tests: integck: make file_new return error on create failuretests/fs-tests/integrity/integck.c+12 -100 replies
16/35fs-tests: integck: teach dir_new return error on creation failuretests/fs-tests/integrity/integck.c+18 -120 replies
17/35fs-tests: integck: teach symlink_new to return error on creation failuretests/fs-tests/integrity/integck.c+17 -60 replies
18/35fs-tests: integck: teach link_new to return error on creation failuretests/fs-tests/integrity/integck.c+13 -80 replies
19/35fs-tests: integck: make operate_on_dir propagate errors uptests/fs-tests/integrity/integck.c+14 -120 replies
20/35fs-tests: integck: make rename_entry return error on failuretests/fs-tests/integrity/integck.c+13 -100 replies
21/35fs-tests: integck: teach symlink_remove return error on removal failuretests/fs-tests/integrity/integck.c+9 -50 replies
22/35fs-tests: integck: teach dir_remove return error and fix a memory leaktests/fs-tests/integrity/integck.c+21 -120 replies
23/35fs-tests: integck: teach file_unlink_file return an errortests/fs-tests/integrity/integck.c+7 -110 replies
24/35fs-tests: integck: make operate_on_entry handle all errorstests/fs-tests/integrity/integck.c+23 -210 replies
25/35fs-tests: integck: make file_open return error on failuretests/fs-tests/integrity/integck.c+15 -150 replies
26/35fs-tests: integck: make file_truncate_file return errortests/fs-tests/integrity/integck.c+24 -110 replies
27/35fs-tests: integck: fix memory lead in dir_removetests/fs-tests/integrity/integck.c+1 -00 replies
28/35fs-tests: integck: fix memory leak in dir_newtests/fs-tests/integrity/integck.c+0 -10 replies
29/35fs-tests: integck: introduce free_writes_info helpertests/fs-tests/integrity/integck.c+24 -260 replies
30/35fs-tests: integck: free raw write informationtests/fs-tests/integrity/integck.c+7 -00 replies
31/35fs-tests: integck: remove symlinks memory leakstests/fs-tests/integrity/integck.c+2 -00 replies
32/35fs-tests: integck: clean up add_dir_entry usagetests/fs-tests/integrity/integck.c+1 -30 replies
33/35fs-tests: integck: lessen memory consumptiontests/fs-tests/integrity/integck.c+8 -100 replies
34/35fs-tests: integck: lessen memory consumption even moretests/fs-tests/integrity/integck.c+6 -110 replies
35/35fs-tests: integck: assume that the parent is present in new_dirtests/fs-tests/integrity/integck.c+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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.