diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-02 14:24:46 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-02 14:24:46 (GMT) |
commit | 5df52404bc6f6323ebf064b3d82b8e683de96eba (patch) | |
tree | d83cd5a7e6a40ce7dcfacf9106b32ea636b73963 | |
parent | 046e64a9bd725c5ba0bebef1ba7278445e391d25 (diff) | |
download | hdf5-5df52404bc6f6323ebf064b3d82b8e683de96eba.zip hdf5-5df52404bc6f6323ebf064b3d82b8e683de96eba.tar.gz hdf5-5df52404bc6f6323ebf064b3d82b8e683de96eba.tar.bz2 |
Misc. small cleanups to sync against incoming page buffering changes.
-rw-r--r-- | src/H5C.c | 64 | ||||
-rw-r--r-- | src/H5Cpkg.h | 7 | ||||
-rw-r--r-- | src/H5Fsuper.c | 17 | ||||
-rw-r--r-- | test/cache.c | 12 | ||||
-rw-r--r-- | test/cache_common.c | 4 | ||||
-rw-r--r-- | test/cache_image.c | 2 | ||||
-rw-r--r-- | test/dsets.c | 10 | ||||
-rw-r--r-- | test/fheap.c | 104 | ||||
-rw-r--r-- | test/fillval.c | 2 | ||||
-rw-r--r-- | test/freespace.c | 10 | ||||
-rw-r--r-- | test/links.c | 2 | ||||
-rw-r--r-- | test/objcopy.c | 2 | ||||
-rw-r--r-- | testpar/t_cache.c | 10 | ||||
-rw-r--r-- | tools/test/h5format_convert/h5fc_gentest.c | 3 |
14 files changed, 58 insertions, 191 deletions
@@ -1090,36 +1090,20 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) break; case H5C_RING_RDFSM: - if(!cache_ptr->rdfsm_settled) { - hbool_t fsm_settled = FALSE; /* Whether the FSM was actually settled */ - - /* Settle raw data FSM */ - if(H5MF_settle_raw_data_fsm(f, dxpl_id, &fsm_settled) < 0) + /* Settle raw data FSM */ + if(!cache_ptr->rdfsm_settled) + if(H5MF_settle_raw_data_fsm(f, dxpl_id, &cache_ptr->rdfsm_settled) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed") - - /* Only set the flag if the FSM was actually settled */ - if(fsm_settled) - cache_ptr->rdfsm_settled = TRUE; - } /* end if */ break; case H5C_RING_MDFSM: - if(!cache_ptr->mdfsm_settled) { - hbool_t fsm_settled = FALSE; /* Whether the FSM was actually settled */ - - /* Settle metadata FSM */ - if(H5MF_settle_meta_data_fsm(f, dxpl_id, &fsm_settled) < 0) + /* Settle metadata FSM */ + if(!cache_ptr->mdfsm_settled) + if(H5MF_settle_meta_data_fsm(f, dxpl_id, &cache_ptr->mdfsm_settled) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed") - - /* Only set the flag if the FSM was actually settled */ - if(fsm_settled) - cache_ptr->mdfsm_settled = TRUE; - } /* end if */ break; case H5C_RING_SBE: - break; - case H5C_RING_SB: break; @@ -5538,8 +5522,8 @@ H5C_flush_invalidate_ring(H5F_t * f, hid_t dxpl_id, H5C_ring_t ring, */ if(node_ptr == NULL) { - HDassert(cache_ptr->slist_len == (initial_slist_len + cache_ptr->slist_len_increase)); - HDassert(cache_ptr->slist_size == (initial_slist_size + cache_ptr->slist_size_increase)); + HDassert(cache_ptr->slist_len == (uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase)); + HDassert(cache_ptr->slist_size == (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase)); } /* end if */ #endif /* H5C_DO_SANITY_CHECKS */ @@ -5946,8 +5930,8 @@ H5C_flush_ring(H5F_t *f, hid_t dxpl_id, H5C_ring_t ring, unsigned flags) #if H5C_DO_SANITY_CHECKS /* Verify that the slist size and length are as expected. */ - HDassert((initial_slist_len + cache_ptr->slist_len_increase) == cache_ptr->slist_len); - HDassert((initial_slist_size + cache_ptr->slist_size_increase) == cache_ptr->slist_size); + HDassert((uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase) == cache_ptr->slist_len); + HDassert((size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase) == cache_ptr->slist_size); #endif /* H5C_DO_SANITY_CHECKS */ } /* while */ @@ -8124,31 +8108,17 @@ H5C__serialize_cache(H5F_t *f, hid_t dxpl_id) break; case H5C_RING_RDFSM: - if(!cache_ptr->rdfsm_settled) { - hbool_t fsm_settled = FALSE; /* Whether the FSM was actually settled */ - - /* Settle raw data FSM */ - if(H5MF_settle_raw_data_fsm(f, dxpl_id, &fsm_settled) < 0) + /* Settle raw data FSM */ + if(!cache_ptr->rdfsm_settled) + if(H5MF_settle_raw_data_fsm(f, dxpl_id, &cache_ptr->rdfsm_settled) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed") - - /* Only set the flag if the FSM was actually settled */ - if(fsm_settled) - cache_ptr->rdfsm_settled = TRUE; - } /* end if */ break; case H5C_RING_MDFSM: - if(!cache_ptr->mdfsm_settled) { - hbool_t fsm_settled = FALSE; /* Whether the FSM was actually settled */ - - /* Settle metadata FSM */ - if(H5MF_settle_meta_data_fsm(f, dxpl_id, &fsm_settled) < 0) + /* Settle metadata FSM */ + if(!cache_ptr->mdfsm_settled) + if(H5MF_settle_meta_data_fsm(f, dxpl_id, &cache_ptr->mdfsm_settled) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed") - - /* Only set the flag if the FSM was actually settled */ - if(fsm_settled) - cache_ptr->mdfsm_settled = TRUE; - } /* end if */ break; case H5C_RING_SBE: @@ -8161,7 +8131,7 @@ H5C__serialize_cache(H5F_t *f, hid_t dxpl_id) } /* end switch */ if(H5C__serialize_ring(f, dxpl_id, ring) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "serialize ring failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialize ring failed") ring++; } /* end while */ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 3bd6f15..5b923e9 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -4675,8 +4675,8 @@ struct H5C_t { H5SL_t * slist_ptr; uint32_t num_last_entries; #if H5C_DO_SANITY_CHECKS - int64_t slist_len_increase; - int64_t slist_size_increase; + int32_t slist_len_increase; + ssize_t slist_size_increase; #endif /* H5C_DO_SANITY_CHECKS */ /* Fields for maintaining list of tagged entries */ @@ -4872,7 +4872,7 @@ typedef int (*H5C_tag_iter_cb_t)(H5C_cache_entry_t *entry, void *ctx); /* Package Private Prototypes */ /******************************/ H5_DLL herr_t H5C__prep_image_for_file_close(H5F_t *f, hid_t dxpl_id); -H5_DLL herr_t H5C__deserialize_prefetched_entry(H5F_t * f, hid_t dxpl_id, +H5_DLL herr_t H5C__deserialize_prefetched_entry(H5F_t *f, hid_t dxpl_id, H5C_t * cache_ptr, H5C_cache_entry_t** entry_ptr_ptr, const H5C_class_t * type, haddr_t addr, void * udata); @@ -4888,6 +4888,7 @@ H5_DLL herr_t H5C__make_space_in_cache(H5F_t * f, hid_t dxpl_id, H5_DLL herr_t H5C__flush_marked_entries(H5F_t * f, hid_t dxpl_id); H5_DLL herr_t H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hid_t dxpl_id); +H5_DLL herr_t H5C__serialize_cache(H5F_t *f, hid_t dxpl_id); H5_DLL herr_t H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global, H5C_tag_iter_cb_t cb, void *cb_ctx); diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index f4ce969..3b86dae 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -861,6 +861,7 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) H5O_loc_t ext_loc; /* Superblock extension object location */ hbool_t need_ext; /* Whether the superblock extension is needed */ hbool_t ext_created = FALSE; /* Whether the extension has been created */ + hbool_t non_default_fs_settings = FALSE; /* Whether the file has non-default free-space settings */ herr_t ret_value = SUCCEED; /* Return Value */ FUNC_ENTER_PACKAGE_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL) @@ -887,6 +888,11 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) if(H5P_get(plist, H5F_CRT_BTREE_RANK_NAME, &sblock->btree_k[0]) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + /* Check for non-default free-space settings */ + if(!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF && + f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF)) + non_default_fs_settings = TRUE; + /* Bump superblock version if latest superblock version support is enabled */ if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_SUPERBLOCK)) super_vers = HDF5_SUPERBLOCK_VERSION_LATEST; @@ -896,8 +902,7 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) /* Bump superblock version to create superblock extension for * non-default file space strategy or non-default free-space threshold */ - else if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF || - f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) + else if(non_default_fs_settings) super_vers = HDF5_SUPERBLOCK_VERSION_2; /* Check for non-default indexed storage B-tree internal 'K' value * and set the version # of the superblock to 1 if it is a non-default @@ -1014,8 +1019,7 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) need_ext = TRUE; } /* end if */ /* Files with non-default free space settings always need the superblock extension */ - else if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF || - f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) { + else if(non_default_fs_settings) { HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2); need_ext = TRUE; } /* end if */ @@ -1103,9 +1107,8 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id) f->shared->drvinfo_sb_msg_exists = TRUE; } /* end if */ - /* Check for non-default free space settings */ - if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF || - f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) { + /* Check for non-default free-space info settings */ + if(non_default_fs_settings) { H5FD_mem_t type; /* Memory type for iteration */ H5O_fsinfo_t fsinfo; /* Free space manager info message */ 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 diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 0e69557..bfa4c8f 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -4334,8 +4334,7 @@ setup_cache_for_test(hid_t * fid_ptr, * *****************************************************************************/ static void -verify_writes(unsigned num_writes, - haddr_t * written_entries_tbl) +verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) { const hbool_t report = FALSE; hbool_t proceed = TRUE; @@ -4361,13 +4360,10 @@ verify_writes(unsigned num_writes, } } - if ( proceed ) { - + if(proceed) proceed = verify_total_writes(num_writes); - } - while ( ( proceed ) && ( u < num_writes ) ) - { + while(proceed && u < num_writes) { proceed = verify_entry_writes(written_entries_tbl[u], 1); u++; } diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c index fea7eed..9ef8e6e 100644 --- a/tools/test/h5format_convert/h5fc_gentest.c +++ b/tools/test/h5format_convert/h5fc_gentest.c @@ -44,8 +44,6 @@ const char *FILENAME[] = { #define GROUP "GROUP" -#define DSET_BT1 "DSET_BT1" -#define DSET_NDATA_BT1 "DSET_NDATA_BT1" #define DSET_COMPACT "DSET_COMPACT" #define DSET_CONTIGUOUS "DSET_CONTIGUOUS" @@ -770,6 +768,7 @@ error: H5Dclose(did2); H5Gclose(gid); H5Fclose(fid); + H5Pclose(fapl); H5Pclose(fcpl); } H5E_END_TRY; |