From f03e7c6778956d96e51a1ff69a87363d076488ad Mon Sep 17 00:00:00 2001 From: Jean-Yves VET Date: Thu, 20 Sep 2018 11:25:34 +0200 Subject: [PATCH] Make write verification work even without read test Context: IOR outputs errors when the '-w -W' flags are used without '-r'. Write a file using with check write option should be possible even without setting read. This patch fixes a condition which was introduced for HDFS to remove RDWR flag in some particular cases. Write check was set with the write only flag but it requieres the read flag. --- src/parse_options.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/parse_options.c b/src/parse_options.c index a8f81b0..7830f0d 100755 --- a/src/parse_options.c +++ b/src/parse_options.c @@ -88,9 +88,8 @@ static void CheckRunSettings(IOR_test_t *tests) * (We assume int-valued params are exclusively 0 or 1.) */ if ((params->openFlags & IOR_RDWR) - && ((params->readFile | params->checkRead) - ^ (params->writeFile | params->checkWrite)) - && (params->openFlags & IOR_RDWR)) { + && ((params->readFile | params->checkRead | params->checkWrite) + ^ params->writeFile)) { params->openFlags &= ~(IOR_RDWR); if (params->readFile | params->checkRead) { @@ -100,7 +99,6 @@ static void CheckRunSettings(IOR_test_t *tests) else params->openFlags |= IOR_WRONLY; } - } }