X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Frunfailure-ost;h=0c68d5adae2f9be4588871d15ba3a0ce160b1670;hb=e52a140eb7f65a63f07dbb7e2aaff7f9e22974f2;hp=7b819cefc786623d44385dd380f108eb72366b06;hpb=76671496aabf3cd7ee41cdad09720abd7ec5896b;p=fs%2Flustre-release.git diff --git a/lustre/tests/runfailure-ost b/lustre/tests/runfailure-ost index 7b819ce..0c68d5a 100755 --- a/lustre/tests/runfailure-ost +++ b/lustre/tests/runfailure-ost @@ -1,10 +1,12 @@ #!/bin/sh -set -vx - SRCDIR="`dirname $0`" . $SRCDIR/common.sh +setup_opts "$@" + +set -vx + test_fail() { echo $1 > /proc/sys/lustre/fail_loc shift @@ -24,4 +26,26 @@ test_fail() { touch /mnt/lustre/foo test_fail 0x208 cat /mnt/lustre/foo +# OBD_FAIL_OST_CLOSE_NET: OST will discard close request packet +test_fail 0x209 cat /mnt/lustre/foo + +# OBD_FAIL_OST_CREATE_NET: OST will discard create request packet +test_fail 0x204 touch /mnt/lustre/bar + +# OBD_FAIL_OST_DESTROY_NET: OST will discard destroy request packet +test_fail 0x205 rm /mnt/lustre/foo + +# OBD_FAIL_OST_BRW_NET: OST will discard read request packet +echo foo >> /mnt/lustre/foo +test_fail 0x20a cat /mnt/lustre/foo + +# OBD_FAIL_OST_BRW_NET: OST will discard write request packet +test_fail 0x20a "echo bar >> /mnt/lustre/foo" + +# OBD_FAIL_OST_PUNCH_NET: OST will discard truncate request packet +test_fail 0x208 "echo bar > /mnt/lustre/foo" + +# OBD_FAIL_OST_STATFS_NET: OST will discard statfs request packet +test_fail 0x208 df /mnt/lustre + echo "Done."