From c5d888147f14b08cb849b0c62c252e698834c3a8 Mon Sep 17 00:00:00 2001 From: grev <grev> Date: Sat, 12 Jan 2008 21:16:08 +0000 Subject: [PATCH] b=13734 i=Adilger fail tests if lustre is not mounted --- lustre/tests/insanity.sh | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/lustre/tests/insanity.sh b/lustre/tests/insanity.sh index 5c3871e7ea..fd7fc252b6 100755 --- a/lustre/tests/insanity.sh +++ b/lustre/tests/insanity.sh @@ -178,6 +178,8 @@ run_test 1 "MDS/MDS failure" ############### Second Failure Mode ############### test_2() { echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + client_df shutdown_facet $SINGLEMDS @@ -216,6 +218,7 @@ run_test 2 "Second Failure Mode: MDS/OST `date`" test_3() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" #MDS Portion facet_failover $SINGLEMDS @@ -293,6 +296,8 @@ test_5() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + client_df #OST Portion @@ -339,7 +344,9 @@ test_6() { #Create files echo "Verify Lustre filesystem is up and running" - client_df || return 1 + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + + client_df client_touch testfile || return 2 #OST Portion @@ -372,7 +379,8 @@ test_6() { wait $DFPIDA wait $DFPIDB echo "Verifying mount" - client_df || return 3 + [ -z "$(mounted_lustre_filesystems)" ] && return 3 + client_df } run_test 6 "Sixth Failure Mode: OST/CLIENT `date`" ################################################### @@ -384,6 +392,8 @@ test_7() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + client_df client_touch testfile || return 1 @@ -403,6 +413,8 @@ test_7() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && return 2 + client_df client_rm testfile @@ -417,8 +429,8 @@ test_7() { #Reintegration echo "Reintegrating CLIENTs" - reintegrate_clients - client_df || return 2 + reintegrate_clients || return 2 + client_df #Sleep echo "wait 1 minutes" @@ -434,6 +446,8 @@ test_8() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + client_df client_touch testfile @@ -453,6 +467,8 @@ test_8() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + client_df client_touch testfile @@ -472,7 +488,7 @@ test_8() { #Reintegration echo "Reintegrating CLIENTs/OST" - reintegrate_clients + reintegrate_clients || return 3 wait_for ost1 start_ost 1 wait $DFPID @@ -493,6 +509,8 @@ test_9() { #Create files echo "Verify Lustre filesystem is up and running" + [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running" + client_df client_touch testfile || return 1 @@ -527,8 +545,8 @@ test_9() { #Reintegration echo "Reintegrating CLIENTs/CLIENTs" - reintegrate_clients - client_df || return 7 + reintegrate_clients || return 7 + client_df #Sleep echo "Wait 1 minutes" -- GitLab