summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/external.c12
-rw-r--r--test/external_common.c12
-rw-r--r--test/external_common.h2
-rw-r--r--test/external_env.c24
4 files changed, 27 insertions, 23 deletions
diff --git a/test/external.c b/test/external.c
index af45445..6aa9d1b 100644
--- a/test/external.c
+++ b/test/external.c
@@ -635,7 +635,7 @@ test_read_file_set(hid_t fapl)
TEST_ERROR
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(0) < 0)
TEST_ERROR
/* Create the file and an initial group. This causes messages about
@@ -775,7 +775,7 @@ test_write_file_set(hid_t fapl)
} /* end for */
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(0) < 0)
TEST_ERROR
/* Create the dataset */
@@ -876,7 +876,7 @@ test_path_absolute(hid_t fapl)
FAIL_STACK_ERROR
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(0) < 0)
TEST_ERROR
/* Create the dcpl */
@@ -972,7 +972,7 @@ test_path_relative(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(0) < 0)
TEST_ERROR
/* Create the dataset */
@@ -1067,7 +1067,7 @@ test_path_relative_cwd(hid_t fapl)
FAIL_STACK_ERROR;
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(0) < 0)
TEST_ERROR
/* Create the dataset */
@@ -1209,7 +1209,7 @@ test_h5d_get_access_plist(hid_t fapl_id)
TEST_ERROR
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(0) < 0)
TEST_ERROR
/* Create the file */
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;
diff --git a/test/external_common.h b/test/external_common.h
index 50f6e6d..1e4fe7a 100644
--- a/test/external_common.h
+++ b/test/external_common.h
@@ -41,5 +41,5 @@ static const char *EXT_FNAME[] = {
#define TOTAL_SIZE 100
#define GARBAGE_PER_FILE 10
-H5TEST_DLL herr_t reset_raw_data_files(void);
+H5TEST_DLL herr_t reset_raw_data_files(int);
#endif /* _EXTERNAL_COMMON_H */
diff --git a/test/external_env.c b/test/external_env.c
index 0f8c9ec..a62e085 100644
--- a/test/external_env.c
+++ b/test/external_env.c
@@ -64,7 +64,7 @@ test_path_env(hid_t fapl)
FAIL_STACK_ERROR
/* Reset the raw data files */
- if(reset_raw_data_files() < 0)
+ if(reset_raw_data_files(1) < 0)
TEST_ERROR
/* Create the dataset */
@@ -73,7 +73,7 @@ test_path_env(hid_t fapl)
if(NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
TEST_ERROR
for(i = 0; i < N_EXT_FILES; i++) {
- HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int) i + 1);
+ HDsnprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int) i + 1);
if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -144,7 +144,6 @@ main(void)
hid_t fapl_id_new = -1; /* file access properties (new format) */
hid_t fid = -1; /* file for test_1* functions */
hid_t gid = -1; /* group to emit diagnostics */
- char filename[1024]; /* file name for test_1* funcs */
unsigned latest_format; /* default or latest file format */
int nerrors = 0; /* number of errors */
@@ -152,7 +151,6 @@ main(void)
/* Get a fapl for the old (default) file format */
fapl_id_old = h5_fileaccess();
- h5_fixname(EXT_FNAME[0], fapl_id_old, filename, sizeof(filename));
/* Copy and set up a fapl for the latest file format */
if((fapl_id_new = H5Pcopy(fapl_id_old)) < 0)
@@ -186,15 +184,15 @@ main(void)
/* Clean up files used by file set tests */
if(h5_cleanup(EXT_FNAME, fapl_id_old)) {
- HDremove("extern_1r.raw");
- HDremove("extern_2r.raw");
- HDremove("extern_3r.raw");
- HDremove("extern_4r.raw");
-
- HDremove("extern_1w.raw");
- HDremove("extern_2w.raw");
- HDremove("extern_3w.raw");
- HDremove("extern_4w.raw");
+ HDremove("extern_env_1r.raw");
+ HDremove("extern_env_2r.raw");
+ HDremove("extern_env_3r.raw");
+ HDremove("extern_env_4r.raw");
+
+ HDremove("extern_env_1w.raw");
+ HDremove("extern_env_2w.raw");
+ HDremove("extern_env_3w.raw");
+ HDremove("extern_env_4w.raw");
HDrmdir("extern_dir");
} /* end if */