blob: e762ad4eef8e03bc72e1154140b4e853f0074fc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
test_description="disable csum seed via tune2fs"
trap "rm -f $TMPFILE $TMPFILE.conf" EXIT INT QUIT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
OUT=$test_name.log
EXP=$test_dir/expect
rm -f $OUT
# Test command line option
echo "create fs without csum_seed" >> $OUT
$MKE2FS -o Linux -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1
$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
echo "turn on csum_seed" >> $OUT
$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1
$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
echo "check filesystem" >> $OUT
$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
echo "fsck returns $?" >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
echo "turn off csum_seed" >> $OUT
$TUNE2FS -O ^metadata_csum_seed $TMPFILE > /dev/null 2>&1
$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
echo "check filesystem" >> $OUT
$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1
echo "fsck returns $?" >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT
cmp -s $OUT $EXP
status=$?
if [ "$status" = 0 ] ; then
echo "$test_name: $test_description: ok"
touch $test_name.ok
else
echo "$test_name: $test_description: failed"
diff $DIFF_OPTS $EXP $OUT > $test_name.failed
rm -f $test_name.tmp
fi
|