summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-03-02 14:24:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-03-02 14:24:46 (GMT)
commit5df52404bc6f6323ebf064b3d82b8e683de96eba (patch)
treed83cd5a7e6a40ce7dcfacf9106b32ea636b73963 /test
parent046e64a9bd725c5ba0bebef1ba7278445e391d25 (diff)
downloadhdf5-5df52404bc6f6323ebf064b3d82b8e683de96eba.zip
hdf5-5df52404bc6f6323ebf064b3d82b8e683de96eba.tar.gz
hdf5-5df52404bc6f6323ebf064b3d82b8e683de96eba.tar.bz2
Misc. small cleanups to sync against incoming page buffering changes.
Diffstat (limited to 'test')
-rw-r--r--test/cache.c12
-rw-r--r--test/cache_common.c4
-rw-r--r--test/cache_image.c2
-rw-r--r--test/dsets.c10
-rw-r--r--test/fheap.c104
-rw-r--r--test/fillval.c2
-rw-r--r--test/freespace.c10
-rw-r--r--test/links.c2
-rw-r--r--test/objcopy.c2
9 files changed, 23 insertions, 125 deletions
diff --git a/test/cache.c b/test/cache.c
index 1cfc0b1..87b1272 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -33693,14 +33693,10 @@ check_metadata_cork(hbool_t fill_via_insertion)
reset_entries();
- if(fill_via_insertion) {
-
- TESTING("to ensure cork/uncork metadata when inserting");
-
- } else {
-
- TESTING("to ensure cork/uncork metadata on protect/unprotect");
- }
+ if(fill_via_insertion)
+ TESTING("to ensure cork/uncork metadata when inserting")
+ else
+ TESTING("to ensure cork/uncork metadata on protect/unprotect")
if(show_progress) /* 0 */
HDfprintf(stdout, "\n%s: check point %d -- pass %d\n",
diff --git a/test/cache_common.c b/test/cache_common.c
index 81e62ae..d1bbf10 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3235,8 +3235,8 @@ setup_cache(size_t max_cache_size,
if(verbose)
HDfprintf(stdout, "%s: H5Fcreate() failed.\n", FUNC);
- }
- }
+ } /* end if */
+ } /* end if */
if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
diff --git a/test/cache_image.c b/test/cache_image.c
index 946d46b..de0507b 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -6292,7 +6292,7 @@ cache_image_api_error_check_3(void)
if ( H5Fstart_swmr_write(file_id) == SUCCEED ) {
pass = FALSE;
- failure_mssg = "metadata cache image block loaded(1).";
+ failure_mssg = "SWMR start succeeded in file with cache image.";
}
} H5E_END_TRY;
}
diff --git a/test/dsets.c b/test/dsets.c
index d086c58..39b7c22 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -507,7 +507,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
TESTING("simple I/O");
- /* Can't run this test with multi-file VFDs */
+ /* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
if(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
@@ -645,7 +645,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl)
TESTING("dataset offset with user block");
- /* Can't run this test with multi-file VFDs */
+ /* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
if(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
@@ -1984,10 +1984,11 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
}
- PASSED();
-
/* Get the storage size of the dataset */
if((*dset_size=H5Dget_storage_size(dataset))==0) goto error;
+
+ PASSED();
+
/* Clean up objects used for this test */
if(H5Dclose (dataset) < 0) goto error;
if(H5Sclose (sid) < 0) goto error;
@@ -2932,6 +2933,7 @@ test_nbit_int(hid_t file)
PASSED();
return 0;
+
error:
return -1;
}
diff --git a/test/fheap.c b/test/fheap.c
index 8e364de..82859d2 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -16360,6 +16360,7 @@ main(void)
/* Reset library */
h5_reset();
+
fapl = h5_fileaccess();
ExpressMode = GetTestExpress();
if(ExpressMode > 1)
@@ -16379,13 +16380,7 @@ main(void)
shared_wobj_g[u] = (unsigned char)u;
/* Iterate over the testing parameters */
-#ifndef QAK
for(curr_test = FHEAP_TEST_NORMAL; curr_test < FHEAP_TEST_NTESTS; H5_INC_ENUM(fheap_test_type_t, curr_test)) {
-#else /* QAK */
-HDfprintf(stderr, "Uncomment test loop!\n");
-curr_test = FHEAP_TEST_NORMAL;
-/* curr_test = FHEAP_TEST_REOPEN; */
-#endif /* QAK */
/* Clear the testing parameters */
HDmemset(&tparam, 0, sizeof(fheap_test_param_t));
tparam.actual_id_len = HEAP_ID_LEN;
@@ -16410,7 +16405,6 @@ curr_test = FHEAP_TEST_NORMAL;
} /* end switch */
/* Test fractal heap creation */
-#ifndef QAK
nerrors += test_create(fapl, &small_cparam, &tparam);
nerrors += test_reopen(fapl, &small_cparam, &tparam);
nerrors += test_open_twice(fapl, &small_cparam, &tparam);
@@ -16419,23 +16413,12 @@ curr_test = FHEAP_TEST_NORMAL;
nerrors += test_filtered_create(fapl, &small_cparam);
nerrors += test_size(fapl, &small_cparam);
nerrors += test_reopen_hdr(fapl, &small_cparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK2
-#ifndef QAK
{
fheap_test_fill_t fill; /* Size of objects to fill heap blocks with */
-#ifndef QAK2
/* Filling with different sized objects */
for(fill = FHEAP_TEST_FILL_LARGE; fill < FHEAP_TEST_FILL_N; H5_INC_ENUM(fheap_test_fill_t, fill)) {
-#else /* QAK2 */
-HDfprintf(stderr, "Uncomment test loop!\n");
-fill = FHEAP_TEST_FILL_LARGE;
-/* fill = FHEAP_TEST_FILL_SINGLE; */
-#endif /* QAK2 */
tparam.fill = fill;
/* Set appropriate testing parameters for each test */
@@ -16460,12 +16443,8 @@ fill = FHEAP_TEST_FILL_LARGE;
* Test fractal heap managed object insertion
*/
-#ifndef QAK
/* "Weird" sized objects */
nerrors += test_man_insert_weird(fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
#ifdef ALL_INSERT_TESTS
/* "Standard" sized objects, building from simple to complex heaps */
@@ -16501,20 +16480,15 @@ HDfprintf(stderr, "Uncomment tests!\n");
/* If this test fails, uncomment the tests above, which build up to this
* level of complexity gradually. -QAK
*/
-#ifndef QAK
if(ExpressMode > 1)
printf("***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n");
else
nerrors += test_man_start_5th_recursive_indirect(fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
/*
* Test fractal heap object deletion
*/
/* Simple removal */
-#ifndef QAK
nerrors += test_man_remove_bogus(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_one(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_two(fapl, &small_cparam, &tparam);
@@ -16531,12 +16505,7 @@ HDfprintf(stderr, "Uncomment tests!\n");
/* Incremental insert & removal */
tparam.del_dir = FHEAP_DEL_FORWARD;
nerrors += test_man_incr_insert_remove(fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
-#ifndef QAK2
{
fheap_test_del_dir_t del_dir; /* Deletion direction */
fheap_test_del_drain_t drain_half; /* Deletion draining */
@@ -16546,19 +16515,10 @@ HDfprintf(stderr, "Uncomment tests!\n");
tparam.del_dir = del_dir;
for(drain_half = FHEAP_DEL_DRAIN_ALL; drain_half < FHEAP_DEL_DRAIN_N; H5_INC_ENUM(fheap_test_del_drain_t, drain_half)) {
tparam.drain_half = drain_half;
-#else /* QAK2 */
-HDfprintf(stderr, "Uncomment test loops!\n");
-/* tparam.del_dir = FHEAP_DEL_FORWARD; */
-/* tparam.del_dir = FHEAP_DEL_REVERSE; */
-tparam.del_dir = FHEAP_DEL_HEAP;
-tparam.drain_half = FHEAP_DEL_DRAIN_ALL;
-/* tparam.drain_half = FHEAP_DEL_DRAIN_HALF; */
-#endif /* QAK2 */
/* Don't need to test deletion directions when deleting entire heap */
if(tparam.del_dir == FHEAP_DEL_HEAP && tparam.drain_half > FHEAP_DEL_DRAIN_ALL)
break;
-#ifndef QAK
/* Simple insertion patterns */
nerrors += test_man_remove_root_direct(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_two_direct(fapl, &small_cparam, &tparam);
@@ -16572,11 +16532,7 @@ tparam.drain_half = FHEAP_DEL_DRAIN_ALL;
nerrors += test_man_remove_2nd_indirect(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_3rd_indirect(fapl, &small_cparam, &tparam);
} /* end else */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
/* Skip blocks insertion */
/* (covers insertion & deletion of skipped blocks) */
nerrors += test_man_skip_start_block(fapl, &small_cparam, &tparam);
@@ -16608,21 +16564,13 @@ HDfprintf(stderr, "Uncomment tests!\n");
nerrors += test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(fapl, &small_cparam, &tparam);
nerrors += test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(fapl, &small_cparam, &tparam);
} /* end else */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
/* Fragmented insertion patterns */
/* (covers insertion & deletion of fragmented blocks) */
nerrors += test_man_frag_simple(fapl, &small_cparam, &tparam);
nerrors += test_man_frag_direct(fapl, &small_cparam, &tparam);
nerrors += test_man_frag_2nd_direct(fapl, &small_cparam, &tparam);
nerrors += test_man_frag_3rd_direct(fapl, &small_cparam, &tparam);
-#else /* QAK */
- HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK2
} /* end for */
} /* end for */
@@ -16630,22 +16578,12 @@ HDfprintf(stderr, "Uncomment tests!\n");
tparam.drain_half = FHEAP_DEL_DRAIN_ALL;
} /* end block */
-#endif /* QAK2 */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK2
} /* end for */
-#endif /* QAK2 */
} /* end block */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
/*
* Test fractal heap 'huge' & 'tiny' object insertion & deletion
*/
-#ifndef QAK
{
fheap_test_del_dir_t del_dir; /* Deletion direction */
unsigned id_len; /* Length of heap IDs */
@@ -16687,24 +16625,16 @@ HDfprintf(stderr, "Uncomment tests!\n");
tparam.del_dir = del_dir;
/* Test 'huge' object insert & delete */
-#ifndef QAK
nerrors += test_huge_insert_one(fapl, &small_cparam, &tparam);
nerrors += test_huge_insert_two(fapl, &small_cparam, &tparam);
nerrors += test_huge_insert_three(fapl, &small_cparam, &tparam);
nerrors += test_huge_insert_mix(fapl, &small_cparam, &tparam);
nerrors += test_filtered_huge(fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
/* Test 'tiny' object insert & delete */
nerrors += test_tiny_insert_one(fapl, &small_cparam, &tparam);
nerrors += test_tiny_insert_two(fapl, &small_cparam, &tparam);
nerrors += test_tiny_insert_mix(fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
} /* end for */
} /* end for */
@@ -16712,16 +16642,9 @@ HDfprintf(stderr, "Uncomment tests!\n");
small_cparam.id_len = 0;
tparam.actual_id_len = HEAP_ID_LEN;
} /* end block */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#else /* QAK2 */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK2 */
/* Test I/O filter support */
-#ifndef QAK
/* Try several different methods of deleting objects */
{
fheap_test_del_dir_t del_dir; /* Deletion direction */
@@ -16743,16 +16666,11 @@ HDfprintf(stderr, "Uncomment tests!\n");
tparam.comp = FHEAP_TEST_NO_COMPRESS;
} /* end for */
} /* end block */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
/* Random object insertion & deletion */
if(ExpressMode > 1)
printf("***Express test mode on. Some tests skipped\n");
else {
-#ifndef QAK
/* Random tests using "small" heap creation parameters */
puts("Using 'small' heap creation parameters");
@@ -16765,11 +16683,7 @@ HDfprintf(stderr, "Uncomment tests!\n");
tparam.del_dir = FHEAP_DEL_HEAP;
nerrors += test_random((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(50*1000*1000)), fapl, &small_cparam, &tparam);
nerrors += test_random_pow2((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
/* Random tests using "large" heap creation parameters */
puts("Using 'large' heap creation parameters");
tparam.actual_id_len = LARGE_HEAP_ID_LEN;
@@ -16783,18 +16697,11 @@ HDfprintf(stderr, "Uncomment tests!\n");
tparam.del_dir = FHEAP_DEL_HEAP;
nerrors += test_random((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(50*1000*1000)), fapl, &large_cparam, &tparam);
nerrors += test_random_pow2((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &large_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
/* Reset the "normal" heap ID length */
tparam.actual_id_len = SMALL_HEAP_ID_LEN;
} /* end else */
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
/* Test object writing support */
/* Basic object writing */
@@ -16806,19 +16713,10 @@ HDfprintf(stderr, "Uncomment tests!\n");
/* Reset block compression */
tparam.comp = FHEAP_TEST_NO_COMPRESS;
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
-#ifndef QAK
} /* end for */
-#endif /* QAK */
/* Tests that address specific bugs */
-#ifndef QAK
nerrors += test_bug1(fapl, &small_cparam, &tparam);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment tests!\n");
-#endif /* QAK */
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
diff --git a/test/fillval.c b/test/fillval.c
index 4f7adc1..6eb3565 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -2370,7 +2370,7 @@ main(int argc, char *argv[])
{
int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1;
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- unsigned new_format; /* Whether to use the new format or not */
+ unsigned new_format; /* Whether to use the new format or not */
if(argc >= 2) {
test_contig = test_chunk = test_compact = 0;
diff --git a/test/freespace.c b/test/freespace.c
index d963a6e..181e6a1 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -1995,7 +1995,8 @@ test_fs_sect_shrink(hid_t fapl)
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
- if (node_found) TEST_ERROR
+ if (node_found)
+ TEST_ERROR
if(check_stats(f, frsp, &state))
TEST_ERROR
@@ -2095,7 +2096,8 @@ test_fs_sect_shrink(hid_t fapl)
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
- if (node_found) TEST_ERROR
+ if (node_found)
+ TEST_ERROR
/* section A should not be there in free-space */
if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
@@ -2238,8 +2240,8 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
if (H5FS_sect_change_class(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
- TEST_FSPACE_SECT_TYPE_NONE) < 0)
- TEST_ERROR
+ TEST_FSPACE_SECT_TYPE_NONE) < 0)
+ TEST_ERROR
state.serial_sect_count += 1;
state.ghost_sect_count -=1;
diff --git a/test/links.c b/test/links.c
index 3aff68b..3364c7e 100644
--- a/test/links.c
+++ b/test/links.c
@@ -22,7 +22,7 @@
/*
* This file needs to access private information from the H5FD package.
- * This file also needs to access the group testing code.
+ * This file also needs to access the file driver testing code.
*/
#define H5FD_FRIEND /*suppress error about including H5FDpkg */
#define H5FD_TESTING
diff --git a/test/objcopy.c b/test/objcopy.c
index 4166284..0711fb0 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -7200,7 +7200,7 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
if(H5Gclose(gid) < 0) TEST_ERROR
/* create file to hold external links to the src file */
- if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, H5P_DEFAULT, src_fapl)) < 0) TEST_ERROR
+ if((fid_ext = H5Fcreate(ext_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR
/* create group in the file that will hold the external link */
if((gid = H5Gcreate2(fid_ext, NAME_GROUP_LINK, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR