summaryrefslogtreecommitdiffstats
path: root/test/external_common.c
diff options
context:
space:
mode:
authorSongyu Lu <songyulu@hdfgroup.org>2019-04-22 15:23:38 (GMT)
committerSongyu Lu <songyulu@hdfgroup.org>2019-04-22 15:23:38 (GMT)
commit2c47094d4004c916d16667a23efe018db2c0558d (patch)
tree3b58f8260550898cf95b8eb2b77f0d6c7efb5dee /test/external_common.c
parent500f6cccbd4bfe01b67f2bd02f74df58edef045f (diff)
downloadhdf5-2c47094d4004c916d16667a23efe018db2c0558d.zip
hdf5-2c47094d4004c916d16667a23efe018db2c0558d.tar.gz
hdf5-2c47094d4004c916d16667a23efe018db2c0558d.tar.bz2
Changing file names to avoid possible conflicts during parallel test.
Diffstat (limited to 'test/external_common.c')
-rw-r--r--test/external_common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/external_common.c b/test/external_common.c
index e43a713..c3aa455 100644
--- a/test/external_common.c
+++ b/test/external_common.c
@@ -35,7 +35,7 @@
*-------------------------------------------------------------------------
*/
herr_t
-reset_raw_data_files(void)
+reset_raw_data_files(int is_env)
{
int fd = 0; /* external file descriptor */
size_t i, j; /* iterators */
@@ -59,7 +59,10 @@ reset_raw_data_files(void)
for(i = 0; i < N_EXT_FILES; i++) {
/* Open file */
- HDsprintf(filename, "extern_%lur.raw", (unsigned long)i + 1);
+ if(is_env)
+ HDsprintf(filename, "extern_env_%lur.raw", (unsigned long)i + 1);
+ else
+ HDsprintf(filename, "extern_%lur.raw", (unsigned long)i + 1);
if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
@@ -93,7 +96,10 @@ reset_raw_data_files(void)
for(i = 0; i < N_EXT_FILES; i++) {
/* Open file */
- HDsprintf(filename, "extern_%luw.raw", (unsigned long)i + 1);
+ if(is_env)
+ HDsprintf(filename, "extern_env_%luw.raw", (unsigned long)i + 1);
+ else
+ HDsprintf(filename, "extern_%luw.raw", (unsigned long)i + 1);
if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;