2 # FS QA Test No. 097. Modifed from UDFQA test 033.
4 # simple attr tests for EAs:
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
13 #-----------------------------------------------------------------------
19 echo "QA output created by $seq"
23 status=1 # failure is the default!
25 trap "_cleanup; exit \$status" 0 1 2 3 15
38 if [ "$FSTYP" == "xfs" ]; then
47 # get standard environment, filters and checks
51 # link correct .out file
52 # This is done bacause udf and xfs print attrs in different orders.
54 if [ "$FSTYP" == "xfs" ]; then
55 ln -s $seq.out.xfs $seq.out
57 ln -s $seq.out.udf $seq.out
60 # real QA test starts here
67 TARGET_DIR=$SCRATCH_MNT
68 [ "$FSTYP" == "xfs" ] && TARGET_DIR=$TEST_DIR
71 echo "create file foo"
75 echo "should be no EAs for foo:"
78 echo "set EA <noise,woof>:"
79 attr -s noise -V woof foo
81 echo "set EA <colour,blue>:"
82 attr -s colour -V blue foo
84 echo "set EA <size,small>:"
85 attr -s size -V small foo
87 echo "list the EAs for foo: noise, colour, size"
90 echo "check the list again for foo"
93 echo "unmount the FS and see if EAs are persistent"
96 echo "check the list again for foo after umount/mount"
99 echo "get the value of the noise EA"
102 echo "get the value of the colour EA which was removed earlier"
105 echo "get the value of the size EA"
108 echo "remove the colour EA on foo"
111 echo "list EAs for foo: noise, size"
114 echo "get the value of the noise EA"
117 echo "get the value of the colour EA which was removed earlier"
120 echo "get the value of the size EA"
123 echo "list all the EAs again: noise, size"
126 echo "change the value of the size EA from small to huge"
127 attr -s size -V huge foo
129 echo "get the size EA which should now have value huge"
132 echo "list EAs: noise, size"
135 echo "remove the size EA from foo"
138 echo "list EAs: noise (size EA has been removed)"
141 echo "get the noise EA: woof"
144 echo "try removing non-existent EA named woof"
147 echo "try removing already removed EA size"
150 echo "list EAs: noise"
153 echo "try removing already removed EA colour"
156 echo "list EAs: noise"
159 echo "remove remaining EA noise"
162 echo "list EAs: should be no EAs left now"
165 echo "unmount the FS and see if EAs are persistent"
168 echo "list EAs: should still be no EAs left"
172 echo "*** Test out the root namespace ***"
175 echo "set EA <root:colour,marone>:"
176 attr -R -s colour -V marone foo
178 echo "set EA <user:colour,beige>:"
179 attr -s colour -V beige foo
181 echo "set EA <user:vomit,pizza>:"
182 attr -s vomit -V pizza foo
184 echo "set EA <root:noise,whack>:"
185 attr -R -s noise -V whack foo
187 echo "list root EAs: <root:colour,noise>:"
190 echo "list user EAs: <user:colour,vomit>:"
193 echo "get root EA colour: marone"
194 attr -R -g colour foo
196 echo "get root EA noise: whack"
199 echo "get root EA vomit which is a user EA => find nothing"
203 echo "unmount the FS and see if EAs are persistent"
207 echo "get root EA colour: marone"
208 attr -R -g colour foo
210 echo "get root EA noise: whack"
213 echo "get user EA vomit: pizza"
216 echo "remove the root colour EA"
217 attr -R -r colour foo
219 echo "list root EAs: <root:noise>:"
222 echo "list user EAs: <user:colour,vomit>:"
225 echo "remove the final root EA noise"
228 echo "list root EAs: none"
234 # Check the filesystem
237 # optional stuff if your test has verbose output to help resolve problems
239 #echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"