#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2018, Intel Corporation
#
#
# pmempool_info/TEST19 -- test for info command with device dax
#
# Same as TEST18, but run on a pool set that spans two Device DAX devices
# with 4K alignment.
#

. ../unittest/unittest.sh

require_test_type medium
require_fs_type any
require_dax_device_alignments 4096 4096

setup

LOG=out${UNITTEST_NUM}.log

rm -f $LOG && touch $LOG

POOLSET=$DIR/testset1
create_poolset $POOLSET AUTO:${DEVICE_DAX_PATH[0]} AUTO:${DEVICE_DAX_PATH[1]}

expect_normal_exit $PMEMPOOL$EXESUFFIX rm $POOLSET
expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOLSET
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX info ${DEVICE_DAX_PATH[0]} >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX info ${DEVICE_DAX_PATH[1]} >> $LOG

check

pass
