set -e
ONLY=${ONLY:-"$*"}
-# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 16260 19742
+# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 16260 19742
ALWAYS_EXCEPT=" 27u 42a 42b 42c 42d 45 51d 65a 65e 68b $SANITY_EXCEPT"
# bug number for skipped test: 2108 9789 3637 9789 3561 5188/5749 1443
#ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27m 42a 42b 42c 42d 45 68 76"}
test_36g() {
remote_ost_nodsh && skip "remote OST with nodsh" && return
+ local fmd_max_age
+ local fmd_before
+ local fmd_after
mkdir -p $DIR/$tdir
- export FMD_MAX_AGE=`do_facet ost1 lctl get_param -n obdfilter.*.client_cache_seconds 2> /dev/null | head -n 1`
- FMD_BEFORE="`awk '/ll_fmd_cache/ { print $2 }' /proc/slabinfo`"
+ fmd_max_age=$(do_facet ost1 \
+ "lctl get_param -n obdfilter.*.client_cache_seconds 2> /dev/null | \
+ head -n 1")
+
+ fmd_before=$(do_facet ost1 \
+ "awk '/ll_fmd_cache/ {print \\\$2}' /proc/slabinfo")
touch $DIR/$tdir/$tfile
- sleep $((FMD_MAX_AGE + 12))
- FMD_AFTER="`awk '/ll_fmd_cache/ { print $2 }' /proc/slabinfo`"
- [ "$FMD_AFTER" -gt "$FMD_BEFORE" ] && \
- echo "AFTER : $FMD_AFTER > BEFORE $FMD_BEFORE" && \
+ sleep $((fmd_max_age + 12))
+ fmd_after=$(do_facet ost1 \
+ "awk '/ll_fmd_cache/ {print \\\$2}' /proc/slabinfo")
+
+ echo "fmd_before: $fmd_before"
+ echo "fmd_after: $fmd_after"
+ [ "$fmd_after" -gt "$fmd_before" ] && \
+ echo "AFTER: $fmd_after > BEFORE: $fmd_before" && \
error "fmd didn't expire after ping" || true
}
run_test 36g "filter mod data cache expiry ====================="
local mtime1=`stat -c %Y $DIR1/$tfile`
touch -m -d @$TEST_39_MTIME $DIR1/$tfile
-
+
for (( i=0; i < 2; i++ )) ; do
local mtime2=`stat -c %Y $DIR1/$tfile`
[ $mtime2 = $TEST_39_MTIME ] || \
sleep 2
chmod o+r $DIR1/$tfile
-
+
for (( i=0; i < 2; i++ )) ; do
local mtime2=`stat -c %Y $DIR1/$tfile`
[ "$mtime1" = "$mtime2" ] || \
kill -USR1 $multipid
wait $multipid || error "multiop close failed"
-
+
for (( i=0; i < 2; i++ )) ; do
local mtime2=`stat -c %Y $DIR1/$tfile`
cancel_lru_locks osc
if [ $i = 0 ] ; then echo "repeat after cancel_lru_locks"; fi
done
-
-
}
run_test 39m "test atime and mtime before 1970"
}
run_test 54e "console/tty device works in lustre ======================"
-#The test_55 used to be iopen test and it was removed by bz#24037.
+#The test_55 used to be iopen test and it was removed by bz#24037.
#run_test 55 "check iopen_connect_dentry() ======================"
test_56a() { # was test_56
test_56r() {
setup_56 $NUMFILES $NUMDIRS
TDIR=$DIR/${tdir}g
-
+
EXPECTED=12
NUMS=`$LFIND -size 0 -t f $TDIR | wc -l`
[ $NUMS -eq $EXPECTED ] || \
if [ ! -z "$LLITELOOPLOAD" ]; then
rmmod llite_lloop
unset LLITELOOPLOAD
- fi
+ fi
rm -f $DIR/f68*
}
}
run_test 105d "flock race (should not freeze) ========"
+test_105e() { # bug 22660 && 22040
+ [ -z "`mount | grep \"$DIR.*flock\" | grep -v noflock`" ] && \
+ skip "mount w/o flock enabled" && return
+ touch $DIR/$tfile
+ flocks_test 3 $DIR/$tfile
+}
+run_test 105e "Two conflicting flocks from same process ======="
+
test_106() { #bug 10921
mkdir -p $DIR/$tdir
$DIR/$tdir && error "exec $DIR/$tdir succeeded"
#define OBD_FAIL_PTLRPC_DUMP_LOG 0x50e
$LCTL set_param fail_loc=0x50e
$LCTL set_param fail_val=3000
- multiop_bg_pause $DIR/$tfile Os || true
+ multiop_bg_pause $DIR/$tfile O_s || true
+ local MULTIPID=$!
+ kill -USR1 $MULTIPID
# cause log dump
sleep 3
+ wait $MULTIPID
if dmesg | grep "recursive fault"; then
error "caught a recursive fault"
fi
local rmmod_local=0
if ! module_loaded obdecho; then
- load_module obdecho/obdecho
- rmmod_local=1
+ load_module obdecho/obdecho
+ rmmod_local=1
fi
local osc=$($LCTL dl | grep -v mdt | awk '$3 == "osc" {print $4; exit}')
local host=$(awk '/current_connection:/ {print $2}' /proc/fs/lustre/osc/$osc/import)
local target=$(awk '/target:/ {print $2}' /proc/fs/lustre/osc/$osc/import)
target=${target%_UUID}
-
+
[[ -n $target ]] && { setup_obdecho_osc $host $target || rc=1; } || rc=1
[ $rc -eq 0 ] && { obdecho_create_test ${target}_osc client || rc=2; }
[[ -n $target ]] && cleanup_obdecho_osc $target
test_201c() {
remote_mgs_nodsh && skip "remote MGS with nodsh" && return
do_facet mgs $LCTL pool_destroy $FSNAME.$POOL
-
- sleep 2
+
+ sleep 2
# striping on an empty/nonexistant pool should fall back to "pool of everything"
touch ${POOL_DIR}/$tfile || error "failed to use fallback striping for missing pool"
# setstripe on an empty pool should fail
if [ "$I_MOUNTED" != "yes" ]; then
lctl set_param debug="$OLDDEBUG" 2> /dev/null || true
fi
-exit_status
+exit_status