Fixed missing return value checks in VDS tests.

This commit is contained in:
Dana Robinson 2019-06-26 21:55:11 -07:00
parent 439ea92d7e
commit 569d051df5
2 changed files with 24 additions and 12 deletions

View File

@ -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

View File

@ -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