X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fost-pools.sh;h=2f1700f7b70e5a3e8341ae3f5f9e3b16074f93a5;hp=b8a87902641ae340b34a61e8f16bd661963481a2;hb=c8790ae52393d96fc71aa4edea0e5051c54431e9;hpb=b8a2a08b4ec06a5434bd24dd3c3b4bf7643bd91e diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index b8a8790..2f1700f 100755 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -4,26 +4,20 @@ # Skip specific tests by setting EXCEPT. # -SRCDIR=$(dirname $0) -export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin - ONLY=${ONLY:-"$*"} -ALWAYS_EXCEPT="$OST_POOLS_EXCEPT" -# bug number for skipped test: - -# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! - -[ "$ALWAYS_EXCEPT$EXCEPT" ] && - echo "Skipping tests: $(echo $ALWAYS_EXCEPT $EXCEPT)" - -TMP=${TMP:-/tmp} ORIG_PWD=${PWD} -LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} +LUSTRE=${LUSTRE:-$(dirname $0)/..} . $LUSTRE/tests/test-framework.sh init_test_env $@ -. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging +ALWAYS_EXCEPT="$OST_POOLS_EXCEPT" +# bug number for skipped test: - +# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! + +build_test_filter + check_and_setup_lustre if ! combined_mgs_mds; then @@ -35,8 +29,6 @@ fi DIR=${DIR:-$MOUNT} assert_DIR -build_test_filter - MAXFREE=${MAXFREE:-$((2000000 * OSTCOUNT))} # OST pools tests @@ -278,14 +270,14 @@ test_1i() { run_test 1i "pool_new should fail if poolname and fs-name are missing" test_1j() { - create_pool ${FSNAME},$POOL + do_facet mgs lctl pool_new ${FSNAME},$POOL [[ $? -ne 0 ]] || error "pool_new did not fail even if poolname format was wrong" } run_test 1j "pool_new should fail if poolname format is wrong" test_1k() { - create_pool ${FSNAME}/$POOL + do_facet mgs lctl pool_new ${FSNAME}/$POOL [[ $? -ne 0 ]] || error "pool_new did not fail even if poolname format was wrong" } @@ -415,10 +407,11 @@ test_2e() { create_pool_nofail $POOL - TGT="$FSNAME-OST0000_UUID " + TGT="$FSNAME-OST0000_UUID" do_facet mgs lctl pool_add $FSNAME.$POOL $TGT - wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | - sort -u | tr '\n' ' ' " "$TGT" || error "Add to pool failed" + wait_update_facet $SINGLEMDS \ + "lctl pool_list $FSNAME.$POOL | sed '1d'" "$TGT" || + error "Add $TGT to $FSNAME.$POOL failed" RESULT=$(do_facet mgs \ "LOCALE=C $LCTL pool_add $FSNAME.$POOL $TGT 2>&1") RC=$? @@ -1542,6 +1535,9 @@ test_27() { create_pool_nofail $POOL do_facet mgs lctl pool_add $FSNAME.$POOL $TGT_ALL + wait_update_facet $SINGLEMDS \ + "lctl pool_list $FSNAME.$POOL | wc -l" "$((OSTCOUNT + 1))" || + error "MDS: pool_list $FSNAME.$POOL failed" osts=$(list_pool $FSNAME.$POOL) for ost in ${osts}; do ((count--))