+run_test 1b "Create a pool with a 10 char pool name"
+
+test_1c() {
+ set_cleanup_trap
+ create_pool_nofail ${POOL}1234567
+ destroy_pool ${POOL}1234567
+}
+run_test 1c "Create a pool with a 15 char pool name"
+
+test_1d() {
+ set_cleanup_trap
+ create_pool_fail ${POOL}12345678
+}
+run_test 1d "Create a pool with a 16 char pool name; should fail"
+
+test_1e() {
+ set_cleanup_trap
+ local pool_name="$POOL"
+ for ((i = 1; i <= 991; i++)); do pool_name=${pool_name}"o"; done
+ create_pool_fail $pool_name
+}
+run_test 1e "Create a pool with a 1000 char pool name; should fail"
+
+test_1f() {
+ set_cleanup_trap
+ do_facet $SINGLEMDS lctl pool_new .$POOL 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even though fs-name was missing"
+}
+run_test 1f "pool_new should fail if fs-name is missing"
+
+test_1g() {
+ set_cleanup_trap
+ do_facet $SINGLEMDS lctl pool_new $POOL 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even though fs-name was missing"
+}
+run_test 1g "pool_new should fail if fs-name is missing"
+
+test_1h() {
+ set_cleanup_trap
+ do_facet $SINGLEMDS lctl pool_new ${FSNAME}. 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even though pool name was missing"
+}
+run_test 1h "pool_new should fail if poolname is missing"
+
+test_1i() {
+ set_cleanup_trap
+ do_facet $SINGLEMDS lctl pool_new . 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even if pool and fs-name were missing"
+}
+run_test 1i "pool_new should fail if poolname and fs-name are missing"
+
+test_1j() {
+ set_cleanup_trap
+ do_facet $SINGLEMDS lctl pool_new ${FSNAME},$POOL 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even though pool name format was wrong"
+}
+run_test 1j "pool_new should fail if poolname format is wrong"
+
+test_1k() {
+ set_cleanup_trap
+ do_facet $SINGLEMDS lctl pool_new ${FSNAME}/$POOL 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even though pool name format was wrong"
+}
+run_test 1k "pool_new should fail if poolname format is wrong"
+
+test_1m() {
+ set_cleanup_trap
+ create_pool_nofail $POOL2
+ do_facet $SINGLEMDS lctl pool_new ${FSNAME}.$POOL2 2>/dev/null
+ [[ $? -ne 0 ]] ||
+ error "pool_new did not fail even though $POOL2 existed"
+ destroy_pool $POOL2
+}
+run_test 1m "pool_new did not fail even though $POOL2 existed"
+
+test_1n() {
+ set_cleanup_trap
+ create_pool_nofail ${POOL}1234567
+
+ add_pool ${POOL}1234567 "OST0000" "$FSNAME-OST0000_UUID "
+ local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+ create_dir $POOL_ROOT ${POOL}1234567
+ dd if=/dev/zero of=$POOL_ROOT/file bs=1M count=100
+ RC=$?; [[ $RC -eq 0 ]] ||
+ error "failed to write to $POOL_ROOT/file: $RC"
+ do_facet $SINGLEMDS lctl pool_remove $FSNAME.${POOL}1234567 OST0000
+ drain_pool ${POOL}1234567
+
+ destroy_pool ${POOL}1234567
+}
+run_test 1n "Pool with a 15 char pool name works well"