Whamcloud - gitweb
create_inode: Find subdirectory in do_write_internal
[tools/e2fsprogs.git] / tests / t_write_subdirectory / script
1 FSCK_OPT=-nf
2
3 $MKE2FS -q -F -o Linux -I 256 -b 4096 $TMPFILE 10000 > $test_name.log 2>&1
4 status=$?
5 if [ "$status" != 0 ] ; then
6         echo "mke2fs failed" > $test_name.failed
7         echo "$test_name: $test_description: failed"
8         return $status
9 fi
10
11 touch $TMPFILE.1
12 cat <<- EOF | $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1
13         mkdir aaa
14         mkdir aaa/bbb
15         write $TMPFILE.1 aaa/bbb/ccc
16 EOF
17 rm -f $TMPFILE.1
18
19 $FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
20 status=$?
21 if [ "$status" = 0 ] ; then
22         echo "$test_name: $test_description: ok"
23         touch $test_name.ok
24 else
25         echo "e2fsck with failed with $status" > $test_name.failed
26         echo "$test_name: $test_description: failed"
27         return $status
28 fi
29 rm -f $TMPFILE