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

#
# src/test/pmreorder_stack/TEST0 -- unit test for pmreorder
# engines stack functionality
#

. ../unittest/unittest.sh

require_fs_type pmem non-pmem
require_build_type debug
require_test_type medium
require_pmemcheck_version_ge 1 0
require_pmreorder

setup

# create holey file
truncate -s 4M $DIR/testfile

BIN="./pmreorder_stack$EXESUFFIX"
PMEMCHECK_CMD="$BIN w $DIR/testfile"
PMREORDER_CMD="$BIN c"

pmreorder_create_store_log $DIR/testfile "$PMEMCHECK_CMD"
pmreorder_expect_failure NoReorderNoCheck pmreorder0.conf "$PMREORDER_CMD"

check

pass
