diff options
author | Songyu Lu <songyulu@hdfgroup.org> | 2019-08-14 20:50:56 (GMT) |
---|---|---|
committer | Songyu Lu <songyulu@hdfgroup.org> | 2019-08-14 20:50:56 (GMT) |
commit | bb6c72b330560f91271cde0ba4d8620570414733 (patch) | |
tree | d6c68f22033f455f92d12e83f7710e7f1290d9c4 /test/vds_env.c | |
parent | a09ce0450f3480b7dc9be08c779e72ffb0759aa2 (diff) | |
parent | 3b003bf3515b5eccf2995811f88a82aaf7639e64 (diff) | |
download | hdf5-bb6c72b330560f91271cde0ba4d8620570414733.zip hdf5-bb6c72b330560f91271cde0ba4d8620570414733.tar.gz hdf5-bb6c72b330560f91271cde0ba4d8620570414733.tar.bz2 |
Merge branch 'hdf5_1_10' of https://bitbucket.hdfgroup.org/scm/~songyulu/hdf5_ray into bugfix/directory_name
Diffstat (limited to 'test/vds_env.c')
-rw-r--r-- | test/vds_env.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/vds_env.c b/test/vds_env.c index 4f93bf0..fc6652b 100644 --- a/test/vds_env.c +++ b/test/vds_env.c @@ -22,7 +22,7 @@ const char *FILENAME[] = { "vds_env_virt_0", "vds_env_virt_3", "vds_env_src_2", - "vds_env_%%_src2", + "vds_env%%_src2", NULL }; @@ -130,11 +130,14 @@ test_vds_prefix_second(unsigned config, hid_t fapl) /* Create source file if requested */ if(config & TEST_IO_DIFFERENT_FILE) { - HDgetcwd(buffer, 1024); - HDchdir(TMPDIR); + if(NULL == HDgetcwd(buffer, 1024)) + TEST_ERROR + if(HDchdir(TMPDIR) < 0) + TEST_ERROR if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - HDchdir(buffer); + if(HDchdir(buffer) < 0) + TEST_ERROR } else { srcfile[0] = vfile; @@ -211,11 +214,14 @@ test_vds_prefix_second(unsigned config, hid_t fapl) /* Reopen srcdset and srcfile if config option specified */ if(config & TEST_IO_CLOSE_SRC) { if(config & TEST_IO_DIFFERENT_FILE) { - HDgetcwd(buffer, 1024); - HDchdir(TMPDIR); + if(NULL == HDgetcwd(buffer, 1024)) + TEST_ERROR + if(HDchdir(TMPDIR) < 0) + TEST_ERROR if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR - HDchdir(buffer); + if(HDchdir(buffer) < 0) + TEST_ERROR } if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0) TEST_ERROR |