From 058912d856cb39095d2460133ef01ad889adf686 Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 16 May 2005 17:54:59 +0000 Subject: [PATCH] Branch b1_4 Make sure that test 52 writemany will exit at some point. Put writemany usage message at top of code so it is easily found. r=nathan --- lustre/tests/recovery-small.sh | 2 ++ lustre/tests/writemany.c | 19 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index cb9a89b..4497fb0 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -519,6 +519,8 @@ test_52_guts() { FAILURE_MODE="SOFT" fail ost rc=0 + sleep 5 + kill -USR1 $CLIENT_PID wait $CLIENT_PID || rc=$? # active client process should see an EIO for down OST [ $rc -eq 5 ] && { echo "writemany correctly failed $rc" && return 0; } diff --git a/lustre/tests/writemany.c b/lustre/tests/writemany.c index 15a7292..ff9a21c 100644 --- a/lustre/tests/writemany.c +++ b/lustre/tests/writemany.c @@ -25,6 +25,15 @@ char cmdname[512]; int o_abort = 0; int o_quiet = 0; +void usage(char *name) +{ + fprintf(stderr, "usage: %s [opts] \n", + name); + fprintf(stderr, " -q quiet\n"); + fprintf(stderr, " -a abort other children on first err\n"); + exit(1); +} + struct kid_list_t { pid_t kid; @@ -189,16 +198,6 @@ int run_one_child(char *file, int thread, int seconds) return rc; } -void usage(char *name) -{ - fprintf(stderr, - "usage: %s [opts] \n", - name); - fprintf(stderr, " -q quiet\n"); - fprintf(stderr, " -a abort other children on first err\n"); - exit(1); -} - int main(int argc, char *argv[]) { unsigned long duration; -- 1.8.3.1