From 073875026d5c0615771391cf0f7dacd54db98f1b Mon Sep 17 00:00:00 2001 From: shadow <shadow> Date: Thu, 25 Oct 2007 11:32:27 +0000 Subject: [PATCH] fix tests 118 to work with remote ost. b=12858 i=green i=adilger --- lustre/tests/sanity.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 5aabec9914..5ad80568bb 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -4033,10 +4033,10 @@ test_118b() reset_async #define OBD_FAIL_OST_ENOENT 0x217 - sysctl -w lustre.fail_loc=0x217 + do_facet ost sysctl -w lustre.fail_loc=0x217 multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c RC=$? - sysctl -w lustre.fail_loc=0 + do_facet ost sysctl -w lustre.fail_loc=0 DIRTY=$(grep -c dirty $LPROC/llite/*/dump_page_cache) WRITEBACK=$(grep -c writeback $LPROC/llite/*/dump_page_cache) @@ -4066,7 +4066,7 @@ test_118c() reset_async #define OBD_FAIL_OST_EROFS 0x216 - sysctl -w lustre.fail_loc=0x216 + do_facet ost sysctl -w lustre.fail_loc=0x216 # multiop should block due to fsync until pages are written multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c & @@ -4082,7 +4082,7 @@ test_118c() error "No page in writeback, writeback=$WRITEBACK" fi - sysctl -w lustre.fail_loc=0 + do_facet ost sysctl -w lustre.fail_loc=0 wait $MULTIPID RC=$? if [[ $RC -ne 0 ]]; then @@ -4106,7 +4106,7 @@ test_118d() reset_async #define OBD_FAIL_OST_BRW_PAUSE_BULK - sysctl -w lustre.fail_loc=0x214 + do_facet ost sysctl -w lustre.fail_loc=0x214 # multiop should block due to fsync until pages are written multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c & MULTIPID=$! @@ -4122,6 +4122,7 @@ test_118d() fi wait $MULTIPID || error "Multiop fsync failed, rc=$?" + do_facet ost sysctl -w lustre.fail_loc=0 DIRTY=$(grep -c dirty $LPROC/llite/*/dump_page_cache) WRITEBACK=$(grep -c writeback $LPROC/llite/*/dump_page_cache) @@ -4144,11 +4145,12 @@ test_118f() { # Should simulate EINVAL error which is fatal multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c RC=$? - if [[ $RC -eq 0 ]]; then error "Must return error due to dropped pages, rc=$RC" fi - + + sysctl -w lustre.fail_loc=0x0 + LOCKED=$(grep -c locked $LPROC/llite/*/dump_page_cache) DIRTY=$(grep -c dirty $LPROC/llite/*/dump_page_cache) WRITEBACK=$(grep -c writeback $LPROC/llite/*/dump_page_cache) @@ -4206,12 +4208,12 @@ test_118h() { reset_async #define OBD_FAIL_OST_BRW_WRITE_BULK 0x20e - sysctl -w lustre.fail_loc=0x20e + do_facet ost sysctl -w lustre.fail_loc=0x20e # Should simulate ENOMEM error which is recoverable and should be handled by timeout multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c RC=$? - sysctl -w lustre.fail_loc=0 + do_facet ost sysctl -w lustre.fail_loc=0 if [[ $RC -eq 0 ]]; then error "Must return error due to dropped pages, rc=$RC" fi @@ -4238,13 +4240,13 @@ test_118i() { reset_async #define OBD_FAIL_OST_BRW_WRITE_BULK 0x20e - sysctl -w lustre.fail_loc=0x20e + do_facet ost sysctl -w lustre.fail_loc=0x20e # Should simulate ENOMEM error which is recoverable and should be handled by timeout multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c & PID=$! sleep 5 - sysctl -w lustre.fail_loc=0 + do_facet ost sysctl -w lustre.fail_loc=0 wait $PID RC=$? @@ -4274,12 +4276,12 @@ test_118j() { reset_async #define OBD_FAIL_OST_BRW_WRITE_BULK2 0x220 - sysctl -w lustre.fail_loc=0x220 + do_facet ost sysctl -w lustre.fail_loc=0x220 # return -EIO from OST multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c RC=$? - sysctl -w lustre.fail_loc=0x0 + do_facet ost sysctl -w lustre.fail_loc=0x0 if [[ $RC -eq 0 ]]; then error "Must return error due to dropped pages, rc=$RC" fi -- GitLab