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"
74 echo "should be no EAs for foo:"
77 echo "set EA <noise,woof>:"
78 attr -s noise -V woof foo
80 echo "set EA <colour,blue>:"
81 attr -s colour -V blue foo
83 echo "set EA <size,small>:"
84 attr -s size -V small foo
86 echo "list the EAs for foo: noise, colour, size"
89 echo "check the list again for foo"
92 echo "unmount the FS and see if EAs are persistent"
95 echo "check the list again for foo after umount/mount"
98 echo "get the value of the noise EA"
101 echo "get the value of the colour EA which was removed earlier"
104 echo "get the value of the size EA"
107 echo "remove the colour EA on foo"
110 echo "list EAs for foo: noise, size"
113 echo "get the value of the noise EA"
116 echo "get the value of the colour EA which was removed earlier"
119 echo "get the value of the size EA"
122 echo "list all the EAs again: noise, size"
125 echo "change the value of the size EA from small to huge"
126 attr -s size -V huge foo
128 echo "get the size EA which should now have value huge"
131 echo "list EAs: noise, size"
134 echo "remove the size EA from foo"
137 echo "list EAs: noise (size EA has been removed)"
140 echo "get the noise EA: woof"
143 echo "try removing non-existent EA named woof"
146 echo "try removing already removed EA size"
149 echo "list EAs: noise"
152 echo "try removing already removed EA colour"
155 echo "list EAs: noise"
158 echo "remove remaining EA noise"
161 echo "list EAs: should be no EAs left now"
164 echo "unmount the FS and see if EAs are persistent"
167 echo "list EAs: should still be no EAs left"
171 echo "*** Test out the root namespace ***"
174 echo "set EA <root:colour,marone>:"
175 attr -R -s colour -V marone foo
177 echo "set EA <user:colour,beige>:"
178 attr -s colour -V beige foo
180 echo "set EA <user:vomit,pizza>:"
181 attr -s vomit -V pizza foo
183 echo "set EA <root:noise,whack>:"
184 attr -R -s noise -V whack foo
186 echo "list root EAs: <root:colour,noise>:"
189 echo "list user EAs: <user:colour,vomit>:"
192 echo "get root EA colour: marone"
193 attr -R -g colour foo
195 echo "get root EA noise: whack"
198 echo "get root EA vomit which is a user EA => find nothing"
202 echo "unmount the FS and see if EAs are persistent"
206 echo "get root EA colour: marone"
207 attr -R -g colour foo
209 echo "get root EA noise: whack"
212 echo "get user EA vomit: pizza"
215 echo "remove the root colour EA"
216 attr -R -r colour foo
218 echo "list root EAs: <root:noise>:"
221 echo "list user EAs: <user:colour,vomit>:"
224 echo "remove the final root EA noise"
227 echo "list root EAs: none"
233 # Check the filesystem
236 # optional stuff if your test has verbose output to help resolve problems
238 #echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"