summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-09-30 17:56:49 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-09-30 17:56:49 (GMT)
commit9ea386b6a660bd29225e96a246439db0c7f73da2 (patch)
tree2815e2c784aeed63f9c1f8de1ab6f31bded45465
parent4de1fa88c258223fdb031e1bb1179785ecfcc166 (diff)
downloadhdf5-9ea386b6a660bd29225e96a246439db0c7f73da2.zip
hdf5-9ea386b6a660bd29225e96a246439db0c7f73da2.tar.gz
hdf5-9ea386b6a660bd29225e96a246439db0c7f73da2.tar.bz2
Fixed the iteration error in test_versionbounds() in test/dtypes.c.
-rw-r--r--release_docs/RELEASE.txt10
-rw-r--r--test/dtypes.c11
2 files changed, 15 insertions, 6 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index b861914..0f1f936 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -362,6 +362,16 @@ Bug Fixes since HDF5-1.10.3 release
Library
-------
+ - Fixed the iteration error in test_versionbounds() in test/dtypes.c
+
+ The test was supposed to loop through all valid combinations of
+ low and high bounds in the array versions[], but they were set to
+ H5F_LIBVER_EARLIEST always without changing.
+
+ The problem was fixed by indexing low and high into the array versions[].
+
+ (VC - 2019/09/30)
+
- Fixed the slowness of regular hyperslab selection in a chunked dataset
It was reported that the selection of every 10th element from a 20G
diff --git a/test/dtypes.c b/test/dtypes.c
index 4ccb951..98a3f87 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -7648,8 +7648,7 @@ test_versionbounds(void)
H5F_t *filep = NULL; /* Pointer to internal structure of a file */
H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */
hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */
- int i, j; /* Indices for iterating over versions */
- H5F_libver_t low, high; /* File format bounds */
+ int low, high; /* Indices for iterating over versions */
H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110, H5F_LIBVER_V112, H5F_LIBVER_V114};
int versions_count = 5; /* Number of version bounds in the array */
unsigned highest_version; /* Highest version in nested datatypes */
@@ -7751,13 +7750,13 @@ test_versionbounds(void)
skipping invalid combinations */
/* Create the file, create and write to a dataset with compound datatype */
/* Verify the dataset's datatype and its members */
- for(i = 0, low = versions[i]; i < versions_count; i++) {
+ for(low = 0; low < versions_count; low++) {
- for(j = 0, high = versions[j]; j < versions_count; j++) {
+ for(high = 0; high < versions_count; high++) {
/* Set version bounds */
H5E_BEGIN_TRY {
- ret = H5Pset_libver_bounds(fapl, low, high);
+ ret = H5Pset_libver_bounds(fapl, versions[low], versions[high]);
} H5E_END_TRY;
if (ret < 0) /* Invalid low/high combinations */
@@ -7783,7 +7782,7 @@ test_versionbounds(void)
highest_version = dtypep->shared->version;
/* Verify version of the datatype recursevily */
- ret = verify_version(dset_dtype, low, &highest_version);
+ ret = verify_version(dset_dtype, versions[low], &highest_version);
/* Close the dataset's datatype */
if (H5Tclose(dset_dtype) < 0) TEST_ERROR