From ad32a6e63294b536d4235c0b5c82355a81a01199 Mon Sep 17 00:00:00 2001 From: phil Date: Sat, 23 Aug 2003 22:22:05 +0000 Subject: [PATCH] merge b_devel into b_llpio, including v24 kernel patch --- lustre/tests/multiop.c | 11 +++++++++-- lustre/tests/replay-dual.sh | 8 ++++++++ lustre/tests/replay-single-upcall.sh | 20 ++++++++++++++++++-- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/lustre/tests/multiop.c b/lustre/tests/multiop.c index da4f1b5..7c7b771 100755 --- a/lustre/tests/multiop.c +++ b/lustre/tests/multiop.c @@ -29,6 +29,7 @@ char usage[] = " s stat\n" " S fstat\n" " t fchmod\n" +" T ftruncate to zero\n" " w write\n" " z seek to zero\n"; @@ -115,12 +116,18 @@ int main(int argc, char **argv) exit(1); } break; - case 't': + case 't': if (fchmod(fd, 0) == -1) { perror("fchmod"); exit(1); } break; + case 'T': + if (ftruncate(fd, 0) == -1) { + perror("ftruncate"); + exit(1); + } + break; case 'u': if (unlink(fname) == -1) { perror("unlink"); @@ -151,6 +158,6 @@ int main(int argc, char **argv) exit(1); } } - + return 0; } diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index e0742f3..3d618e9 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -151,6 +151,14 @@ build_test_filter gen_config start mds --reformat +PINGER=`cat /proc/fs/lustre/pinger` + +if [ "$PINGER" != "on" ]; then + echo "ERROR: Lustre must be built with --enable-pinger for replay-dual" + stop mds + exit +fi + start ost --reformat start client1 start client2 diff --git a/lustre/tests/replay-single-upcall.sh b/lustre/tests/replay-single-upcall.sh index 8dcda8e..5616551 100755 --- a/lustre/tests/replay-single-upcall.sh +++ b/lustre/tests/replay-single-upcall.sh @@ -1,4 +1,20 @@ #!/bin/sh + LUSTRE=`dirname $0`/.. -$LUSTRE/utils/lctl --device %$3 recover || - logger -p kern.info recovery failed: $@ \ No newline at end of file + +failed_import() { + $LUSTRE/utils/lctl --device %$3 recover || + logger -p kern.info recovery failed: $@ +} + +recovery_over() { + logger -p kern.info upcall: $@ +} + + +case "$1" in +FAILED_IMPORT) failed_import $@ + ;; +RECOVERY_OVER) recovery_over $@ + ;; +esac -- 1.8.3.1