Skip to content
Snippets Groups Projects
Commit c00b5464 authored by scjody's avatar scjody
Browse files

Branch b1_6

Modify test-framework tests to run on real hardware - based on a patch
by Nic Henke <nic@cray.com>

b=11217
i=mjmac
i=nathan
parent da8deccf
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
set -e set -e
...@@ -20,7 +19,7 @@ SETUP=${SETUP:-"setup"} ...@@ -20,7 +19,7 @@ SETUP=${SETUP:-"setup"}
CLEANUP=${CLEANUP:-"cleanup"} CLEANUP=${CLEANUP:-"cleanup"}
setup() { setup() {
formatall [ "$REFORMAT" ] && formatall
setupall setupall
} }
...@@ -202,7 +201,7 @@ test_16() { ...@@ -202,7 +201,7 @@ test_16() {
cancel_lru_locks osc cancel_lru_locks osc
# OST bulk will time out here, client resends # OST bulk will time out here, client resends
do_facet client "cmp /etc/termcap $MOUNT/termcap" || return 1 do_facet client "cmp /etc/termcap $MOUNT/termcap" || return 1
sysctl -w lustre.fail_loc=0 do_facet ost1 sysctl -w lustre.fail_loc=0
# give recovery a chance to finish (shouldn't take long) # give recovery a chance to finish (shouldn't take long)
sleep $TIMEOUT sleep $TIMEOUT
do_facet client "cmp /etc/termcap $MOUNT/termcap" || return 2 do_facet client "cmp /etc/termcap $MOUNT/termcap" || return 2
...@@ -213,13 +212,13 @@ run_test 16 "timeout bulk put, don't evict client (2732)" ...@@ -213,13 +212,13 @@ run_test 16 "timeout bulk put, don't evict client (2732)"
test_17() { test_17() {
# OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE # OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE
# OST bulk will time out here, client retries # OST bulk will time out here, client retries
sysctl -w lustre.fail_loc=0x80000503 do_facet ost1 sysctl -w lustre.fail_loc=0x80000503
# need to ensure we send an RPC # need to ensure we send an RPC
do_facet client cp /etc/termcap $DIR/$tfile do_facet client cp /etc/termcap $DIR/$tfile
sync sync
sleep $TIMEOUT sleep $TIMEOUT
sysctl -w lustre.fail_loc=0 do_facet ost1 sysctl -w lustre.fail_loc=0
do_facet client "df $DIR" do_facet client "df $DIR"
# expect cmp to succeed, client resent bulk # expect cmp to succeed, client resent bulk
do_facet client "cmp /etc/termcap $DIR/$tfile" || return 3 do_facet client "cmp /etc/termcap $DIR/$tfile" || return 3
......
...@@ -30,7 +30,7 @@ fi ...@@ -30,7 +30,7 @@ fi
setup() { setup() {
cleanup cleanup
formatall [ "$REFORMAT" ] && formatall
setupall setupall
mount_client $MOUNT2 mount_client $MOUNT2
} }
......
...@@ -26,8 +26,8 @@ gen_config() { ...@@ -26,8 +26,8 @@ gen_config() {
add_lov lov1 mds --stripe_sz $STRIPE_BYTES \ add_lov lov1 mds --stripe_sz $STRIPE_BYTES \
--stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0 --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0
add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE add_ost ost --lov lov1 --dev `ostdevname 1` --size $OSTSIZE
add_ost ost2 --lov lov1 --dev ${OSTDEV}-2 --size $OSTSIZE add_ost ost2 --lov lov1 --dev `ostdevname 2` --size $OSTSIZE
add_client client mds --lov lov1 --path $MOUNT add_client client mds --lov lov1 --path $MOUNT
} }
...@@ -43,7 +43,7 @@ if [ "$ONLY" == "cleanup" ]; then ...@@ -43,7 +43,7 @@ if [ "$ONLY" == "cleanup" ]; then
fi fi
setup() { setup() {
formatall [ "$REFORMAT" ] && formatall
setupall setupall
} }
......
...@@ -6,7 +6,7 @@ set -e ...@@ -6,7 +6,7 @@ set -e
#set -x #set -x
export REFORMAT="" export REFORMAT=${REFORMAT:-""}
export VERBOSE=false export VERBOSE=false
export GMNALNID=${GMNALNID:-/usr/sbin/gmlndnid} export GMNALNID=${GMNALNID:-/usr/sbin/gmlndnid}
export CATASTROPHE=${CATASTROPHE:-/proc/sys/lnet/catastrophe} export CATASTROPHE=${CATASTROPHE:-/proc/sys/lnet/catastrophe}
...@@ -456,6 +456,18 @@ h2gm () { ...@@ -456,6 +456,18 @@ h2gm () {
fi fi
} }
h2ptl() {
if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
ID=`xtprocadmin -n $1 2>/dev/null | egrep -v 'NID' | awk '{print $1}'`
if [ -z "$ID" ]; then
echo "Could not get a ptl id for $1..."
exit 1
fi
echo $ID"@ptl"
fi
}
declare -fx h2ptl
h2tcp() { h2tcp() {
if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
echo $1"@tcp" echo $1"@tcp"
...@@ -633,6 +645,8 @@ setupall() { ...@@ -633,6 +645,8 @@ setupall() {
load_modules load_modules
if [ -z "$CLIENTONLY" ]; then if [ -z "$CLIENTONLY" ]; then
echo Setup mdt, osts echo Setup mdt, osts
echo $REFORMAT | grep -q "reformat" \
|| do_facet mds "$TUNEFS --writeconf $MDSDEV"
start mds $MDSDEV $MDS_MOUNT_OPTS start mds $MDSDEV $MDS_MOUNT_OPTS
for num in `seq $OSTCOUNT`; do for num in `seq $OSTCOUNT`; do
DEVNAME=`ostdevname $num` DEVNAME=`ostdevname $num`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment