#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2018, Intel Corporation
#
#
# pmempool_check/TEST24 -- test for checking pools with device dax
#
# Same as TEST12, 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

# covered by TEST21
configure_valgrind memcheck force-disable $PMEMPOOL$EXESUFFIX

setup

dax_device_zero

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 create obj $POOLSET
expect_normal_exit $PMEMPOOL$EXESUFFIX check -vry $POOLSET >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET &> /dev/null

pass
