Whamcloud - gitweb
LU-8465 test: add pfsck test 17/40017/10
authorWang Shilong <wshilong@ddn.com>
Wed, 23 Sep 2020 15:58:23 +0000 (23:58 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 27 Sep 2020 05:22:30 +0000 (05:22 +0000)
pfsck run on a clean fs should not return any errors.

Generate an image with possible features enabled,
especially EA shared blocks etc.

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: Ie61a76729338370a630b5bccf279074286b02b90
Reviewed-on: https://review.whamcloud.com/40017
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
tests/f_multithread_ok/expect.1 [new file with mode: 0644]
tests/f_multithread_ok/image.gz [new file with mode: 0644]
tests/f_multithread_ok/name [new file with mode: 0644]
tests/f_multithread_ok/script [new file with mode: 0644]

diff --git a/tests/f_multithread_ok/expect.1 b/tests/f_multithread_ok/expect.1
new file mode 100644 (file)
index 0000000..4b29332
--- /dev/null
@@ -0,0 +1,8 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Multiple threads triggered to read bitmaps
+test_filesys: 10251/32768 files (0.0% non-contiguous), 2218/131072 blocks
+Exit status is 0
diff --git a/tests/f_multithread_ok/image.gz b/tests/f_multithread_ok/image.gz
new file mode 100644 (file)
index 0000000..42622c3
Binary files /dev/null and b/tests/f_multithread_ok/image.gz differ
diff --git a/tests/f_multithread_ok/name b/tests/f_multithread_ok/name
new file mode 100644 (file)
index 0000000..45dd561
--- /dev/null
@@ -0,0 +1 @@
+multiple threads checking on clean fs
diff --git a/tests/f_multithread_ok/script b/tests/f_multithread_ok/script
new file mode 100644 (file)
index 0000000..4010881
--- /dev/null
@@ -0,0 +1,21 @@
+FSCK_OPT="-fym4"
+SKIP_VERIFY="true"
+ONE_PASS_ONLY="true"
+SKIP_CLEANUP="true"
+
+. $cmd_dir/run_e2fsck
+
+cat $OUT1 | grep -v Thread > $OUT1
+rm -f $test_name.ok $test_name.failed
+cmp -s $OUT1 $EXP1
+status1=$?
+if [ "$status1" -eq 0 ]; then
+       echo "$test_name: $test_description: ok"
+       touch $test_name.ok
+else
+       echo "test_name: $test_description: failed"
+fi
+
+unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 
+unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO