Skip to content

Commit 4dc989d

Browse files
Merge pull request #6 from glennklockwood/master
explicitly disable O_CREAT and O_EXCL when doing read-only test
2 parents c5bbe9e + 9457bb9 commit 4dc989d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/parse_options.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ static void CheckRunSettings(IOR_test_t *tests)
122122
&& (params->openFlags & IOR_RDWR)) {
123123

124124
params->openFlags &= ~(IOR_RDWR);
125-
if (params->readFile | params->checkRead)
125+
if (params->readFile | params->checkRead) {
126126
params->openFlags |= IOR_RDONLY;
127+
params->openFlags &= ~(IOR_CREAT|IOR_EXCL);
128+
}
127129
else
128130
params->openFlags |= IOR_WRONLY;
129131
}

0 commit comments

Comments
 (0)