use backend->access in IOR source

master
Shane Snyder 2018-04-25 17:35:10 -05:00
parent 7233bee953
commit 9b75f071f4
1 changed files with 2 additions and 8 deletions

View File

@ -1272,7 +1272,7 @@ static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
rankOffset = 0;
GetTestFileName(testFileName, test);
}
if (access(testFileName, F_OK) == 0) {
if (backend->access(testFileName, F_OK, test) == 0) {
backend->delete(testFileName, test);
}
if (test->reorderTasksRandom == TRUE) {
@ -1280,13 +1280,7 @@ static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
GetTestFileName(testFileName, test);
}
} else {
// BUG: "access()" assumes a POSIX filesystem. Maybe use
// backend->get_file_size(), instead, (and catch
// errors), or extend the aiori struct to include
// something to safely check for existence of the
// "file".
//
if ((rank == 0) && (access(testFileName, F_OK) == 0)) {
if ((rank == 0) && (backend->access(testFileName, F_OK, test) == 0)) {
backend->delete(testFileName, test);
}
}