ALWAYS_EXCEPT="14b 28 $SANITYN_EXCEPT"
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 16"
+# bug number for skipped test: 12652 12652
+grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11 14" || true
# Tests that fail on uml
[ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
CHECK_GRANT=${CHECK_GRANT:-"yes"}
GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
-if [ $UID -ne 0 ]; then
- RUNAS_ID="$UID"
- RUNAS=""
-else
- RUNAS_ID=${RUNAS_ID:-500}
- RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
-fi
-
SAVE_PWD=$PWD
export NAME=${NAME:-local}
init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16"
+
SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
FAIL_ON_ERROR=false
check_and_setup_lustre
LPROC=/proc/fs/lustre
-LOVNAME=`cat $LPROC/llite/*/lov/common_name | tail -n 1`
-OSTCOUNT=`cat $LPROC/lov/$LOVNAME/numobd`
+LOVNAME=`lctl get_param -n llite.*.lov.common_name | tail -n 1`
+OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd`
rm -rf $DIR1/[df][0-9]* $DIR1/lnk
+# $RUNAS_ID may get set incorrectly somewhere else
+[ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
+
+check_runas_id $RUNAS_ID $RUNAS
+
build_test_filter
test_1a() {
test_16() {
rm -f $MOUNT1/fsxfile
- lfs setstripe $MOUNT1/fsxfile 0 -1 -1 # b=10919
+ lfs setstripe $MOUNT1/fsxfile -c -1 # b=10919
fsx -c 50 -p 100 -N 2500 -l $((SIZE * 256)) -S 0 $MOUNT1/fsxfile $MOUNT2/fsxfile
}
run_test 16 "2500 iterations of dual-mount fsx ================="
run_test 24 "lfs df [-ih] [path] test ========================="
test_25() {
- [ `cat $LPROC/mdc/*-mdc-*/connect_flags | grep -c acl` -lt 2 ] && \
+ [ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] && \
skip "must have acl, skipping" && return
- mkdir $DIR1/$tdir || error "mkdir $DIR1/$tdir"
touch $DIR1/$tdir/f1 || error "touch $DIR1/$tdir/f1"
chmod 0755 $DIR1/$tdir/f1 || error "chmod 0755 $DIR1/$tdir/f1"
sleep 1
dd if=/dev/zero of=$DIR1/$tfile bs=8k conv=notrunc count=1 seek=0
log "dd 3 finished"
- echo > $LPROC/ldlm/dump_namespaces
+ lctl set_param -n ldlm.dump_namespaces ""
wait $DD1_PID $DD2_PID
[ $? -ne 0 ] && lctl dk $TMP/debug || true
}
ECHO_UUID="ECHO_osc1_UUID"
tOST=`$LCTL dl | | awk '/-osc-|OSC.*MNT/ { print $4 }' | head -1`
- lfs setstripe $DIR1/$tfile 1048576 0 2
+ lfs setstripe $DIR1/$tfile -s 1048576 -i 0 -c 2
tOBJID=`lfs getstripe $DIR1/$tfile |grep "^[[:space:]]\+1" |awk '{print $2}'`
dd if=/dev/zero of=$DIR1/$tfile bs=1024k count=2
#run_test 29 "lock put race between glimpse and enqueue ========="
test_30() { #bug #11110
- rm -rf $DIR1/$tdir
- mkdir -p $DIR1/$tdir
cp -f /bin/bash $DIR1/$tdir/bash
/bin/sh -c 'sleep 1; rm -f $DIR2/$tdir/bash; cp /bin/bash $DIR2/$tdir' &
err=$($DIR1/$tdir/bash -c 'sleep 2; openfile -f O_RDONLY /proc/$$/exe >& /dev/null; echo $?')
run_test 30 "recreate file race ========="
+test_31() {
+ mkdir -p $DIR1/$tdir || error "Creating dir $DIR1/$tdir"
+ writes=`LANG=C dd if=/dev/zero of=$DIR/$tdir/$tfile count=1 2>&1 |
+ awk 'BEGIN { FS="+" } /out/ {print $1}'`
+ #define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE 0x314
+ sysctl -w lustre.fail_loc=0x314
+ reads=`LANG=C dd if=$DIR2/$tdir/$tfile of=/dev/null 2>&1 |
+ awk 'BEGIN { FS="+" } /in/ {print $1}'`
+ [ $reads -eq $writes ] || error "read" $reads "blocks, must be" $writes
+}
+run_test 31 "voluntary cancel / blocking ast race=============="
+
log "cleanup: ======================================================"
check_and_cleanup_lustre