summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/freespace.c8
-rw-r--r--test/testcheck_version.sh.in6
-rw-r--r--test/trefer.c12
-rw-r--r--test/tselect.c92
-rw-r--r--test/vfd.c3
5 files changed, 61 insertions, 60 deletions
diff --git a/test/freespace.c b/test/freespace.c
index f9f1932..124ae3e 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -880,7 +880,7 @@ test_fs_sect_add(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -1249,7 +1249,7 @@ test_fs_sect_find(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2737,7 +2737,7 @@ test_fs_sect_extend(hid_t fapl)
PASSED();
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2839,7 +2839,7 @@ test_fs_sect_iterate(hid_t fapl)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in
index 836170d..0c2c4cd 100644
--- a/test/testcheck_version.sh.in
+++ b/test/testcheck_version.sh.in
@@ -216,9 +216,9 @@ h5libsettings=../src/libhdf5.settings
PURPOSE
# Figure out library version numbers from the header file.
-h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | cut -f2`
-h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | cut -f2`
-h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | cut -f2`
+h5versmajor=`grep '#define H5_VERS_MAJOR' $srcdir/../src/H5public.h | awk '{print $3}'`
+h5versminor=`grep '#define H5_VERS_MINOR' $srcdir/../src/H5public.h | awk '{print $3}'`
+h5versrelease=`grep '#define H5_VERS_RELEASE' $srcdir/../src/H5public.h | awk '{print $3}'`
DEBUGPRINT $h5versmajor.$h5versminor.$h5versrelease
case "$h5versmajor$h5versminor$h5versrelease" in
[0-9]*) # good. noop.
diff --git a/test/trefer.c b/test/trefer.c
index 15f9d64..12651c7 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -247,9 +247,9 @@ test_reference_params(void)
/* Test parameters to H5Ropen_object */
dset2 = H5Ropen_object(&rbuf[0], H5I_INVALID_HID, H5I_INVALID_HID);
- VERIFY(dset2, FAIL, "H5Ropen_object oapl_id");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object oapl_id");
dset2 = H5Ropen_object(NULL, H5P_DEFAULT, dapl_id);
- VERIFY(dset2, FAIL, "H5Ropen_object ref");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object ref");
/* Test parameters to H5Ropen_region */
ret_id = H5Ropen_region(NULL, H5I_INVALID_HID, H5I_INVALID_HID);
@@ -2258,7 +2258,7 @@ test_reference_compat_conv(void)
/* Create a dataset with region reference datatype */
dataset = H5Dcreate2(fid1, "Dataset4", H5T_STD_REF_DSETREG, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Select 6x6 hyperslab for first reference */
start[0] = 2;
@@ -2316,11 +2316,11 @@ test_reference_compat_conv(void)
/* Re-open the file */
fid1 = H5Fopen(FILE_REF_COMPAT, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/* Open the object reference dataset */
dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_obj);
@@ -2376,7 +2376,7 @@ test_reference_compat_conv(void)
/* Open the dataset region reference dataset */
dataset = H5Dopen2(fid1, "/Dataset4", H5P_DEFAULT);
- CHECK(ret, H5I_INVALID_HID, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg);
diff --git a/test/tselect.c b/test/tselect.c
index 492a917..aa0ab11 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1666,10 +1666,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
/****************************************************************
**
** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace)
-** selection code with contiguous source and target having
-** different ranks but the same shape. We have already
-** tested H5Sselect_shape_same in isolation, so now we try to do
-** I/O.
+** selection code with contiguous source and target having
+** different ranks but the same shape. We have already
+** tested H5Sselect_shape_same in isolation, so now we try to do
+** I/O.
**
****************************************************************/
static void
@@ -6118,8 +6118,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
*/
tmpdata = data;
for (j = 0; j < X; j++)
- for (i = 0; i < Y; i++)
- for (k = 0; k < Z; k++)
+ for (i = 0; i < Y; i++)
+ for (k = 0; k < Z; k++)
*tmpdata++ = (short)((k+1)%256);
/*
@@ -6281,8 +6281,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
tmpdata = data;
tmpdata_out = data_out;
for (j = 0; j < X; j++)
- for (i = 0; i < Y; i++)
- for (k = 0; k < Z; k++,tmpdata++,tmpdata_out++) {
+ for (i = 0; i < Y; i++)
+ for (k = 0; k < Z; k++,tmpdata++,tmpdata_out++) {
if(*tmpdata!=*tmpdata_out)
TestErrPrintf("Line %d: Error! j=%d, i=%d, k=%d, *tmpdata=%x, *tmpdata_out=%x\n",__LINE__,j,i,k,(unsigned)*tmpdata,(unsigned)*tmpdata_out);
} /* end for */
@@ -6350,7 +6350,7 @@ test_select_point_chunk(void)
*/
tmpdata = data;
for (i = 0; i < SPACE7_DIM1; i++)
- for (j = 0; j < SPACE7_DIM1; j++)
+ for (j = 0; j < SPACE7_DIM1; j++)
*tmpdata++ = ((i*SPACE7_DIM2)+j)%256;
/*
@@ -9388,15 +9388,15 @@ test_shape_same_dr__smoke_check_1(void)
** a "checker board" hyperslab as follows:
**
** * * - - * * - - * *
-** * * - - * * - - * *
-** - - * * - - * * - -
-** - - * * - - * * - -
** * * - - * * - - * *
-** * * - - * * - - * *
-** - - * * - - * * - -
-** - - * * - - * * - -
+** - - * * - - * * - -
+** - - * * - - * * - -
+** * * - - * * - - * *
+** * * - - * * - - * *
+** - - * * - - * * - -
+** - - * * - - * * - -
+** * * - - * * - - * *
** * * - - * * - - * *
-** * * - - * * - - * *
**
** where asterisks indicate selected elements, and dashes
** indicate unselected elements.
@@ -12026,16 +12026,16 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg1, sid_reg_ori1);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
/* For irregular hyperslab */
sid_irreg1 = H5Screate_simple(SPACERE1_RANK,dims1,NULL);
@@ -12062,11 +12062,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
@@ -12114,7 +12114,7 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
@@ -12123,7 +12123,7 @@ test_space_rebuild(void)
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg2, sid_reg_ori2);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
/* 2-D irregular case */
sid_irreg2 = H5Screate_simple(SPACERE2_RANK,dims2,NULL);
@@ -12155,11 +12155,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 3-D hyperslab selection\n"));
@@ -12212,16 +12212,16 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg3, sid_reg_ori3);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
sid_irreg3 = H5Screate_simple(SPACERE3_RANK,dims3,NULL);
@@ -12258,11 +12258,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 4-D hyperslab selection\n"));
@@ -12323,16 +12323,16 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg4, sid_reg_ori4);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
/* Testing irregular selection */
sid_irreg4 = H5Screate_simple(SPACERE4_RANK,dims4,NULL);
@@ -12380,11 +12380,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 5-D hyperslab selection\n"));
@@ -12449,16 +12449,16 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(ret != FAIL) {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5Sselect_shape_same(sid_reg5, sid_reg_ori5);
CHECK(rebuild_check, FALSE, "H5Sselect_shape_same");
- } /* end if */
+ }
sid_irreg5 = H5Screate_simple(SPACERE5_RANK,dims5,NULL);
@@ -12511,11 +12511,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
/* We use 5-D to test a special case with
@@ -12558,11 +12558,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
/* Adding some selections to make it real irregular */
@@ -12586,11 +12586,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_IMPOSSIBLE) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
/* Add more selections to make it regular again */
@@ -12614,11 +12614,11 @@ test_space_rebuild(void)
if(rebuild_stat1 != H5S_DIMINFO_VALID_NO) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
if(rebuild_stat2 != H5S_DIMINFO_VALID_YES) {
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- } /* end if */
+ }
/* No need to do shape comparision */
H5Sclose(sid_reg1);
diff --git a/test/vfd.c b/test/vfd.c
index 97995d2..d94aec6 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -2490,7 +2490,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
{
H5FD_splitter_vfd_config_t vfd_config;
hid_t split_fapl_id = H5I_INVALID_HID;
- herr_t ret;
+ herr_t ret = SUCCEED;
int ret_value = 0;
split_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -2503,6 +2503,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
vfd_config.rw_fapl_id = H5P_DEFAULT;
vfd_config.wo_fapl_id = fapl_id;
HDstrncpy(vfd_config.wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
+ *vfd_config.log_file_path = '\0';
H5E_BEGIN_TRY {
ret = H5Pset_fapl_splitter(split_fapl_id, &vfd_config);