Home | History | Annotate | Download | only in t_project_1on
      1 FSCK_OPT=-yf
      2 
      3 if [ "$QUOTA" != "y" ]; then
      4 	echo "$test_name: $test_description: skipped"
      5 	return 0
      6 fi
      7 
      8 $MKE2FS -q -F -o Linux -I 256 -b 4096 $TMPFILE 10000 > $test_name.log 2>&1
      9 status=$?
     10 if [ "$status" != 0 ] ; then
     11 	echo "mke2fs failed" > $test_name.failed
     12 	echo "$test_name: $test_description: failed"
     13 	return $status
     14 fi
     15 
     16 dd if=/dev/zero of=$TMPFILE.2 bs=1048576 count=1 >> $test_name.log 2>&1
     17 cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1
     18 	write $TMPFILE.2 file1
     19 	set_inode_field file1 projid 500
     20 EOF
     21 rm -f $TMPFILE.2
     22 
     23 $TUNE2FS -O project $TMPFILE >> $test_name.log 2>&1
     24 status=$?
     25 if [ "$status" != 0 ] ; then
     26 	echo "tune2fs -O project failed with $status" > $test_name.failed
     27 	echo "$test_name: $test_description: failed"
     28 	return $status
     29 fi
     30 
     31 $FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
     32 status=$?
     33 if [ "$status" = 0 ] ; then
     34 	echo "$test_name: $test_description: ok"
     35 	touch $test_name.ok
     36 else
     37 	echo "e2fsck with project enabled failed with $status" > $test_name.failed
     38 	echo "$test_name: $test_description: failed"
     39 	return $status
     40 fi
     41 rm -f $TMPFILE
     42