#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2018, Intel Corporation
#
#
# pmempool_info/TEST20 -- test for info command
#

. ../unittest/unittest.sh

require_test_type medium
require_fs_type any

setup

LOG=out${UNITTEST_NUM}.log

rm -f $LOG && touch $LOG

POOLSET=$DIR/pool.set
POOL1=$DIR/pool.part1
POOL2=$DIR/pool.part2
POOLS="$POOL1 $POOL2"
REPL1=$DIR/pool.rep.part1
REPL2=$DIR/pool.rep.part2
REPS="$REPL1 $REPL2"

create_poolset $POOLSET 32M:$POOL1:z 32M:$POOL2:z\
	R 32M:$REPL1:z 32M:$REPL2:z \
	O SINGLEHDR

check_file $POOLSET

rm -f $POOLS $REPS
expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOLSET
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOL1 >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX info $REPL1 >> $LOG

check

pass
