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

#
# src/test/obj_pool/TEST26 -- unit test for pmemobj_open
#

. ../unittest/unittest.sh

require_test_type medium

require_no_superuser

setup
umask 0

#
# TEST26 existing file, file size >= min required size, layout is NULL
#        (no write permissions)
#
expect_normal_exit ./obj_pool$EXESUFFIX c $DIR/testfile NULL 20 0640
chmod -w $DIR/testfile

expect_normal_exit ./obj_pool$EXESUFFIX o $DIR/testfile NULL

check

pass
