1 test_description="decode and print Access Control Lists in debugfs"
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)"
12 MKFS_DIR=$(mktemp -d ./$test_name-XXXXXX.tmp)
16 mkdir $MKFS_DIR/acl_dir
18 setfacl --restore=- <<EOF
19 # file: $MKFS_DIR/acl_dir
32 if ! getfattr -d -m - $MKFS_DIR/acl_dir | grep -q posix_acl; then
33 echo "$test_name: $test_description: skipped (no posix_acl xattrs)"
38 $MKE2FS -q -F -o Linux -T ext4 -b 1024 -d $MKFS_DIR $TMPFILE 16384 > $OUT.new 2>&1
40 $DEBUGFS -w -R "ea_list /acl_dir" $TMPFILE >> $OUT.new 2>&1
41 sed -f $cmd_dir/filter.sed $OUT.new > $OUT
42 rm -rf $MKFS_DIR $TMPFILE $OUT.new
47 if [ "$status" = 0 ] ; then
48 echo "$test_name: $test_description: ok"
51 echo "$test_name: $test_description: failed"
52 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
55 unset MKFS_DIR OUT EXP