1 if test -x $DEBUGFS_EXE; then
7 TEST_DATA=$test_name.tmp
8 VERIFY_DATA=$test_name.ver.tmp
10 echo "debugfs sort extended attributes" > $OUT
12 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
14 echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
16 $MKE2FS -Fq -b 1024 $TMPFILE 512 > /dev/null 2>&1
18 echo Exit status is $status >> $OUT
20 B=$(mktemp ${TMPDIR:-/tmp}/b.XXXXXX)
22 perl -e 'print "x" x 256;' > $B
24 echo "ea_set -f /tmp/b / security.SMEG64" > $OUT.new
25 $DEBUGFS -w -R "ea_set -f $B / security.SMEG64" $TMPFILE >> $OUT.new 2>&1
27 echo Exit status is $status >> $OUT.new
28 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
30 echo "ea_set -f /tmp/b / security.imb" > $OUT.new
31 $DEBUGFS -w -R "ea_set -f $B / security.imb" $TMPFILE >> $OUT.new 2>&1
33 echo Exit status is $status >> $OUT.new
34 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
36 echo "ea_set / user.moo cow" > $OUT.new
37 $DEBUGFS -w -R "ea_set / user.moo cow" $TMPFILE >> $OUT.new 2>&1
39 echo Exit status is $status >> $OUT.new
40 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
45 echo "ea_list /" > $OUT.new
46 $DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
48 echo Exit status is $status >> $OUT.new
49 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
51 echo "ea_get / security.imb" > $OUT.new
52 $DEBUGFS -w -R "ea_get / security.imb" $TMPFILE >> $OUT.new 2>&1
54 echo Exit status is $status >> $OUT.new
55 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
57 echo "ea_get / security.SMEG64" > $OUT.new
58 $DEBUGFS -w -R "ea_get / security.SMEG64" $TMPFILE >> $OUT.new 2>&1
60 echo Exit status is $status >> $OUT.new
61 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
63 echo "ea_get / nosuchea" > $OUT.new
64 $DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
66 echo Exit status is $status >> $OUT.new
67 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
69 echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
70 $FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
72 echo Exit status is $status >> $OUT.new
73 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
79 rm -f $TMPFILE $OUT.new
83 if [ "$status" = 0 ] ; then
84 echo "$test_name: $test_description: ok"
87 echo "$test_name: $test_description: failed"
88 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
91 unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
93 else #if test -x $DEBUGFS_EXE; then
94 echo "$test_name: $test_description: skipped"