summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-19 14:09:44 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-19 14:09:44 (GMT)
commit628d267162895adef5a73e1cd5810030cc98335a (patch)
tree05471ae798eaef041ea98fecdd285c9380ce381a /test
parentd46ea2d08af456f1cfaf6c6fd3060f39b92be8de (diff)
parent7e93acd94f20c73d27bb2eb4f7b4389d88cfb299 (diff)
downloadhdf5-628d267162895adef5a73e1cd5810030cc98335a.zip
hdf5-628d267162895adef5a73e1cd5810030cc98335a.tar.gz
hdf5-628d267162895adef5a73e1cd5810030cc98335a.tar.bz2
merge and fix conflict
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/CMakeVFDTests.cmake2
-rw-r--r--test/cache_common.c22
-rw-r--r--test/cache_tagging.c3
-rw-r--r--test/dsets.c2
-rw-r--r--test/dtypes.c2
-rw-r--r--test/mf.c7
-rw-r--r--test/page_buffer.c20
-rw-r--r--test/tfile.c9
-rw-r--r--test/tmisc.c1
-rw-r--r--test/trefer_shutdown.c83
-rw-r--r--test/tselect.c2
12 files changed, 118 insertions, 39 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c7a945e..77f9191 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -525,4 +525,6 @@ else ()
endif ()
set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
-include (CMakeTests.cmake)
+if (HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index cf938f5..d4a5ddc 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -15,7 +15,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-# included from CMakeTEsts.cmake
+# included from CMakeTests.cmake
set (VFD_LIST
sec2
diff --git a/test/cache_common.c b/test/cache_common.c
index 3aff5ec..696eae3 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -554,7 +554,7 @@ addr_to_type_and_index(haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type)
+get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -664,7 +664,7 @@ notify_get_initial_load_size(void *udata, size_t *image_length)
*/
static herr_t
get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED image_len,
- void *udata, size_t *actual_len, int32_t H5_ATTR_SANITY_CHECK entry_type)
+ void *udata, size_t *actual_len, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -725,7 +725,7 @@ variable_get_final_load_size(const void *image, size_t image_len,
static htri_t
verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata,
- int32_t H5_ATTR_SANITY_CHECK entry_type)
+ int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -778,8 +778,8 @@ variable_verify_chksum(const void *image, size_t len, void *udata)
*-------------------------------------------------------------------------
*/
static void *
-deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *udata, hbool_t *dirty,
- int32_t H5_ATTR_SANITY_CHECK entry_type)
+deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hbool_t *dirty,
+ int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -935,7 +935,7 @@ notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
*-------------------------------------------------------------------------
*/
herr_t
-image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type)
+image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
const test_entry_t *entry;
int32_t type;
@@ -1053,10 +1053,10 @@ notify_image_len(const void *thing, size_t *image_length)
*-------------------------------------------------------------------------
*/
herr_t
-pre_serialize(H5F_t H5_ATTR_SANITY_CHECK *f,
+pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f,
void *thing,
- haddr_t H5_ATTR_SANITY_CHECK addr,
- size_t H5_ATTR_SANITY_CHECK len,
+ haddr_t H5_ATTR_NDEBUG_UNUSED addr,
+ size_t H5_ATTR_NDEBUG_UNUSED len,
haddr_t *new_addr_ptr,
size_t *new_len_ptr,
unsigned *flags_ptr)
@@ -1444,7 +1444,7 @@ notify_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len,
*-------------------------------------------------------------------------
*/
static herr_t
-notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_SANITY_CHECK entry_type)
+notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
test_entry_t *entry;
@@ -1521,7 +1521,7 @@ notify_notify(H5C_notify_action_t action, void *thing)
*-------------------------------------------------------------------------
*/
herr_t
-free_icr(test_entry_t *entry, int32_t H5_ATTR_SANITY_CHECK entry_type)
+free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
HDassert(entry);
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 8354e09..b77a198 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -3889,9 +3889,10 @@ check_invalid_tag_application(void)
#if H5C_DO_TAGGING_SANITY_CHECKS
error:
if(api_ctx_pushed) H5CX_pop();
-#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
return 1;
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+
} /* check_invalid_tag_application */
diff --git a/test/dsets.c b/test/dsets.c
index db209e2da..8b797f6 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -7549,7 +7549,7 @@ test_deprec(hid_t file)
hid_t dataset, space, small_space, create_parms, dcpl;
hsize_t dims[2], small_dims[2];
hsize_t deprec_size;
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
hsize_t csize[2];
TESTING("deprecated API routines");
diff --git a/test/dtypes.c b/test/dtypes.c
index 891969b..4bdef59 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -6732,7 +6732,7 @@ static void create_del_obj_named_test_file(const char *filename, hid_t fapl,
hid_t my_fapl; /* Copy of file access property list ID */
hid_t dcpl; /* Dataset creation property list ID */
unsigned use_at_least_v18;/* Whether to use old or new format */
- herr_t H5_ATTR_SANITY_CHECK status; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Generic return value */
/* Make copy of FAPL */
my_fapl = H5Pcopy(fapl);
diff --git a/test/mf.c b/test/mf.c
index 031e625..6030314 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -7529,8 +7529,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi,
- hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
@@ -7539,7 +7538,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi
hbool_t relax;
H5FD_mem_t mt;
- HDassert(multi || split);
+ HDassert(split);
HDmemset(memb_name, 0, sizeof memb_name);
@@ -7616,7 +7615,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if((fapl_new = H5Pcopy(fapl)) < 0) TEST_ERROR
if(multi || split)
- if(set_multi_split(fapl_new, 4096, multi, split) < 0)
+ if(set_multi_split(fapl_new, 4096, split) < 0)
TEST_ERROR;
/* Test with TRUE or FALSE for persisting free-space */
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 4789bc4..79ba43f 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -39,28 +39,24 @@
#define FILENAME_LEN 1024
-#ifndef H5_HAVE_PARALLEL
-#define NUM_DSETS 5
-#define NX 100
-#define NY 50
-#endif
-
-/* helper routines */
-#ifndef H5_HAVE_PARALLEL
-static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
-static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
-#endif /* H5_HAVE_PARALLEL */
-
/* test routines */
#ifdef H5_HAVE_PARALLEL
static unsigned verify_page_buffering_disabled(hid_t orig_fapl,
const char *env_h5_drvr);
#else
+#define NUM_DSETS 5
+#define NX 100
+#define NY 50
+
static unsigned test_args(hid_t fapl, const char *env_h5_drvr);
static unsigned test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr);
static unsigned test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr);
+
+/* helper routines */
+static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
+static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
#endif /* H5_HAVE_PARALLEL */
const char *FILENAME[] = {
diff --git a/test/tfile.c b/test/tfile.c
index a900a8b..351c393 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -4209,8 +4209,7 @@ test_filespace_info(const char *env_h5_drvr)
**
*****************************************************************/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi,
- hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
@@ -4219,7 +4218,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi
hbool_t relax;
H5FD_mem_t mt;
- HDassert(split || multi);
+ HDassert(split);
HDmemset(memb_name, 0, sizeof memb_name);
@@ -4310,7 +4309,7 @@ test_file_freespace(const char *env_h5_drvr)
my_fapl = new_fapl;
if(multi_vfd || split_vfd) {
- ret = set_multi_split(new_fapl, FSP_SIZE_DEF, multi_vfd, split_vfd);
+ ret = set_multi_split(new_fapl, FSP_SIZE_DEF, split_vfd);
CHECK(ret, FAIL, "set_multi_split");
}
@@ -4476,7 +4475,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/* Set up paged aligned address space for multi/split driver */
if(multi_vfd || split_vfd) {
- ret = set_multi_split(fapl, FSP_SIZE_DEF, multi_vfd, split_vfd);
+ ret = set_multi_split(fapl, FSP_SIZE_DEF, split_vfd);
CHECK(ret, FAIL, "set_multi_split");
}
diff --git a/test/tmisc.c b/test/tmisc.c
index 93bdf29..62d9cd4 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -135,7 +135,6 @@ typedef struct
#ifndef H5_HAVE_PARALLEL
#define MISC8_DSETNAME2 "Dataset2"
#define MISC8_DSETNAME3 "Dataset3"
-#define MISC8_DSETNAME4 "Dataset4"
#define MISC8_DSETNAME6 "Dataset6"
#define MISC8_DSETNAME7 "Dataset7"
#define MISC8_DSETNAME9 "Dataset9"
diff --git a/test/trefer_shutdown.c b/test/trefer_shutdown.c
new file mode 100644
index 0000000..89a44b3
--- /dev/null
+++ b/test/trefer_shutdown.c
@@ -0,0 +1,83 @@
+#include "h5test.h"
+
+int
+main(int argc, char **argv)
+{
+ H5R_ref_t write_ref, read_ref;
+ hid_t fid;
+ hid_t did;
+ hid_t sid;
+ int i;
+
+ if ((fid = H5Fcreate("HDFFV-10992.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ HDfprintf(stderr, "H5Fcreate failed\n");
+ return 1;
+ }
+
+ if ((sid = H5Screate(H5S_SCALAR)) < 0) {
+ HDfprintf(stderr, "H5Screate failed\n");
+ return 1;
+ }
+
+ /* Create a dataset of object references */
+ if ((did = H5Dcreate2(fid, "dset", H5T_STD_REF, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ HDfprintf(stderr, "H5Dcreate failed\n");
+ return 1;
+ }
+
+ for (i = 0; i < 100; i++) {
+ /* Create reference to the root group */
+ if (H5Rcreate_object(fid, "/dset", H5P_DEFAULT, &write_ref) < 0) {
+ HDfprintf(stderr, "H5Rcreate_object failed\n");
+ return 1;
+ }
+ }
+
+ /* Write reference to dataset */
+ if (H5Dwrite(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &write_ref) < 0) {
+ HDfprintf(stderr, "H5Dwrite failed\n");
+ return 1;
+ }
+
+ for (i = 0; i < 500; i++) {
+ /* Read reference back into different reference buffer */
+ if (H5Dread(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, &read_ref) < 0) {
+ HDfprintf(stderr, "H5Dread failed\n");
+ return 1;
+ }
+ }
+
+ /*
+ * "Forget" to call H5Rdestroy on reference objects. If H5Rdestroy
+ * is called at least once on either reference object, or both
+ * objects, the infinite loop goes away. If H5Rdestroy is never
+ * called, the infinite loop will appear.
+ */
+#if 0
+ if (H5Rdestroy(&write_ref) < 0) {
+ HDfprintf(stderr, "H5Rdestroy on reference write buffer failed\n");
+ return 1;
+ }
+ if (H5Rdestroy(&read_ref) < 0) {
+ HDfprintf(stderr, "H5Rdestroy on reference read buffer failed\n");
+ return 1;
+ }
+#endif
+
+ if (H5Sclose(sid) < 0) {
+ HDfprintf(stderr, "H5Sclose failed\n");
+ return 1;
+ }
+
+ if (H5Dclose(did) < 0) {
+ HDfprintf(stderr, "H5Dclose failed\n");
+ return 1;
+ }
+
+ if (H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "H5Fclose failed\n");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/test/tselect.c b/test/tselect.c
index 348d30a..db7c9de 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1614,7 +1614,7 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
****************************************************************/
static void
verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
- size_t H5_ATTR_SANITY_CHECK cube_size, unsigned edge_size, unsigned cube_rank)
+ size_t H5_ATTR_NDEBUG_UNUSED cube_size, unsigned edge_size, unsigned cube_rank)
{
const uint16_t *cube_ptr; /* Pointer into the cube buffer */
uint16_t expected_value; /* Expected value in dataset */