Home | History | Annotate | Download | only in m_devdir
      1 if test -x $DEBUGFS_EXE; then
      2 
      3 test_description="create fs image from /dev"
      4 MKFS_DIR=/dev
      5 OUT=$test_name.log
      6 
      7 $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT 2>&1
      8 mkfs_status=$?
      9 
     10 $DUMPE2FS $TMPFILE >> $OUT 2>&1
     11 $DEBUGFS -R 'ls /' $TMPFILE >> $OUT 2>&1
     12 
     13 $FSCK -f -n $TMPFILE >> $OUT 2>&1
     14 fsck_status=$?
     15 
     16 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp
     17 mv $OUT.tmp $OUT
     18 
     19 if [ $mkfs_status -ne 0 ]; then
     20 	echo "$test_name: $test_description: skipped"
     21 elif [ $mkfs_status -eq 0 ] && [ $fsck_status -eq 0 ]; then
     22 	echo "$test_name: $test_description: ok"
     23 	touch $test_name.ok
     24 else
     25         echo "$test_name: $test_description: failed"
     26 fi
     27 
     28 rm -rf $TMPFILE.cmd $OUT.sed
     29 unset MKFS_DIR OUT EXP
     30 
     31 else #if test -x $DEBUGFS_EXE; then
     32 	echo "$test_name: $test_description: skipped"
     33 fi
     34