summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2019-06-27 20:52:36 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2019-06-27 20:52:36 (GMT)
commit565e3d795102b87e05b9df2d25aeff5b095c6ad5 (patch)
treea84ba1932eed18bb5663642d47df0db875d6b90b /test
parentdb61d2940a388ab17e1cbf80a1f69e24c0fe972c (diff)
parent2c69584fb124c20e1dd06c31f2baf240b50b381c (diff)
downloadhdf5-565e3d795102b87e05b9df2d25aeff5b095c6ad5.zip
hdf5-565e3d795102b87e05b9df2d25aeff5b095c6ad5.tar.gz
hdf5-565e3d795102b87e05b9df2d25aeff5b095c6ad5.tar.bz2
Merge pull request #12 in ~VCHOI/my_third_fork from develop to bugfix/new_shutdown_fsm
* commit '2c69584fb124c20e1dd06c31f2baf240b50b381c': Fixed missing return value checks in VDS tests.
Diffstat (limited to 'test')
-rw-r--r--test/vds.c18
-rw-r--r--test/vds_env.c18
2 files changed, 24 insertions, 12 deletions
diff --git a/test/vds.c b/test/vds.c
index 30f8eec..5870d49 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -1212,11 +1212,14 @@ test_vds_prefix_first(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;
@@ -1293,11 +1296,14 @@ test_vds_prefix_first(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
diff --git a/test/vds_env.c b/test/vds_env.c
index abdd7b7..d3a28fb 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -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