summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-02-24 19:54:48 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-02-24 19:54:48 (GMT)
commit28111339143e6c3f9aa8d4f96c771472a1a79c55 (patch)
tree76000c9a80ce336f86cdf85d4d0cf01fc34464ac /test
parent80e77e7d778ea5d5bfcfc92f9492cdfdc1dd0197 (diff)
downloadhdf5-28111339143e6c3f9aa8d4f96c771472a1a79c55.zip
hdf5-28111339143e6c3f9aa8d4f96c771472a1a79c55.tar.gz
hdf5-28111339143e6c3f9aa8d4f96c771472a1a79c55.tar.bz2
[svn-r26293] Implement patching of virtual dataspace extent in mapping dataspaces when
opening virtual dataset. Add tests for this. Tested: ummon
Diffstat (limited to 'test')
-rw-r--r--test/vds.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/test/vds.c b/test/vds.c
index a37f2b0..42f3f06 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -164,6 +164,7 @@ test_api(test_api_config_t config, hid_t fapl)
hid_t space_out = -1;
char name_out[32];
hsize_t blocklist[4];
+ htri_t tri_ret;
unsigned i;
switch(config) {
@@ -218,14 +219,6 @@ test_api(test_api_config_t config, hid_t fapl)
if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0)
TEST_ERROR
- /* Close dataspaces */
- if(H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
- srcspace[0] = -1;
- if(H5Sclose(vspace[0]) < 0)
- TEST_ERROR
- vspace[0] = -1;
-
/* Test H5Pget_virtual_count */
if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0)
TEST_ERROR
@@ -235,6 +228,10 @@ test_api(test_api_config_t config, hid_t fapl)
/* Test H5Pget_virtual_vspace */
if((space_out = H5Pget_virtual_vspace(ex_dcpl, 0)) < 0)
TEST_ERROR
+ if((tri_ret = H5Sextent_equal(space_out, vspace[0])) < 0)
+ TEST_ERROR
+ if(!tri_ret)
+ TEST_ERROR
if(H5Sget_select_type(space_out) != H5S_SEL_ALL)
TEST_ERROR
if(H5Sclose(space_out) < 0)
@@ -277,6 +274,12 @@ test_api(test_api_config_t config, hid_t fapl)
TEST_ERROR
/* Close */
+ if(H5Sclose(srcspace[0]) < 0)
+ TEST_ERROR
+ srcspace[0] = -1;
+ if(H5Sclose(vspace[0]) < 0)
+ TEST_ERROR
+ vspace[0] = -1;
if(H5Pclose(ex_dcpl) < 0)
TEST_ERROR
ex_dcpl = -1;
@@ -333,14 +336,6 @@ test_api(test_api_config_t config, hid_t fapl)
if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename) < 0)
TEST_ERROR
- /* Close dataspaces */
- if(H5Sclose(srcspace[0]) < 0)
- TEST_ERROR
- srcspace[0] = -1;
- if(H5Sclose(vspace[0]) < 0)
- TEST_ERROR
- vspace[0] = -1;
-
/* Test H5Pget_virtual_count */
if(H5Pget_virtual_count(ex_dcpl, &size_out) < 0)
TEST_ERROR
@@ -352,6 +347,10 @@ test_api(test_api_config_t config, hid_t fapl)
/* Test H5Pget_virtual_vspace */
if((space_out = H5Pget_virtual_vspace(ex_dcpl, i)) < 0)
TEST_ERROR
+ if((tri_ret = H5Sextent_equal(space_out, vspace[0])) < 0)
+ TEST_ERROR
+ if(!tri_ret)
+ TEST_ERROR
if(H5Sget_select_type(space_out) != H5S_SEL_HYPERSLABS)
TEST_ERROR
if((ssize_out = H5Sget_select_hyper_nblocks(space_out)) < 0)
@@ -413,6 +412,12 @@ test_api(test_api_config_t config, hid_t fapl)
} /* end if */
/* Close */
+ if(H5Sclose(srcspace[0]) < 0)
+ TEST_ERROR
+ srcspace[0] = -1;
+ if(H5Sclose(vspace[0]) < 0)
+ TEST_ERROR
+ vspace[0] = -1;
if(H5Pclose(ex_dcpl) < 0)
TEST_ERROR
ex_dcpl = -1;