summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-11-26 12:37:41 -0500
committerTheodore Ts'o <tytso@mit.edu>2018-11-26 12:37:41 -0500
commit75da66777937dc16629e4aea0b436e4cffaa866e (patch)
treecf4582374d74ff7c9128c0aa68d43c10a4fb27c5 /tests
parent80c1d01a99a340c4f7bafa9e86971e6633704744 (diff)
parent93accdce51cabf2070206834c140a208c1753c35 (diff)
downloade2fsprogs-75da66777937dc16629e4aea0b436e4cffaa866e.tar.gz
Merge branch 'maint' into next
Diffstat (limited to 'tests')
-rw-r--r--tests/f_inlinedata_flags/expect.126
-rw-r--r--tests/f_inlinedata_flags/expect.27
-rw-r--r--tests/f_inlinedata_flags/image.gzbin0 -> 11226 bytes
-rw-r--r--tests/f_inlinedata_flags/name1
-rw-r--r--tests/t_dangerous/expect29
-rw-r--r--tests/t_dangerous/script33
6 files changed, 85 insertions, 11 deletions
diff --git a/tests/f_inlinedata_flags/expect.1 b/tests/f_inlinedata_flags/expect.1
new file mode 100644
index 00000000..86eba883
--- /dev/null
+++ b/tests/f_inlinedata_flags/expect.1
@@ -0,0 +1,26 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag on filesystem without inline data support.
+Clear? yes
+
+Inode 13 has inline data, but superblock is missing INLINE_DATA feature
+Fix? yes
+
+Pass 2: Checking directory structure
+Entry '1' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (243, counted=244).
+Fix? yes
+
+Free inodes count wrong (243, counted=244).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/256 files (0.0% non-contiguous), 1143/8192 blocks
+Exit status is 1
diff --git a/tests/f_inlinedata_flags/expect.2 b/tests/f_inlinedata_flags/expect.2
new file mode 100644
index 00000000..87b3f18b
--- /dev/null
+++ b/tests/f_inlinedata_flags/expect.2
@@ -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: 12/256 files (0.0% non-contiguous), 1143/8192 blocks
+Exit status is 0
diff --git a/tests/f_inlinedata_flags/image.gz b/tests/f_inlinedata_flags/image.gz
new file mode 100644
index 00000000..4344a0a8
--- /dev/null
+++ b/tests/f_inlinedata_flags/image.gz
Binary files differ
diff --git a/tests/f_inlinedata_flags/name b/tests/f_inlinedata_flags/name
new file mode 100644
index 00000000..66b7676a
--- /dev/null
+++ b/tests/f_inlinedata_flags/name
@@ -0,0 +1 @@
+check incorrect inline_data flags
diff --git a/tests/t_dangerous/expect b/tests/t_dangerous/expect
index a9903b75..31aaf4fa 100644
--- a/tests/t_dangerous/expect
+++ b/tests/t_dangerous/expect
@@ -43,10 +43,6 @@ tune2fs -I 512 test.img
Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
Exit status is 1
-tune2fs -U random test.img
-Setting UUID on a checksummed filesystem could take some time.
-Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
-Exit status is 1
Change in FS metadata:
Pass 1: Checking inodes, blocks, and sizes
@@ -79,7 +75,7 @@ Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) Setting inode size 512
Exit status is 0
tune2fs -U f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0 test.img
-Setting UUID on a checksummed filesystem could take some time.
+Setting the UUID on this filesystem could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) Exit status is 0
Backing up journal inode block information.
@@ -99,3 +95,26 @@ Pass 4: Checking reference counts
Pass 5: Checking group summary information
Exit status is 0
+
+Testing with metadata checksum enabled
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 445 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+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
+
+Exit status is 0
+tune2fs -U random test.img
+Setting the UUID on this filesystem could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
+Exit status is 1
diff --git a/tests/t_dangerous/script b/tests/t_dangerous/script
index b7142188..f684d56d 100644
--- a/tests/t_dangerous/script
+++ b/tests/t_dangerous/script
@@ -17,6 +17,18 @@ cat > $CONF << ENDL
hugefiles_size = 1M
zero_hugefiles = false
}
+ ext4m = {
+ features = has_journal,extent,huge_file,^flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 32M
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
ENDL
echo "tune2fs dangerous prompts test" > $OUT
@@ -62,12 +74,6 @@ echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -I 512 $TMPFILE >> $OUT 2>&1
status=$?
echo Exit status is $status >> $OUT
-# change uuid
-echo "tune2fs -U random test.img" >> $OUT
-echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -U random $TMPFILE >> $OUT 2>&1
-status=$?
-echo Exit status is $status >> $OUT
-
# check
$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
@@ -111,6 +117,21 @@ $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
status=$?
echo Exit status is $status >> $OUT
+echo " " >> $OUT
+echo "Testing with metadata checksum enabled" >> $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4m -U 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf $TMPFILE 524288 >> $OUT 2>&1
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -f -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# change uuid
+echo "tune2fs -U random test.img" >> $OUT
+echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -U random $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
rm $TMPFILE $OUT.before $OUT.after $CONF
#