summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-04-30 22:22:09 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-04-30 22:22:09 (GMT)
commit64e13ca220a8d99e2282b680a852a038dd217d60 (patch)
treee3764cc9ce69e6f8ba684ed071c430e489577f06 /test
parent3313fde3bb8b6cc5cfa3c8401615ac064f7cbdf9 (diff)
parent1f8cb03e11a46f853881f45dac18eff2dd68401e (diff)
downloadhdf5-64e13ca220a8d99e2282b680a852a038dd217d60.zip
hdf5-64e13ca220a8d99e2282b680a852a038dd217d60.tar.gz
hdf5-64e13ca220a8d99e2282b680a852a038dd217d60.tar.bz2
Merge branch 'develop' into h5do_direct_chunk_hl_to_src
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt30
-rw-r--r--test/CMakeTests.cmake1
-rw-r--r--test/Makefile.am2
-rw-r--r--test/tselect.c410
4 files changed, 231 insertions, 212 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0d93211..bf4dcf4 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
-PROJECT (HDF5_TEST)
+project (HDF5_TEST C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@@ -9,9 +9,8 @@ add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+set (srcdir ${HDF5_TEST_SOURCE_DIR})
configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
#################################################################################
# Define Test Library Sources
@@ -30,6 +29,7 @@ set (TEST_LIB_HEADERS
)
add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
+set_property(TARGET ${HDF5_TEST_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ")
if (MSVC)
target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "ws2_32.lib")
@@ -47,6 +47,7 @@ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
+ set_property(TARGET ${HDF5_TEST_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ")
if (MSVC)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "ws2_32.lib")
@@ -94,10 +95,9 @@ endif ()
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
+ set_property(TARGET ${HDF5_TEST_PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
@@ -120,10 +120,9 @@ endif ()
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
+ set_property(TARGET ${HDF5_TEST_PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
@@ -252,11 +251,13 @@ set (H5_TESTS
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ set_property(TARGET ${file} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${file} STATIC " " " ")
target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET})
set_target_properties (${file} PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ set_property(TARGET ${file}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (${file}-shared PROPERTIES FOLDER test)
@@ -281,11 +282,13 @@ endforeach ()
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
+set_property(TARGET testhdf5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET})
set_target_properties (testhdf5 PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (testhdf5-shared ${testhdf5_SOURCES})
+ set_property(TARGET testhdf5-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
@@ -293,11 +296,13 @@ endif ()
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
+set_property(TARGET cache_image APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cache_image STATIC " " " ")
target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_image PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (cache_image-shared ${cache_image_SOURCES})
+ set_property(TARGET cache_image-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ")
target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (cache_image-shared PROPERTIES FOLDER test)
@@ -305,11 +310,13 @@ endif ()
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
+set_property(TARGET ttsafe APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ttsafe STATIC " " " ")
target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (ttsafe PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (ttsafe-shared ${ttsafe_SOURCES})
+ set_property(TARGET ttsafe-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ")
target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
@@ -388,6 +395,7 @@ endforeach ()
# This has to be copied to the test directory for execve() to find it
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
+set_property(TARGET accum_swmr_reader APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (accum_swmr_reader STATIC " " " ")
target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (accum_swmr_reader PROPERTIES FOLDER test)
@@ -403,11 +411,13 @@ endif ()
##############################################################################
if (BUILD_SHARED_LIBS)
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
+ set_property(TARGET filter_plugin APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (filter_plugin SHARED " " " ")
target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
else ()
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
+ set_property(TARGET filter_plugin APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (filter_plugin STATIC " " " ")
target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
@@ -418,11 +428,13 @@ endif ()
##############################################################################
set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
+set_property(TARGET use_append_chunk APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_chunk STATIC " " " ")
target_link_libraries (use_append_chunk ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (use_append_chunk PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (use_append_chunk-shared ${use_append_chunk_SOURCES})
+ set_property(TARGET use_append_chunk-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_chunk-shared SHARED " " " ")
target_link_libraries (use_append_chunk-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test)
@@ -430,11 +442,13 @@ endif ()
set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
+set_property(TARGET use_append_mchunks APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_mchunks STATIC " " " ")
target_link_libraries (use_append_mchunks ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (use_append_mchunks PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (use_append_mchunks-shared ${use_append_mchunks_SOURCES})
+ set_property(TARGET use_append_mchunks-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED " " " ")
target_link_libraries (use_append_mchunks-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test)
@@ -442,11 +456,13 @@ endif ()
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
+set_property(TARGET use_disable_mdc_flushes APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC " " " ")
target_link_libraries (use_disable_mdc_flushes ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (use_disable_mdc_flushes-shared ${use_disable_mdc_flushes_SOURCES})
+ set_property(TARGET use_disable_mdc_flushes-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED " " " ")
target_link_libraries (use_disable_mdc_flushes-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 6f914ba..4636ac2 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -1009,6 +1009,7 @@ endif ()
if (HDF5_BUILD_GENERATORS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
+ set_property(TARGET ${genfile} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${genfile} STATIC " " " ")
target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
diff --git a/test/Makefile.am b/test/Makefile.am
index 8f671ac..dcc002c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src
# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_filenotclosed.sh\
testswmr.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh
-SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) test_filenotclosed$(EXEEXT) \
+SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) filenotclosed$(EXEEXT) \
flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) swmr_writer$(EXEEXT) \
swmr_remove_reader$(EXEEXT) swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \
diff --git a/test/tselect.c b/test/tselect.c
index 2022a11..3c93e7a 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1644,8 +1644,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
/* Advance to next element */
cube_ptr++;
expected_value++;
- s++;
- m++;
+ s++;
+ m++;
} while((cube_rank > 0) && (m < edge_size));
l++;
} while((cube_rank > 1) && (l < edge_size));
@@ -1662,10 +1662,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
+** 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 H5S_shape_same in isolation, so now we try to do
+** tested H5S_shape_same in isolation, so now we try to do
** I/O.
**
****************************************************************/
@@ -1769,13 +1769,13 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
CHECK(file_large_cube_sid, FAIL, "H5Screate_simple");
/* if chunk edge size is greater than zero, set up the small and
- * large data set creation property lists to specify chunked
+ * large data set creation property lists to specify chunked
* datasets.
*/
if(chunk_edge_size > 0) {
hsize_t chunk_dims[SS_DR_MAX_RANK]; /* Chunk dimensions */
- chunk_dims[0] = chunk_dims[1] =
+ chunk_dims[0] = chunk_dims[1] =
chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = (hsize_t)chunk_edge_size;
small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
@@ -1799,7 +1799,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end if */
/* create the small cube dataset */
- small_cube_dataset = H5Dcreate2(fid1, "small_cube_dataset", dset_type,
+ small_cube_dataset = H5Dcreate2(fid1, "small_cube_dataset", dset_type,
small_cube_sid, H5P_DEFAULT, small_cube_dcpl_id, H5P_DEFAULT);
CHECK(small_cube_dataset, FAIL, "H5Dcreate2");
@@ -1810,7 +1810,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end if */
/* create the large cube dataset */
- large_cube_dataset = H5Dcreate2(fid1, "large_cube_dataset", dset_type,
+ large_cube_dataset = H5Dcreate2(fid1, "large_cube_dataset", dset_type,
file_large_cube_sid, H5P_DEFAULT, large_cube_dcpl_id, H5P_DEFAULT);
CHECK(large_cube_dataset, FAIL, "H5Dcreate2");
@@ -1822,16 +1822,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* write initial data to the on disk datasets */
- ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
+ ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
small_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
- ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
+ ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
file_large_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* read initial data from disk and verify that it is as expected. */
- ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
+ ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
small_cube_sid, xfer_plist, small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@@ -1839,7 +1839,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
verify_select_hyper_contig_dr__run_test(small_cube_buf_1, small_cube_size,
edge_size, small_rank);
- ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
+ ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
file_large_cube_sid, xfer_plist, large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@@ -1852,12 +1852,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
* of different rank that H5S_select_shape_same() views as being of the
* same shape.
*
- * Start by reading small_rank-D slice from the on disk large cube, and
- * verifying that the data read is correct. Verify that H5S_select_shape_same()
+ * Start by reading small_rank-D slice from the on disk large cube, and
+ * verifying that the data read is correct. Verify that H5S_select_shape_same()
* returns true on the memory and file selections.
*/
-
+
/* set up start, stride, count, and block -- note that we will
* change start[] so as to read slices of the large cube.
*/
@@ -1889,18 +1889,18 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
- ret = H5Sselect_hyperslab(file_large_cube_sid,
+ ret = H5Sselect_hyperslab(file_large_cube_sid,
H5S_SELECT_SET,
- start_ptr,
- stride_ptr,
- count_ptr,
+ start_ptr,
+ stride_ptr,
+ count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* verify that H5S_select_shape_same() reports the two
+ /* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S_select_shape_same_test(small_cube_sid,
file_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@@ -1937,7 +1937,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} while((large_rank >= 4) && (small_rank <= 3) && (v < edge_size));
u++;
} while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size));
-
+
/* similarly, read the on disk small cube into slices through the in memory
* large cube, and verify that the correct data (and only the correct data)
@@ -1965,19 +1965,19 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
- ret = H5Sselect_hyperslab(mem_large_cube_sid,
+ ret = H5Sselect_hyperslab(mem_large_cube_sid,
H5S_SELECT_SET,
- start_ptr,
- stride_ptr,
- count_ptr,
+ start_ptr,
+ stride_ptr,
+ count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* verify that H5S_select_shape_same() reports the two
+ /* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S_select_shape_same_test(small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@@ -1992,7 +1992,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
CHECK(ret, FAIL, "H5Dread");
- /* verify that the expected data and only the
+ /* verify that the expected data and only the
* expected data was read.
*/
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -2028,7 +2028,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* Zero out the buffer for the next pass */
HDmemset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t));
-
+
x++;
} while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
w++;
@@ -2039,16 +2039,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size));
- /* now we go in the opposite direction, verifying that we can write
- * from memory to file using selections of different rank that
+ /* now we go in the opposite direction, verifying that we can write
+ * from memory to file using selections of different rank that
* H5S_select_shape_same() views as being of the same shape.
*
- * Start by writing small_rank D slices from the in memory large cube, to
+ * Start by writing small_rank D slices from the in memory large cube, to
* the the on disk small cube dataset. After each write, read the small
* cube dataset back from disk, and verify that it contains the expected
- * data. Verify that H5S_select_shape_same() returns true on the
+ * data. Verify that H5S_select_shape_same() returns true on the
* memory and file selections.
- */
+ */
u = 0;
do {
@@ -2064,15 +2064,15 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
*/
/* zero out the on disk small cube */
- ret = H5Dwrite(small_cube_dataset,
- H5T_NATIVE_UINT16,
- small_cube_sid,
- small_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(small_cube_dataset,
+ H5T_NATIVE_UINT16,
+ small_cube_sid,
+ small_cube_sid,
+ xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
- /* select the portion of the in memory large cube from which we
+ /* select the portion of the in memory large cube from which we
* are going to write data.
*/
start[0] = (hsize_t)u;
@@ -2081,40 +2081,40 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
- ret = H5Sselect_hyperslab(mem_large_cube_sid,
+ ret = H5Sselect_hyperslab(mem_large_cube_sid,
H5S_SELECT_SET,
- start_ptr,
- stride_ptr,
- count_ptr,
+ start_ptr,
+ stride_ptr,
+ count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* verify that H5S_select_shape_same() reports the in
- * memory slice through the cube selection and the
+ /* verify that H5S_select_shape_same() reports the in
+ * memory slice through the cube selection and the
* on disk full small cube selections as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S_select_shape_same_test(small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* write the slice from the in memory large cube to the on disk small cube */
- ret = H5Dwrite(small_cube_dataset,
- H5T_NATIVE_UINT16,
- mem_large_cube_sid,
- small_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(small_cube_dataset,
+ H5T_NATIVE_UINT16,
+ mem_large_cube_sid,
+ small_cube_sid,
+ xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* read the on disk small cube into memory */
- ret = H5Dread(small_cube_dataset,
+ ret = H5Dread(small_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
- small_cube_sid,
- xfer_plist,
+ small_cube_sid,
+ xfer_plist,
small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@@ -2134,7 +2134,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end for */
if(mis_match )
TestErrPrintf("small cube data don't match! Line=%d\n",__LINE__);
-
+
x++;
} while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
w++;
@@ -2145,10 +2145,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size));
- /* Now write the contents of the in memory small cube to slices of
+ /* Now write the contents of the in memory small cube to slices of
* the on disk cube. After each write, read the on disk cube
- * into memeory, and verify that it contains the expected
- * data. Verify that H5S_select_shape_same() returns true on
+ * into memeory, and verify that it contains the expected
+ * data. Verify that H5S_select_shape_same() returns true on
* the memory and file selections.
*/
@@ -2173,16 +2173,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
*/
/* zero out the on disk cube */
- ret = H5Dwrite(large_cube_dataset,
- H5T_NATIVE_USHORT,
- mem_large_cube_sid,
- file_large_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(large_cube_dataset,
+ H5T_NATIVE_USHORT,
+ mem_large_cube_sid,
+ file_large_cube_sid,
+ xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
- /* select the portion of the in memory large cube to which we
+ /* select the portion of the in memory large cube to which we
* are going to write data.
*/
start[0] = (hsize_t)u;
@@ -2191,31 +2191,31 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
- ret = H5Sselect_hyperslab(file_large_cube_sid,
+ ret = H5Sselect_hyperslab(file_large_cube_sid,
H5S_SELECT_SET,
- start_ptr,
- stride_ptr,
- count_ptr,
+ start_ptr,
+ stride_ptr,
+ count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* verify that H5S_select_shape_same() reports the in
- * memory full selection of the small cube and the
- * on disk slice through the large cube selection
+ /* verify that H5S_select_shape_same() reports the in
+ * memory full selection of the small cube and the
+ * on disk slice through the large cube selection
* as having the same shape.
*/
- check = H5S_select_shape_same_test(small_cube_sid,
+ check = H5S_select_shape_same_test(small_cube_sid,
file_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* write the cube from memory to the target slice of the disk cube */
- ret = H5Dwrite(large_cube_dataset,
- H5T_NATIVE_UINT16,
- small_cube_sid,
- file_large_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(large_cube_dataset,
+ H5T_NATIVE_UINT16,
+ small_cube_sid,
+ file_large_cube_sid,
+ xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
@@ -2224,16 +2224,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
ret = H5Sselect_all(file_large_cube_sid);
CHECK(ret, FAIL, "H5Sselect_all");
- ret = H5Dread(large_cube_dataset,
+ ret = H5Dread(large_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
- file_large_cube_sid,
- xfer_plist,
+ file_large_cube_sid,
+ xfer_plist,
large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
- /* verify that the expected data and only the
+ /* verify that the expected data and only the
* expected data was read.
*/
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@@ -2266,7 +2266,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end for */
if(mis_match)
TestErrPrintf("large cube written from small cube has bad data! Line=%d\n", __LINE__);
-
+
x++;
} while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
w++;
@@ -2309,10 +2309,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/****************************************************************
**
-** test_select_hyper_contig_dr(): Test H5S (dataspace)
-** selection code with contiguous source and target having
+** test_select_hyper_contig_dr(): Test H5S (dataspace)
+** selection code with contiguous source and target having
** different ranks but the same shape. We have already
-** tested H5S_shape_same in isolation, so now we try to do
+** tested H5S_shape_same in isolation, so now we try to do
** I/O.
**
****************************************************************/
@@ -2377,12 +2377,12 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
/****************************************************************
**
-** test_select_hyper_checker_board_dr__select_checker_board():
-** Given an n-cube data space with each edge of length
+** test_select_hyper_checker_board_dr__select_checker_board():
+** Given an n-cube data space with each edge of length
** edge_size, and a checker_edge_size either select a checker
** board selection of the entire cube(if sel_rank == n),
** or select a checker board selection of a
-** sel_rank dimensional slice through n-cube parallel to the
+** sel_rank dimensional slice through n-cube parallel to the
** sel_rank fastest changing indices, with origin (in the
** higher indices) as indicated by the start array.
**
@@ -2438,7 +2438,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
offset_count++;
/* Now set up the stride and block arrays, and portions of the start
- * and count arrays that will not be altered during the selection of
+ * and count arrays that will not be altered during the selection of
* the checker board.
*/
u = 0;
@@ -2467,7 +2467,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
u++;
} /* end while */
-
+
i = 0;
do {
if(0 >= sel_offset) {
@@ -2482,7 +2482,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
} /* end if */
j = 0;
- do {
+ do {
if(1 >= sel_offset) {
if(j == 0 ) {
start[1] = 0;
@@ -2535,22 +2535,22 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
if(((i + j + k + l + m) % 2) == 0) {
if(first_selection) {
- first_selection = FALSE;
+ first_selection = FALSE;
- ret = H5Sselect_hyperslab(tgt_n_cube_sid,
+ ret = H5Sselect_hyperslab(tgt_n_cube_sid,
H5S_SELECT_SET,
- &(start[n_cube_offset]),
- &(stride[n_cube_offset]),
- &(count[n_cube_offset]),
+ &(start[n_cube_offset]),
+ &(stride[n_cube_offset]),
+ &(count[n_cube_offset]),
&(block[n_cube_offset]));
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end if */
else {
- ret = H5Sselect_hyperslab(tgt_n_cube_sid,
+ ret = H5Sselect_hyperslab(tgt_n_cube_sid,
H5S_SELECT_OR,
- &(start[n_cube_offset]),
- &(stride[n_cube_offset]),
- &(count[n_cube_offset]),
+ &(start[n_cube_offset]),
+ &(stride[n_cube_offset]),
+ &(count[n_cube_offset]),
&(block[n_cube_offset]));
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end else */
@@ -2588,21 +2588,21 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
/****************************************************************
**
-** test_select_hyper_checker_board_dr__verify_data():
+** test_select_hyper_checker_board_dr__verify_data():
**
-** Examine the supplied buffer to see if it contains the
-** expected data. Return TRUE if it does, and FALSE
+** Examine the supplied buffer to see if it contains the
+** expected data. Return TRUE if it does, and FALSE
** otherwise.
**
** The supplied buffer is presumed to contain the results
-** of read or writing a checkerboard selection of an
+** of read or writing a checkerboard selection of an
** n-cube, or a checkerboard selection of an m (1 <= m < n)
-** dimensional slice through an n-cube parallel to the
-** fastest changing indices.
+** dimensional slice through an n-cube parallel to the
+** fastest changing indices.
**
** It is further presumed that the buffer was zeroed before
-** the read, and that the n-cube was initialize with the
-** natural numbers listed in order from the origin along
+** the read, and that the n-cube was initialize with the
+** natural numbers listed in order from the origin along
** the fastest changing axis.
**
** Thus for a 10x10x10 3-cube, the value stored in location
@@ -2611,19 +2611,19 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
**
** (10 * 10 * x) + (10 * y) + z
**
-** Thus, if the buffer contains the result of reading a
+** Thus, if the buffer contains the result of reading a
** checker board selection of a 10x10x10 3-cube, location
** (x, y, z) will contain zero if it is not in a checker,
** and 100x + 10y + z if (x, y, z) is in a checker.
**
-** If the buffer contains the result of reading a 3
+** If the buffer contains the result of reading a 3
** dimensional slice (parallel to the three fastest changing
-** indices) through an n cube (n > 3), then the expected
+** indices) through an n cube (n > 3), then the expected
** values in the buffer will be the same, save that we will
-** add a constant determined by the origin of the 3-cube
+** add a constant determined by the origin of the 3-cube
** in the n-cube.
**
-** Finally, the function presumes that the first element
+** Finally, the function presumes that the first element
** of the buffer resides either at the origin of either
** a selected or an unselected checker.
**
@@ -2683,7 +2683,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
l = 0;
y = 0;
start_in_checker[3] = start_in_checker[2];
- do {
+ do {
if(y >= checker_edge_size) {
start_in_checker[3] = ! start_in_checker[3];
y = 0;
@@ -2697,7 +2697,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
in_checker = ! in_checker;
z = 0;
} /* end if */
-
+
if(in_checker) {
if(*val_ptr != expected_value)
good_data = FALSE;
@@ -2706,10 +2706,10 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
if(*val_ptr != 0)
good_data = FALSE;
} /* end else */
-
+
val_ptr++;
expected_value++;
-
+
m++;
z++;
} while((rank >= (test_max_rank - 4)) && (m < edge_size));
@@ -2732,10 +2732,10 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
/****************************************************************
**
-** test_select_hyper_checker_board_dr__run_test(): Test H5S
-** (dataspace) selection code with checker board source and
-** target selections having different ranks but the same
-** shape. We have already tested H5S_shape_same in
+** test_select_hyper_checker_board_dr__run_test(): Test H5S
+** (dataspace) selection code with checker board source and
+** target selections having different ranks but the same
+** shape. We have already tested H5S_shape_same in
** isolation, so now we try to do I/O.
**
****************************************************************/
@@ -2860,11 +2860,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* if chunk edge size is greater than zero, set up the small and
- * large data set creation property lists to specify chunked
+ * large data set creation property lists to specify chunked
* datasets.
*/
if(chunk_edge_size > 0) {
- chunk_dims[0] = chunk_dims[1] =
+ chunk_dims[0] = chunk_dims[1] =
chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = chunk_edge_size;
small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
@@ -2889,7 +2889,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* create the small cube dataset */
- small_cube_dataset = H5Dcreate2(fid, "small_cube_dataset", dset_type,
+ small_cube_dataset = H5Dcreate2(fid, "small_cube_dataset", dset_type,
file_small_cube_sid, H5P_DEFAULT, small_cube_dcpl_id, H5P_DEFAULT);
CHECK(small_cube_dataset, FAIL, "H5Dcreate2");
@@ -2900,7 +2900,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
} /* end if */
/* create the large cube dataset */
- large_cube_dataset = H5Dcreate2(fid, "large_cube_dataset", dset_type,
+ large_cube_dataset = H5Dcreate2(fid, "large_cube_dataset", dset_type,
file_large_cube_sid, H5P_DEFAULT, large_cube_dcpl_id, H5P_DEFAULT);
CHECK(large_cube_dataset, FAIL, "H5Dcreate2");
@@ -2912,17 +2912,17 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* write initial data to the on disk datasets */
- ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
+ ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
full_small_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
- ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
+ ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
full_large_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* read initial small cube data from disk and verify that it is as expected. */
- ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
+ ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
full_small_cube_sid, xfer_plist, small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@@ -2931,7 +2931,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
edge_size, small_rank);
/* read initial large cube data from disk and verify that it is as expected. */
- ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
+ ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
full_large_cube_sid, xfer_plist, large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@@ -2944,11 +2944,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* of different rank that H5S_select_shape_same() views as being of the
* same shape.
*
- * Start by reading small_rank-D slice from the on disk large cube, and
- * verifying that the data read is correct. Verify that H5S_select_shape_same()
+ * Start by reading small_rank-D slice from the on disk large cube, and
+ * verifying that the data read is correct. Verify that H5S_select_shape_same()
* returns true on the memory and file selections.
*
- * The first step is to set up the needed checker board selection in the
+ * The first step is to set up the needed checker board selection in the
* in memory small small cube
*/
@@ -2961,8 +2961,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
small_rank,
sel_start);
- /* now read slices from the large, on-disk cube into the small cube.
- * Note how we adjust sel_start only in the dimensions peculiar to the
+ /* now read slices from the large, on-disk cube into the small cube.
+ * Note how we adjust sel_start only in the dimensions peculiar to the
* large cube.
*/
@@ -3007,10 +3007,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
- /* verify that H5S_select_shape_same() reports the two
+ /* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(mem_small_cube_sid,
+ check = H5S_select_shape_same_test(mem_small_cube_sid,
file_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@@ -3045,18 +3045,18 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n",__LINE__);
x++;
- } while((large_rank >= (test_max_rank - 3)) &&
+ } while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
- } while((large_rank >= (test_max_rank - 2)) &&
+ } while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
- } while((large_rank >= (test_max_rank - 1)) &&
+ } while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
- } while((large_rank >= test_max_rank) &&
+ } while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
-
+
/* similarly, read the on disk small cube into slices through the in memory
* large cube, and verify that the correct data (and only the correct data)
@@ -3114,10 +3114,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
- /* verify that H5S_select_shape_same() reports the two
+ /* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(file_small_cube_sid,
+ check = H5S_select_shape_same_test(file_small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@@ -3135,7 +3135,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Dread");
- /* verify that the expected data and only the
+ /* verify that the expected data and only the
* expected data was read.
*/
data_ok = TRUE;
@@ -3183,29 +3183,29 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("large cube read from small cube has bad data! Line=%d\n",__LINE__);
x++;
- } while((large_rank >= (test_max_rank - 3)) &&
+ } while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
- } while((large_rank >= (test_max_rank - 2)) &&
+ } while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
- } while((large_rank >= (test_max_rank - 1)) &&
+ } while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
- } while((large_rank >= test_max_rank) &&
+ } while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
- /* now we go in the opposite direction, verifying that we can write
- * from memory to file using selections of different rank that
+ /* now we go in the opposite direction, verifying that we can write
+ * from memory to file using selections of different rank that
* H5S_select_shape_same() views as being of the same shape.
*
- * Start by writing small_rank D slices from the in memory large cube, to
+ * Start by writing small_rank D slices from the in memory large cube, to
* the the on disk small cube dataset. After each write, read the small
* cube dataset back from disk, and verify that it contains the expected
- * data. Verify that H5S_select_shape_same() returns true on the
+ * data. Verify that H5S_select_shape_same() returns true on the
* memory and file selections.
- */
+ */
/* select a checker board in the file small cube dataspace */
sel_start[0] = sel_start[1] = sel_start[2] = sel_start[3] = sel_start[4] = 0;
@@ -3237,11 +3237,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start[3] = x;
/* zero out the on disk small cube */
- ret = H5Dwrite(small_cube_dataset,
- H5T_NATIVE_UINT16,
- full_small_cube_sid,
- full_small_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(small_cube_dataset,
+ H5T_NATIVE_UINT16,
+ full_small_cube_sid,
+ full_small_cube_sid,
+ xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
@@ -3267,22 +3267,22 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
- /* verify that H5S_select_shape_same() reports the two
+ /* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(file_small_cube_sid,
+ check = H5S_select_shape_same_test(file_small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
- /* write the slice from the in memory large cube to the
- * on disk small cube
+ /* write the slice from the in memory large cube to the
+ * on disk small cube
*/
- ret = H5Dwrite(small_cube_dataset,
- H5T_NATIVE_UINT16,
- mem_large_cube_sid,
- file_small_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(small_cube_dataset,
+ H5T_NATIVE_UINT16,
+ mem_large_cube_sid,
+ file_small_cube_sid,
+ xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
@@ -3291,11 +3291,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
/* read the on disk small cube into memory */
- ret = H5Dread(small_cube_dataset,
+ ret = H5Dread(small_cube_dataset,
H5T_NATIVE_UINT16,
full_small_cube_sid,
- full_small_cube_sid,
- xfer_plist,
+ full_small_cube_sid,
+ xfer_plist,
small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@@ -3318,24 +3318,24 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n",__LINE__);
x++;
- } while((large_rank >= (test_max_rank - 3)) &&
+ } while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
- } while((large_rank >= (test_max_rank - 2)) &&
+ } while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
- } while((large_rank >= (test_max_rank - 1)) &&
+ } while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
- } while((large_rank >= test_max_rank) &&
+ } while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
- /* Now write checker board selections of the entries in memory
- * small cube to slices of the on disk cube. After each write,
- * read the on disk large cube * into memeory, and verify that
- * it contains the expected * data. Verify that
- * H5S_select_shape_same() returns true on the memory and file
+ /* Now write checker board selections of the entries in memory
+ * small cube to slices of the on disk cube. After each write,
+ * read the on disk large cube * into memeory, and verify that
+ * it contains the expected * data. Verify that
+ * H5S_select_shape_same() returns true on the memory and file
* selections.
*/
@@ -3369,11 +3369,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start[3] = x;
/* zero out the on disk cube */
- ret = H5Dwrite(large_cube_dataset,
- H5T_NATIVE_USHORT,
- full_large_cube_sid,
- full_large_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(large_cube_dataset,
+ H5T_NATIVE_USHORT,
+ full_large_cube_sid,
+ full_large_cube_sid,
+ xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
@@ -3399,10 +3399,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
- /* verify that H5S_select_shape_same() reports the two
+ /* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
- check = H5S_select_shape_same_test(file_large_cube_sid,
+ check = H5S_select_shape_same_test(file_large_cube_sid,
mem_small_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@@ -3411,11 +3411,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* small cube to a slice through the on disk large
* cube.
*/
- ret = H5Dwrite(large_cube_dataset,
- H5T_NATIVE_UINT16,
- mem_small_cube_sid,
- file_large_cube_sid,
- xfer_plist,
+ ret = H5Dwrite(large_cube_dataset,
+ H5T_NATIVE_UINT16,
+ mem_small_cube_sid,
+ file_large_cube_sid,
+ xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
@@ -3424,16 +3424,16 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
/* read the on disk large cube into memory */
- ret = H5Dread(large_cube_dataset,
+ ret = H5Dread(large_cube_dataset,
H5T_NATIVE_UINT16,
full_large_cube_sid,
- full_large_cube_sid,
- xfer_plist,
+ full_large_cube_sid,
+ xfer_plist,
large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
- /* verify that the expected data and only the
+ /* verify that the expected data and only the
* expected data was written to the on disk large
* cube.
*/
@@ -3483,18 +3483,18 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("large cube written from small cube has bad data! Line=%d\n",__LINE__);
x++;
- } while((large_rank >= (test_max_rank - 3)) &&
+ } while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
- } while((large_rank >= (test_max_rank - 2)) &&
+ } while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
- } while((large_rank >= (test_max_rank - 1)) &&
+ } while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
- } while((large_rank >= test_max_rank) &&
+ } while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
-
+
/* Close memory dataspaces */
ret = H5Sclose(full_small_cube_sid);
@@ -12348,7 +12348,7 @@ test_space_rebuild(void)
ret = H5Sselect_hyperslab(sid_reg_ori5,H5S_SELECT_SET,start5,stride5,count5,block5);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Build up four dimensional regular selection with H5_SELECT_OR, inside HDF5,
+ /* Build up five dimensional regular selection with H5_SELECT_OR, inside HDF5,
it will be treated as an irregular selection. */
start5[4] = 1;
count5[4] = 1;
@@ -12498,6 +12498,7 @@ test_space_rebuild(void)
CHECK(ret,FAIL,"H5S_hyper_rebuild");
}/* No need to do shape comparision */
+ /* Add more selections to make it regular again */
start5[3] = 5;
count5[3] = 1;
stride5[3] = 4;
@@ -13071,6 +13072,7 @@ test_select_bounds(void)
CHECK(ret, FAIL, "H5Sclose");
} /* test_select_bounds() */
+
/****************************************************************
**
** test_hyper_regular(): Tests query operations on regular hyperslabs