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"}
MUNLINK=${MUNLINK:-munlink}
SOCKETSERVER=${SOCKETSERVER:-socketserver}
SOCKETCLIENT=${SOCKETCLIENT:-socketclient}
-IOPENTEST1=${IOPENTEST1:-iopentest1}
-IOPENTEST2=${IOPENTEST2:-iopentest2}
MEMHOG=${MEMHOG:-memhog}
DIRECTIO=${DIRECTIO:-directio}
ACCEPTOR_PORT=${ACCEPTOR_PORT:-988}
local group=${lmm[$((j+3))]}
local dev=$(ostdevname $devnum)
local dir=${MOUNT%/*}/ost$devnum
+
+ stop ost$devnum
do_facet ost$devnum mount -t $FSTYPE $dev $dir $OST_MOUNT_OPTS ||
{ error "mounting $dev as $FSTYPE failed"; return 3; }
echo -e "\t\tost $obdidx, objid $objid, group $group"
do_facet ost$devnum umount -d $dev
+ start ost$devnum $dev $OST_MOUNT_OPTS
done
}
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 ] || \
sync
sleep 1
df $dir #make sure we get new statfs data
- local MDSFREE=$(do_facet $mymds lctl get_param -n osd.*MDT000$((num -1)).kbytesfree)
+ local MDSFREE=$(do_facet $mymds \
+ lctl get_param -n osd*.*MDT000$((num -1)).kbytesfree)
local MDCFREE=$(lctl get_param -n mdc.*MDT000$((num -1))-mdc-*.kbytesfree)
echo "opening files to create objects/EAs"
local FILE
sleep 1 #make sure we get new statfs data
df $dir
- local MDSFREE2=$(do_facet $mymds lctl get_param -n osd.*MDT000$((num -1)).kbytesfree)
+ local MDSFREE2=$(do_facet $mymds \
+ lctl get_param -n osd*.*MDT000$((num -1)).kbytesfree)
local MDCFREE2=$(lctl get_param -n mdc.*MDT000$((num -1))-mdc-*.kbytesfree)
if [ "$MDCFREE2" -lt "$((MDCFREE - 8))" ]; then
if [ "$MDSFREE" != "$MDSFREE2" ]; then
if [ ! -z "$LLITELOOPLOAD" ]; then
rmmod llite_lloop
unset LLITELOOPLOAD
- fi
+ fi
rm -f $DIR/f68*
}
}
run_test 71 "Running dbench on lustre (don't segment fault) ===="
-test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly
+test_72a() { # bug 5695 - Test that on 2.6 remove_suid works properly
check_kernel_version 43 || return 0
[ "$RUNAS_ID" = "$UID" ] && skip_env "RUNAS_ID = UID = $UID -- skipping" && return
true
rm -f $DIR/f72
}
-run_test 72 "Test that remove suid works properly (bug5695) ===="
+run_test 72a "Test that remove suid works properly (bug5695) ===="
+
+test_72b() { # bug 24226 -- keep mode setting when size is not changing
+ local perm
+
+ [ "$RUNAS_ID" = "$UID" ] && \
+ skip_env "RUNAS_ID = UID = $UID -- skipping" && return
+ [ "$RUNAS_ID" -eq 0 ] && \
+ skip_env "RUNAS_ID = 0 -- skipping" && return
+
+ # Check that testing environment is properly set up. Skip if not
+ FAIL_ON_ERROR=false check_runas_id_ret $RUNAS_ID $RUNAS_ID $RUNAS || {
+ skip_env "User $RUNAS_ID does not exist - skipping"
+ return 0
+ }
+ touch $DIR/${tfile}-f{g,u}
+ mkdir $DIR/${tfile}-d{g,u}
+ chmod 770 $DIR/${tfile}-{f,d}{g,u}
+ chmod g+s $DIR/${tfile}-{f,d}g
+ chmod u+s $DIR/${tfile}-{f,d}u
+ for perm in 777 2777 4777; do
+ $RUNAS chmod $perm $DIR/${tfile}-fg && error "S/gid file allowed improper chmod to $perm"
+ $RUNAS chmod $perm $DIR/${tfile}-fu && error "S/uid file allowed improper chmod to $perm"
+ $RUNAS chmod $perm $DIR/${tfile}-dg && error "S/gid dir allowed improper chmod to $perm"
+ $RUNAS chmod $perm $DIR/${tfile}-du && error "S/uid dir allowed improper chmod to $perm"
+ done
+ true
+}
+run_test 72b "Test that we keep mode setting if without file data changed (bug 24226)"
# bug 3462 - multiple simultaneous MDC requests
test_73() {
}
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