X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=f337115580d42c9a882efcd1e5f520e1515e965a;hp=a4e35815a52be4a6b9844dcfe41294f742ead46f;hb=346a17e4d8b5c291d776387ace81a5b74bc24141;hpb=78bcd4ca7b31284194af8ee5a33cb6836edd6ca9 diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index a4e3581..f337115 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -4422,10 +4422,42 @@ test_80() { # bug 10718 error "elapsed for 1M@1T = $DIFF" fi true - rm -f $DIR/$tfile + rm -f $DIR/$tfile } run_test 80 "Page eviction is equally fast at high offsets too ====" +test_81a() { # LU-456 + # define OBD_FAIL_OST_MAPBLK_ENOSPC 0x228 + # MUST OR with the OBD_FAIL_ONCE (0x80000000) + do_facet ost0 lctl set_param fail_loc=0x80000228 + + # write should trigger a retry and success + $SETSTRIPE -i 0 -c 1 $DIR/$tfile + multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c + RC=$? + if [ $RC -ne 0 ] ; then + error "write should success, but failed for $RC" + fi +} +run_test 81a "OST should retry write when get -ENOSPC ===============" + +test_81b() { # LU-456 + # define OBD_FAIL_OST_MAPBLK_ENOSPC 0x228 + # Don't OR with the OBD_FAIL_ONCE (0x80000000) + do_facet ost0 lctl set_param fail_loc=0x228 + + # write should retry several times and return -ENOSPC finally + $SETSTRIPE -i 0 -c 1 $DIR/$tfile + multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c + RC=$? + ENOSPC=28 + if [ $RC -ne $ENOSPC ] ; then + error "dd should fail for -ENOSPC, but succeed." + fi +} +run_test 81b "OST should return -ENOSPC when retry still fails =======" + + test_99a() { [ -z "$(which cvs 2>/dev/null)" ] && skip_env "could not find cvs" && \ return