init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+# also long tests: 19, 21a, 21e, 21f, 23, 27
+# 1 2.5 4 4 (min)"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26b 50 51 57"
+
build_test_filter
# Allow us to override the setup if we already have a mounted system by
CLEANUP=${CLEANUP:-""}
cleanup_and_setup_lustre
-rm -rf $DIR/${TESTSUITE}/[df][0-9]* # bug 13798 new t-f tdir staff
rm -rf $DIR/[df][0-9]*
test_1() {
pgcache_empty || return 1
# 1 stripe on ost2
- lfs setstripe $f $((128 * 1024)) 1 1
+ lfs setstripe $f -s $((128 * 1024)) -i 1 -c 1
do_facet client cp /etc/termcap $f
sync
pgcache_empty || return 1
# shouldn't have to set stripe size of count==1
- lfs setstripe $f $((128 * 1024)) 0 1
- lfs setstripe $f2 $((128 * 1024)) 0 1
+ lfs setstripe $f -s $((128 * 1024)) -i 0 -c 1
+ lfs setstripe $f2 -s $((128 * 1024)) -i 0 -c 1
do_facet client cp /etc/termcap $f
sync
test_59() { # bug 10589
zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2"
+ echo $DIR2 | grep -q $MOUNT2 || error "DIR2 is not set properly: $DIR2"
#define OBD_FAIL_LDLM_CANCEL_EVICT_RACE 0x311
sysctl -w lustre.fail_loc=0x311
- writes=`dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1 | awk 'BEGIN { FS="+" } /out/ {print $1}'`
+ writes=$(LANG=C dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1)
+ [ $? = 0 ] || error "dd write failed"
+ writes=$(echo $writes | awk -F '+' '/out/ {print $1}')
sysctl -w lustre.fail_loc=0
sync
- zconf_umount `hostname` $DIR2 -f
- reads=`dd if=$DIR/$tfile of=/dev/null 2>&1 | awk 'BEGIN { FS="+" } /in/ {print $1}'`
- [ $reads -eq $writes ] || error "read" $reads "blocks, must be" $writes
+ zconf_umount `hostname` $MOUNT2 -f
+ reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1)
+ [ $? = 0 ] || error "dd read failed"
+ reads=$(echo $reads | awk -F '+' '/in/ {print $1}')
+ [ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes
}
run_test 59 "Read cancel race on client eviction"