From 9b75f071f47c969562d7455375b546b33146b36d Mon Sep 17 00:00:00 2001 From: Shane Snyder Date: Wed, 25 Apr 2018 17:35:10 -0500 Subject: [PATCH] use backend->access in IOR source --- src/ior.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/ior.c b/src/ior.c index a6029cd..c025e95 100755 --- a/src/ior.c +++ b/src/ior.c @@ -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); } }