Bug 218924

Summary: UBIFS: fsck: Testing summary
Product: File System Reporter: Zhihao Cheng (chengzhihao1)
Component: OtherAssignee: fs_other
Status: NEW ---    
Severity: normal    
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: 0001-ubifs-Add-corruption-injection-support.patch
generate.sh
inject_corruption.sh
test_bad_image.sh
code coverage all
code coverage common
code coverage fsck

Description Zhihao Cheng 2024-06-01 11:06:50 UTC
Created attachment 306394 [details]
0001-ubifs-Add-corruption-injection-support.patch

All testcases are integrated into mtd-utils, the details can refer to mtd-utils/tests/ubifs_tools-tests/README.txt.

There is one testcase named "fsck_bad_image.sh", the generating method of inconsistent UBIFS image depends on 0001-ubifs-Add-corruption-injection-support.patch. All bad images are generated from the same good image.
generate.sh: generate good image
inject_corruption.sh: inject corruption into the good image
test_bad_image.sh: check the bad image
Comment 1 Zhihao Cheng 2024-06-01 11:07:23 UTC
Created attachment 306395 [details]
generate.sh
Comment 2 Zhihao Cheng 2024-06-01 11:07:42 UTC
Created attachment 306396 [details]
inject_corruption.sh
Comment 3 Zhihao Cheng 2024-06-01 11:07:56 UTC
Created attachment 306397 [details]
test_bad_image.sh
Comment 4 Zhihao Cheng 2024-06-06 01:28:47 UTC
Created attachment 306421 [details]
code coverage all
Comment 5 Zhihao Cheng 2024-06-06 01:29:10 UTC
Created attachment 306422 [details]
code coverage common
Comment 6 Zhihao Cheng 2024-06-06 01:29:29 UTC
Created attachment 306423 [details]
code coverage fsck
Comment 7 Zhihao Cheng 2024-06-06 01:31:41 UTC
Code coverage:
 fsck - Line 87.4%, functions 98.0%
 libubifs - Line 78.4%, functions 89.1%
 mkfs - Line 71.6%, functions 97.8%