1 test_description="create fs image from dir using inline_data and acls"
2 if ! test -x $DEBUGFS_EXE; then
3 echo "$test_name: $test_description: skipped (no debugfs)"
7 if ! setfacl --help > /dev/null 2>&1 ; then
8 echo "$test_name: $test_description: skipped (no setfacl)"
13 if [ "$os" = "GNU" ]; then
14 # requires Posix ACL support
15 echo "$test_name: $test_description: skipped for $os"
25 touch $MKFS_DIR/emptyfile
26 dd if=/dev/zero bs=1024 count=32 2> /dev/null | tr '\0' 'a' > $MKFS_DIR/bigfile
27 echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1024 2> /dev/null
28 echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=524288 conv=notrunc 2> /dev/null
29 echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1048576 conv=notrunc 2> /dev/null
30 echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=536870912 conv=notrunc 2> /dev/null
31 echo "M" | dd of=$MKFS_DIR/sparsefile bs=1 count=1 seek=1073741824 conv=notrunc 2> /dev/null
32 dd if=/dev/zero of=$MKFS_DIR/bigzerofile bs=1 count=1 seek=1073741824 2> /dev/null
33 ln $MKFS_DIR/bigzerofile $MKFS_DIR/bigzerofile_hardlink
34 ln -s /silly_bs_link $MKFS_DIR/silly_bs_link
35 mkdir $MKFS_DIR/emptydir
37 echo "Test me" > $MKFS_DIR/dir/file
38 mkdir $MKFS_DIR/acl_dir
39 echo "Test me 2" > $MKFS_DIR/acl_dir/file
41 setfacl --restore=- <<EOF
42 # file: $MKFS_DIR/acl_dir
54 setfacl --restore=- <<EOF
55 # file: $MKFS_DIR/acl_dir/file
63 $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,inline_data,64bit -E lazy_itable_init=1 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT 2>&1
65 $DUMPE2FS $TMPFILE >> $OUT 2>&1
66 cat > $TMPFILE.cmd << ENDL
78 $DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep "(stat|Size:|Type:)" >> $OUT
80 cat > $TMPFILE.cmd << ENDL
85 $DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT 2>&1
87 $FSCK -f -n $TMPFILE >> $OUT 2>&1
89 sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp
96 if [ "$status" = 0 ] ; then
97 echo "$test_name: $test_description: ok"
100 echo "$test_name: $test_description: failed"
101 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
104 rm -rf $TMPFILE.cmd $MKFS_DIR
105 unset MKFS_DIR OUT EXP