aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Shilong <wshilong@ddn.com>2020-09-23 23:58:23 +0800
committerTheodore Ts'o <tytso@mit.edu>2021-01-25 15:19:01 -0500
commit59ae5e5a627aaa24d663e8ce41955e1ded46633a (patch)
tree93788272536b7f7335c31a3a94cc905b8f6254fb
parent3b7879e310d30d5f4c518c607aec830b63b2315b (diff)
downloade2fsprogs-59ae5e5a627aaa24d663e8ce41955e1ded46633a.tar.gz
tests: add pfsck test
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> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--tests/f_multithread_ok/expect.17
-rw-r--r--tests/f_multithread_ok/image.gzbin0 -> 796311 bytes
-rw-r--r--tests/f_multithread_ok/name1
-rw-r--r--tests/f_multithread_ok/script21
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/f_multithread_ok/expect.1 b/tests/f_multithread_ok/expect.1
new file mode 100644
index 000000000..4742f4085
--- /dev/null
+++ b/tests/f_multithread_ok/expect.1
@@ -0,0 +1,7 @@
+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
+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
index 000000000..42622c378
--- /dev/null
+++ b/tests/f_multithread_ok/image.gz
Binary files differ
diff --git a/tests/f_multithread_ok/name b/tests/f_multithread_ok/name
new file mode 100644
index 000000000..45dd561d4
--- /dev/null
+++ b/tests/f_multithread_ok/name
@@ -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
index 000000000..7334cde68
--- /dev/null
+++ b/tests/f_multithread_ok/script
@@ -0,0 +1,21 @@
+FSCK_OPT="-fym4"
+SKIP_VERIFY="true"
+ONE_PASS_ONLY="true"
+SKIP_CLEANUP="true"
+
+. $cmd_dir/run_e2fsck
+
+grep -v Thread $OUT1 > $OUT1.tmp
+cmp -s $EXP1 $OUT1.tmp
+status1=$?
+if [ "$status1" -eq 0 ]; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP1 $OUT1.tmp > $test_name.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