}
run_test 102c "non-root getfattr/setfattr for lustre.lov EAs ==========="
-get_stripe_info() {
- stripe_size=0
- stripe_count=0
- stripe_offset=0
- local lines=`sed -n '/obdidx/=' $1`
- stripe_size=`awk '{if($1~/size/) print $2}' $1`
- stripe_count=`awk '{if($1~/count/) print $2}' $1`
- lines=`expr $lines + 1`
- stripe_offset=`sed -n ${lines}p $1 |awk '{print $1}'`
-}
-
compare_stripe_info1() {
for num in 1 2 3 4
do
do
local size=`expr $STRIPE_SIZE \* $num`
local file=file"$num-$offset-$count"
- local tmp_file=out
- $GETSTRIPE -v $file > $tmp_file
- get_stripe_info $tmp_file
- if test $stripe_size -ne $size
- then
+ get_stripe_info client $file
+ if [ $stripe_size -ne $size ]; then
error "$file: different stripe size" && return
fi
- if test $stripe_count -ne $count
- then
+ if [ $stripe_count -ne $count ]; then
error "$file: different stripe count" && return
fi
- if test $stripe_offset -ne 0
- then
+ if [ $stripe_index -ne 0 ]; then
error "$file: different stripe offset" && return
fi
- rm -f $tmp_file
done
done
done
do
local size=`expr $STRIPE_SIZE \* $num`
local file=file"$num-$offset-$count"
- local tmp_file=out
- $GETSTRIPE -v $file > $tmp_file
- get_stripe_info $tmp_file
- if test $stripe_size -ne $size
- then
+ get_stripe_info client $file
+ if [ $stripe_size -ne $size ]; then
error "$file: different stripe size" && return
fi
- if test $stripe_count -ne $count
- then
+ if [ $stripe_count -ne $count ]; then
error "$file: different stripe count" && return
fi
- if test $stripe_offset -ne $offset
- then
+ if [ $stripe_index -ne $offset ]; then
error "$file: different stripe offset" && return
fi
- rm -f $tmp_file
done
done
done
# Let's make sure that we really have some margin. Client checks
# cached locks every 10 sec.
- SLEEP=$((SLEEP+10))
+ SLEEP=$((SLEEP+20))
log "Sleep ${SLEEP} sec"
local SEC=0
while ((SEC<$SLEEP)); do
test_126() { # bug 12829/13455
[ -z "$(lctl get_param -n llite.*.client_type | grep local)" ] && skip "must run as local client" && return
[ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
+ $GSS && skip "must run as gss disabled" && return
+
$RUNAS -u 0 -g 1 touch $DIR/$tfile || error "touch failed"
gid=`ls -n $DIR/$tfile | awk '{print $4}'`
rm -f $DIR/$tfile
for ls in /proc/fs/lustre/ldlm/namespaces/MGC*/lru_size; do
echo "clear" > $ls
done
- cleanup || error "failed to cleanup"
- setup || error "failed to setup"
+ FAIL_ON_ERROR=true cleanup
+ FAIL_ON_ERROR=true setup
}
run_test 141 "umount should not race with any mgc requeue thread"