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

#
# src/test/ex_libpmemobj/TEST0 -- unit test for libpmemobj examples
#

. ../unittest/unittest.sh

require_test_type medium
require_build_type debug nondebug
# Valgrind interprets msync as a read and hence reports a race
require_fs_type pmem

setup

EX_PATH=../../examples/libpmemobj

. ./common.sh

expect_normal_exit $EX_PATH/pi $DIR/testfile1 c 2 20 > $LOG_TEMP 2>&1
expect_normal_exit $EX_PATH/pi $DIR/testfile1 p >> $LOG_TEMP 2>&1

mv $LOG_TEMP $LOG

check

pass
