mbox series

[mtd-utils,00/11] tests: Add new testcases for ubifs_repair

Message ID 20231228013639.2827205-1-chengzhihao1@huawei.com
Headers show
Series tests: Add new testcases for ubifs_repair | expand

Message

Zhihao Cheng Dec. 28, 2023, 1:36 a.m. UTC
This patchset add new testcases for UBIFS repair.
Detailed testcases are explained in tests/ubifs_repair-tests/README.txt.

After testing(fs/ubifs/repair.c):
Kernel code coverage: 90%
kernel function coverage: 100%

Zhihao Cheng (11):
  tests: Add common libs for ubifs_repair test
  tests: ubifs_repair: Add authentication refusing test
  tests: ubifs_repair: Add cycle mount+repair test
  tests: ubifs_repair: Add powercut+repair+mount test
  tests: ubifs_repair: Add corrupt+repair+fault_inject test
  tests: ubifs_repair: Add cycle_powercut+repair test
  tests: ubifs_repair: Add random_corrupt+repair test
  tests: ubifs_repair: Add corrupted images
  tests: ubifs_repair: Add bad images repairing test
  tests: ubifs_repair: Add run_all script
  tests: ubifs_repair: Add README

 .gitignore                                         |   9 +
 Makefile.am                                        |   2 +
 configure.ac                                       |  11 +-
 tests/ubifs_repair-tests/Makemodule.am             |  52 +++
 tests/ubifs_repair-tests/README.txt                | 233 ++++++++++++++
 tests/ubifs_repair-tests/images/dentry_key.gz      | Bin 0 -> 5377 bytes
 tests/ubifs_repair-tests/images/dentry_nlen.gz     | Bin 0 -> 5386 bytes
 tests/ubifs_repair-tests/images/dentry_type.gz     | Bin 0 -> 5384 bytes
 tests/ubifs_repair-tests/images/dir_lost.gz        | Bin 0 -> 5381 bytes
 tests/ubifs_repair-tests/images/good.gz            | Bin 0 -> 5251 bytes
 tests/ubifs_repair-tests/images/inode_data.gz      | Bin 0 -> 5297 bytes
 tests/ubifs_repair-tests/images/inode_mode.gz      | Bin 0 -> 5383 bytes
 tests/ubifs_repair-tests/images/inode_nlink.gz     | Bin 0 -> 5383 bytes
 tests/ubifs_repair-tests/images/inode_size.gz      | Bin 0 -> 5384 bytes
 tests/ubifs_repair-tests/images/inode_xcnt.gz      | Bin 0 -> 5388 bytes
 tests/ubifs_repair-tests/images/log.gz             | Bin 0 -> 5232 bytes
 tests/ubifs_repair-tests/images/lpt_dirty.gz       | Bin 0 -> 5360 bytes
 tests/ubifs_repair-tests/images/lpt_flags.gz       | Bin 0 -> 5361 bytes
 tests/ubifs_repair-tests/images/lpt_free.gz        | Bin 0 -> 5350 bytes
 tests/ubifs_repair-tests/images/lpt_pos.gz         | Bin 0 -> 5374 bytes
 .../images/master_highest_inum.gz                  | Bin 0 -> 5034 bytes
 tests/ubifs_repair-tests/images/master_lpt.gz      | Bin 0 -> 5035 bytes
 tests/ubifs_repair-tests/images/master_tnc.gz      | Bin 0 -> 5024 bytes
 .../ubifs_repair-tests/images/master_total_dead.gz | Bin 0 -> 5033 bytes
 .../images/master_total_dirty.gz                   | Bin 0 -> 5032 bytes
 .../ubifs_repair-tests/images/master_total_free.gz | Bin 0 -> 5030 bytes
 tests/ubifs_repair-tests/images/root_dir.gz        | Bin 0 -> 1298 bytes
 tests/ubifs_repair-tests/images/sb_fanout.gz       | Bin 0 -> 5322 bytes
 tests/ubifs_repair-tests/images/sb_fmt_version.gz  | Bin 0 -> 5326 bytes
 tests/ubifs_repair-tests/images/sb_leb_size.gz     | Bin 0 -> 5324 bytes
 tests/ubifs_repair-tests/images/sb_log_lebs.gz     | Bin 0 -> 5323 bytes
 tests/ubifs_repair-tests/images/sb_min_io_size.gz  | Bin 0 -> 5328 bytes
 .../images/soft_link_data_len.gz                   | Bin 0 -> 5389 bytes
 tests/ubifs_repair-tests/images/tnc_lv0_key.gz     | Bin 0 -> 5414 bytes
 tests/ubifs_repair-tests/images/tnc_lv0_len.gz     | Bin 0 -> 5420 bytes
 tests/ubifs_repair-tests/images/tnc_lv0_pos.gz     | Bin 0 -> 5404 bytes
 tests/ubifs_repair-tests/images/tnc_noleaf_key.gz  | Bin 0 -> 5430 bytes
 tests/ubifs_repair-tests/images/tnc_noleaf_len.gz  | Bin 0 -> 5437 bytes
 tests/ubifs_repair-tests/images/tnc_noleaf_pos.gz  | Bin 0 -> 5418 bytes
 tests/ubifs_repair-tests/images/xentry_key.gz      | Bin 0 -> 5378 bytes
 tests/ubifs_repair-tests/images/xentry_nlen.gz     | Bin 0 -> 5386 bytes
 tests/ubifs_repair-tests/images/xentry_type.gz     | Bin 0 -> 5386 bytes
 tests/ubifs_repair-tests/images/xinode_flags.gz    | Bin 0 -> 5384 bytes
 tests/ubifs_repair-tests/images/xinode_key.gz      | Bin 0 -> 5383 bytes
 tests/ubifs_repair-tests/images/xinode_mode.gz     | Bin 0 -> 5386 bytes
 tests/ubifs_repair-tests/lib/common.sh.in          | 347 +++++++++++++++++++++
 .../tests/authentication_refuse.sh.in              |  69 ++++
 .../cycle_corrupted_repair_fault_inject.sh.in      | 233 ++++++++++++++
 .../tests/cycle_mount_repair_check.sh.in           | 177 +++++++++++
 .../tests/cycle_powercut_mount_repair.sh.in        | 132 ++++++++
 .../tests/powercut_repair_mount.sh.in              | 138 ++++++++
 .../tests/random_corrupted_repair.sh.in            | 205 ++++++++++++
 .../tests/repair_bad_image.sh.in                   | 274 ++++++++++++++++
 .../ubifs_repair-tests/ubifs_repair_run_all.sh.in  |  59 ++++
 54 files changed, 1940 insertions(+), 1 deletion(-)
 create mode 100644 tests/ubifs_repair-tests/Makemodule.am
 create mode 100644 tests/ubifs_repair-tests/README.txt
 create mode 100644 tests/ubifs_repair-tests/images/dentry_key.gz
 create mode 100644 tests/ubifs_repair-tests/images/dentry_nlen.gz
 create mode 100644 tests/ubifs_repair-tests/images/dentry_type.gz
 create mode 100644 tests/ubifs_repair-tests/images/dir_lost.gz
 create mode 100644 tests/ubifs_repair-tests/images/good.gz
 create mode 100644 tests/ubifs_repair-tests/images/inode_data.gz
 create mode 100644 tests/ubifs_repair-tests/images/inode_mode.gz
 create mode 100644 tests/ubifs_repair-tests/images/inode_nlink.gz
 create mode 100644 tests/ubifs_repair-tests/images/inode_size.gz
 create mode 100644 tests/ubifs_repair-tests/images/inode_xcnt.gz
 create mode 100644 tests/ubifs_repair-tests/images/log.gz
 create mode 100644 tests/ubifs_repair-tests/images/lpt_dirty.gz
 create mode 100644 tests/ubifs_repair-tests/images/lpt_flags.gz
 create mode 100644 tests/ubifs_repair-tests/images/lpt_free.gz
 create mode 100644 tests/ubifs_repair-tests/images/lpt_pos.gz
 create mode 100644 tests/ubifs_repair-tests/images/master_highest_inum.gz
 create mode 100644 tests/ubifs_repair-tests/images/master_lpt.gz
 create mode 100644 tests/ubifs_repair-tests/images/master_tnc.gz
 create mode 100644 tests/ubifs_repair-tests/images/master_total_dead.gz
 create mode 100644 tests/ubifs_repair-tests/images/master_total_dirty.gz
 create mode 100644 tests/ubifs_repair-tests/images/master_total_free.gz
 create mode 100644 tests/ubifs_repair-tests/images/root_dir.gz
 create mode 100644 tests/ubifs_repair-tests/images/sb_fanout.gz
 create mode 100644 tests/ubifs_repair-tests/images/sb_fmt_version.gz
 create mode 100644 tests/ubifs_repair-tests/images/sb_leb_size.gz
 create mode 100644 tests/ubifs_repair-tests/images/sb_log_lebs.gz
 create mode 100644 tests/ubifs_repair-tests/images/sb_min_io_size.gz
 create mode 100644 tests/ubifs_repair-tests/images/soft_link_data_len.gz
 create mode 100644 tests/ubifs_repair-tests/images/tnc_lv0_key.gz
 create mode 100644 tests/ubifs_repair-tests/images/tnc_lv0_len.gz
 create mode 100644 tests/ubifs_repair-tests/images/tnc_lv0_pos.gz
 create mode 100644 tests/ubifs_repair-tests/images/tnc_noleaf_key.gz
 create mode 100644 tests/ubifs_repair-tests/images/tnc_noleaf_len.gz
 create mode 100644 tests/ubifs_repair-tests/images/tnc_noleaf_pos.gz
 create mode 100644 tests/ubifs_repair-tests/images/xentry_key.gz
 create mode 100644 tests/ubifs_repair-tests/images/xentry_nlen.gz
 create mode 100644 tests/ubifs_repair-tests/images/xentry_type.gz
 create mode 100644 tests/ubifs_repair-tests/images/xinode_flags.gz
 create mode 100644 tests/ubifs_repair-tests/images/xinode_key.gz
 create mode 100644 tests/ubifs_repair-tests/images/xinode_mode.gz
 create mode 100755 tests/ubifs_repair-tests/lib/common.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/authentication_refuse.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/cycle_corrupted_repair_fault_inject.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/cycle_mount_repair_check.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/cycle_powercut_mount_repair.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/powercut_repair_mount.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/random_corrupted_repair.sh.in
 create mode 100755 tests/ubifs_repair-tests/tests/repair_bad_image.sh.in
 create mode 100755 tests/ubifs_repair-tests/ubifs_repair_run_all.sh.in