#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2024, Intel Corporation

#
# src/test/obj_extend/TEST1 -- unit test for extending the pool
#

. ../unittest/unittest.sh

require_test_type medium
require_build_type debug
require_fs_type pmem

setup

RESVSIZE=$(((512 + 8) * 1024 * 1024)) # 512MiB + 8MiB
GRANULARITY=$((1024 * 1024 * 10)) # 10MiB

# prepare pool sets
create_poolset $DIR/testset2\
	$RESVSIZE:$DIR/testdir21:d\
	O SINGLEHDR

PMEMOBJ_CONF="${PMEMOBJ_CONF};heap.size.granularity=$GRANULARITY"\
	expect_normal_exit ./obj_extend$EXESUFFIX $DIR/testset2

check

pass
