explicitly disable O_CREAT and O_EXCL when doing read-only test

master
Glenn K. Lockwood 2017-04-28 13:01:30 -07:00
parent c5bbe9e996
commit 9457bb958b
1 changed files with 3 additions and 1 deletions

View File

@ -122,8 +122,10 @@ static void CheckRunSettings(IOR_test_t *tests)
&& (params->openFlags & IOR_RDWR)) {
params->openFlags &= ~(IOR_RDWR);
if (params->readFile | params->checkRead)
if (params->readFile | params->checkRead) {
params->openFlags |= IOR_RDONLY;
params->openFlags &= ~(IOR_CREAT|IOR_EXCL);
}
else
params->openFlags |= IOR_WRONLY;
}