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

#
# src/test/obj_list_valgrind/TEST5 -- unit test for list module with valgrind
# pmemcheck tool
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type pmem non-pmem
require_build_type debug

configure_valgrind pmemcheck force-enable ../obj_list/obj_list
export VALGRIND_OPTS="--mult-stores=yes"
setup

create_holey_file 1M $DIR/testfile

expect_normal_exit ../obj_list/obj_list$EXESUFFIX $DIR/testfile\
		i:0:0\
		i:0:0\
		i:0:0\
		i:0:0\
		P:2 R:2 P:4 R:4\
		m:0:0:0\
		m:-1:1:-1\
		m:1:1:1\
		m:0:0:2\
		P:2 R:2 P:4 R:4

pass
