Home | History | Annotate | Download | only in r_32to64bit_move_itable
      1 if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
      2 
      3 FSCK_OPT=-fn
      4 OUT=$test_name.log
      5 EXP=$test_dir/expect
      6 CONF=$TMPFILE.conf
      7 
      8 cat > $CONF << ENDL
      9 [fs_types]
     10 	ext4h = {
     11 		features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg
     12 		blocksize = 1024
     13 		inode_size = 256
     14 		make_hugefiles = true
     15 		hugefiles_dir = /
     16 		hugefiles_slack = 0
     17 		hugefiles_name = aaaaa
     18 		hugefiles_digits = 4
     19 		hugefiles_size = 1M
     20 		zero_hugefiles = false
     21 	}
     22 ENDL
     23 
     24 echo "resize2fs test" > $OUT
     25 
     26 MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 786432 >> $OUT 2>&1
     27 rm -rf $CONF
     28 
     29 # dump and check
     30 ($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
     31 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
     32 status=$?
     33 echo Exit status is $status >> $OUT
     34 
     35 # convert it
     36 echo "resize2fs test.img -b" >> $OUT
     37 $RESIZE2FS -b -f $TMPFILE 2>&1 >> $OUT 2>&1
     38 status=$?
     39 echo Exit status is $status >> $OUT
     40 
     41 # dump and check
     42 ($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
     43 echo "Change in FS metadata:" >> $OUT
     44 diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
     45 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
     46 status=$?
     47 echo Exit status is $status >> $OUT
     48 
     49 rm $TMPFILE $OUT.before $OUT.after
     50 
     51 #
     52 # Do the verification
     53 #
     54 
     55 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
     56 mv $OUT.new $OUT
     57 
     58 cmp -s $OUT $EXP
     59 status=$?
     60 
     61 if [ "$status" = 0 ] ; then
     62 	echo "$test_name: $test_description: ok"
     63 	touch $test_name.ok
     64 else
     65 	echo "$test_name: $test_description: failed"
     66 	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
     67 fi
     68 
     69 unset IMAGE FSCK_OPT OUT EXP CONF
     70 
     71 else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
     72 	echo "$test_name: $test_description: skipped"
     73 fi
     74 
     75