summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-03-08 17:51:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-03-08 17:51:50 (GMT)
commit2a0cacb015b5452a221e2cd1f943c3044423bab3 (patch)
tree893886c0cf5b09ec8931e2a9d9fd4dc9fc60caa8
parent7942414b24288d497d4878754319dffa24bbec11 (diff)
parent71fa3dc480d9d6b1ea00c4f10e9ee0ec10c2c8d9 (diff)
downloadhdf5-2a0cacb015b5452a221e2cd1f943c3044423bab3.zip
hdf5-2a0cacb015b5452a221e2cd1f943c3044423bab3.tar.gz
hdf5-2a0cacb015b5452a221e2cd1f943c3044423bab3.tar.bz2
Merge pull request #328 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '71fa3dc480d9d6b1ea00c4f10e9ee0ec10c2c8d9': Fix alignment Fix vds tests
-rw-r--r--java/test/JUnit-interface.txt3
-rw-r--r--java/test/TestH5Pvirtual.java5
-rw-r--r--test/vds.c55
3 files changed, 42 insertions, 21 deletions
diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt
index 7fd80f8..34ec02a 100644
--- a/java/test/JUnit-interface.txt
+++ b/java/test/JUnit-interface.txt
@@ -530,6 +530,7 @@ JUnit version 4.11
.testH5Pvirtual_storage
.testH5Pget_selection_source_dataset
.testH5Pget_source_filename
+.testH5Pset_get_virtual_printf_gap
.testH5Pget_virtual_count
.testH5Pset_get_virtual_view
.testH5Pget_mapping_parameters
@@ -637,7 +638,7 @@ JUnit version 4.11
Time: XXXX
-OK (635 tests)
+OK (636 tests)
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): can't set access and transfer property lists
diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java
index 9372ae1..15fbd03 100644
--- a/java/test/TestH5Pvirtual.java
+++ b/java/test/TestH5Pvirtual.java
@@ -220,6 +220,7 @@ public class TestH5Pvirtual {
try {H5.H5Dclose(H5did);} catch (Exception ex) {}
}
assertTrue("testH5Pget_virtual_count: "+num_map, num_map >= 0);
+ assertEquals(3, num_map);
}
@Test
@@ -406,7 +407,7 @@ public class TestH5Pvirtual {
}
}
- @Ignore
+ @Test
public void testH5Pset_get_virtual_printf_gap() {
long ret_val = -1;
H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id);
@@ -415,7 +416,7 @@ public class TestH5Pvirtual {
assertTrue("H5Pget_virtual_printf_gap", ret_val >= 0);
assertEquals(0, ret_val);
H5.H5Pset_virtual_printf_gap(H5dapl_id, 2);
- ret_val = H5.H5Pget_virtual_view(H5dapl_id);
+ ret_val = H5.H5Pget_virtual_printf_gap(H5dapl_id);
assertTrue("H5Pget_virtual_printf_gap", ret_val >= 0);
assertEquals(2, ret_val);
}
diff --git a/test/vds.c b/test/vds.c
index 2fd492a..e6bfeb3 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -2812,7 +2812,7 @@ test_basic_io(unsigned config, hid_t fapl)
/* Write data directly to source dataset */
if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, memspace, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR
/* Close srcdset and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -7265,6 +7265,12 @@ test_printf(unsigned config, hid_t fapl)
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
+ /* Test H5Pget_virtual_printf_gap() */
+ if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
+ TEST_ERROR
+ if(gap_size != (hsize_t)2)
+ TEST_ERROR
+
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
TEST_ERROR
@@ -7329,6 +7335,12 @@ test_printf(unsigned config, hid_t fapl)
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
+ /* Test H5Pget_virtual_printf_gap() */
+ if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
+ TEST_ERROR
+ if(gap_size != (hsize_t)3)
+ TEST_ERROR
+
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
TEST_ERROR
@@ -7393,6 +7405,12 @@ test_printf(unsigned config, hid_t fapl)
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
+ /* Test H5Pget_virtual_printf_gap() */
+ if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
+ TEST_ERROR
+ if(gap_size != (hsize_t)4)
+ TEST_ERROR
+
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
TEST_ERROR
@@ -11121,23 +11139,23 @@ error:
static int
test_dapl_values(hid_t fapl_id)
{
- hid_t fid = -1; /* file to write to */
- hid_t dcpl_id = -1; /* dataset creation properties */
- hid_t dapl_id1 = -1; /* dataset access properties */
- hid_t dapl_id2 = -1; /* dataset access properties */
- hid_t vds_sid = -1; /* vds data space */
- hid_t src_sid = -1; /* source data space */
- hid_t did1 = -1; /* dataset */
- hid_t did2 = -1; /* dataset */
- hsize_t start; /* hyperslab start */
- hsize_t stride; /* hyperslab count */
- hsize_t count; /* hyperslab count */
- hsize_t block; /* hyperslab count */
- hsize_t dims; /* dataset size */
- hsize_t max_dims; /* dataset max size */
- H5D_vds_view_t view; /* view from dapl */
- hsize_t gap_size; /* gap size from dapl */
- char filename[1024]; /* file names */
+ hid_t fid = -1; /* file to write to */
+ hid_t dcpl_id = -1; /* dataset creation properties */
+ hid_t dapl_id1 = -1; /* dataset access properties */
+ hid_t dapl_id2 = -1; /* dataset access properties */
+ hid_t vds_sid = -1; /* vds data space */
+ hid_t src_sid = -1; /* source data space */
+ hid_t did1 = -1; /* dataset */
+ hid_t did2 = -1; /* dataset */
+ hsize_t start; /* hyperslab start */
+ hsize_t stride; /* hyperslab count */
+ hsize_t count; /* hyperslab count */
+ hsize_t block; /* hyperslab count */
+ hsize_t dims; /* dataset size */
+ hsize_t max_dims; /* dataset max size */
+ H5D_vds_view_t view; /* view from dapl */
+ hsize_t gap_size; /* gap size from dapl */
+ char filename[1024]; /* file names */
TESTING("H5Dget_access_plist() returns dapl w/ correct values");
@@ -11221,6 +11239,7 @@ test_dapl_values(hid_t fapl_id)
if(H5Pget_virtual_printf_gap(dapl_id2, &gap_size) < 0)
FAIL_STACK_ERROR
if(gap_size != 123)
+ TEST_ERROR
/* Close everything */
if(H5Sclose(vds_sid) < 0) FAIL_STACK_ERROR