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

#
# src/test/obj_pmemcheck/TEST0 -- unit test for obj_pmemcheck
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type any

# Valgrind merges errors which have the same last 4 stack frames. With non-debug
# builds the depth of the stack trace depends on how much compiler optimized it.
# So always use debug build to take a compiler out of the picture and get
# deterministic stack traces.
require_build_type debug

require_valgrind 3.10
configure_valgrind pmemcheck force-enable

setup

expect_normal_exit ./obj_pmemcheck$EXESUFFIX $DIR/testfile

check

pass
