summaryrefslogtreecommitdiffstats
path: root/test/vds_env.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-27 17:31:34 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-27 17:31:34 (GMT)
commit2c69584fb124c20e1dd06c31f2baf240b50b381c (patch)
treed2a2f6cb49c21a49d42ed18fcf2c1cff13af8bb0 /test/vds_env.c
parent439ea92d7e58c9900ef617bbe616a5ce36c709e9 (diff)
parent569d051df5b295041a7f6cb73d6220f4999a8633 (diff)
downloadhdf5-2c69584fb124c20e1dd06c31f2baf240b50b381c.zip
hdf5-2c69584fb124c20e1dd06c31f2baf240b50b381c.tar.gz
hdf5-2c69584fb124c20e1dd06c31f2baf240b50b381c.tar.bz2
Merge pull request #1778 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor_pr to develop
* commit '569d051df5b295041a7f6cb73d6220f4999a8633': Fixed missing return value checks in VDS tests.
Diffstat (limited to 'test/vds_env.c')
-rw-r--r--test/vds_env.c18
1 files changed, 12 insertions, 6 deletions
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