#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2018, Intel Corporation
#
#
# libpmempool_rm/TEST6 -- test for pmempool_rm
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type any

setup

enable_log_append

create_poolset $DIR/pool.set\
	8M:$DIR/pool1:x\
	8M:$DIR/pool2:x\
	8M:$DIR/pool3:x\
	8M:$DIR/pool4:x

expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $DIR/pool.set
check_files $DIR/pool.set $DIR/pool1 $DIR/pool2 $DIR/pool3 $DIR/pool4

expect_normal_exit $PMEMPOOL$EXESUFFIX rm $DIR/pool3 $DIR/pool2
check_no_file $DIR/pool2 $DIR/pool3

expect_normal_exit ./libpmempool_rm$EXESUFFIX $DIR/pool.set
check_no_files $DIR/pool1 $DIR/pool2 $DIR/pool3 $DIR/pool4

check

pass
