From 0a73f3dd4b33abbd3ea9b024442e40ae05e56549 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 26 Mar 2021 16:16:38 -0700 Subject: Fixed 1.6 compatibility issues and ran source formatter --- src/H5C.c | 5 +-- src/H5FDcore.c | 7 ++-- src/H5FDlog.c | 12 +++---- src/H5FDmulti.c | 2 +- src/H5FDsec2.c | 12 +++---- src/H5Fint.c | 2 +- src/H5Fprivate.h | 21 ++++++------ src/H5Lprivate.h | 3 +- src/H5Lpublic.h | 7 ++-- src/H5MFpkg.h | 5 +-- src/H5MVpkg.h | 5 +-- src/H5Ppublic.h | 26 +++++++-------- test/fheap.c | 75 +++++++++++++++++++++++-------------------- test/ntypes.c | 21 +++++++----- test/tvlstr.c | 21 +++++++----- test/vfd_swmr.c | 6 ++-- test/vfd_swmr_bigset_writer.c | 2 +- test/vfd_swmr_common.c | 6 ++-- test/vfd_swmr_common.h | 4 +-- test/vfd_swmr_group_writer.c | 2 +- test/vfd_swmr_vlstr_reader.c | 2 +- testpar/t_cache_image.c | 3 +- testpar/t_file.c | 2 +- testpar/testphdf5.h | 5 ++- 24 files changed, 137 insertions(+), 119 deletions(-) diff --git a/src/H5C.c b/src/H5C.c index 845d90b..222b836 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -531,8 +531,9 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold); - HDfprintf(stdout, "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + HDfprintf(stdout, "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", + cache_ptr->prefix, old_max_cache_size, old_min_clean_size, new_max_cache_size, + new_min_clean_size); break; case flash_increase: diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 9d7b025..b50f71a 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -1137,14 +1137,13 @@ H5FD__core_query(const H5FD_t *_file, unsigned long *flags /* out */) *flags |= H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ *flags |= H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ *flags |= H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ - *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ - *flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */ + *flags |= H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */ + *flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */ *flags |= H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS; /* OK to use file image callbacks with this VFD */ /* These feature flags are only applicable if the backing store is enabled */ if (file && file->fd >= 0 && file->backing_store) { - *flags |= - H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ + *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */ *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */ } diff --git a/src/H5FDlog.c b/src/H5FDlog.c index c55ba6b..09e71f1 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -71,12 +71,12 @@ static const char *flavors[] = { * occurs), and `op' will be set to H5F_OP_UNKNOWN. */ typedef struct H5FD_log_t { - H5FD_t pub; /* public stuff, must be first */ - int fd; /* the unix file */ - haddr_t eoa; /* end of allocated region */ - haddr_t eof; /* end of file; current file size */ - haddr_t pos; /* current file I/O position */ - H5FD_file_op_t op; /* last operation */ + H5FD_t pub; /* public stuff, must be first */ + int fd; /* the unix file */ + haddr_t eoa; /* end of allocated region */ + haddr_t eof; /* end of file; current file size */ + haddr_t pos; /* current file I/O position */ + H5FD_file_op_t op; /* last operation */ hbool_t ignore_disabled_file_locks; char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */ #ifndef H5_HAVE_WIN32_API diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 7c6dc67..a5a38a6 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1905,7 +1905,7 @@ H5FD_multi_unlock(H5FD_t *_file) if (nerrors) H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1); - return 0; + return 0; } /* H5FD_multi_unlock() */ /*------------------------------------------------------------------------- diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index cc774d9..319089c 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -53,12 +53,12 @@ static htri_t ignore_disabled_file_locks_s = FAIL; * occurs), and 'op' will be set to H5F_OP_UNKNOWN. */ typedef struct H5FD_sec2_t { - H5FD_t pub; /* public stuff, must be first */ - int fd; /* the filesystem file descriptor */ - haddr_t eoa; /* end of allocated region */ - haddr_t eof; /* end of file; current file size */ - haddr_t pos; /* current file I/O position */ - H5FD_file_op_t op; /* last operation */ + H5FD_t pub; /* public stuff, must be first */ + int fd; /* the filesystem file descriptor */ + haddr_t eoa; /* end of allocated region */ + haddr_t eof; /* end of file; current file size */ + haddr_t pos; /* current file I/O position */ + H5FD_file_op_t op; /* last operation */ hbool_t ignore_disabled_file_locks; char filename[H5FD_MAX_FILENAME_LEN]; /* Copy of file name from open operation */ #ifndef H5_HAVE_WIN32_API diff --git a/src/H5Fint.c b/src/H5Fint.c index 57176ce..27e187e 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1819,7 +1819,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) hbool_t set_flag = FALSE; /*set the status_flags in the superblock */ hbool_t clear = FALSE; /*clear the status_flags */ hbool_t evict_on_close; /* evict on close value from plist */ - hbool_t use_file_locking = TRUE; /* Using file locks? */ + hbool_t use_file_locking = TRUE; /* Using file locks? */ hbool_t ci_load = FALSE; /* whether MDC ci load requested */ hbool_t ci_write = FALSE; /* whether MDC CI write requested */ hbool_t file_create = FALSE; /* creating a new file or not */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 19a91ec..d661829 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -540,16 +540,17 @@ uint64_decode(uint8_t **pp) #define H5F_DEFAULT_CSET H5T_CSET_ASCII /* ========= File Creation properties ============ */ -#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ -#define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */ -#define H5F_CRT_SYM_LEAF_DEF 4 -#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ -#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ -#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ -#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ -#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */ -#define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ -#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index \ +#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ +#define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */ +#define H5F_CRT_SYM_LEAF_DEF 4 +#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ +#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ +#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ +#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ +#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */ +#define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ +#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME \ + "shmsg_message_minsize" /* Minimum size of messages in each index \ */ #define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ #define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index a5d447b..87c99b9 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -38,7 +38,8 @@ /* ======== Link access property names ======== */ #define H5L_ACS_NLINKS_NAME "max soft links" /* Number of soft links to traverse */ #define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" /* External link prefix */ -#define H5L_ACS_ELINK_FAPL_NAME "external link fapl" /* file access property list for external link access \ +#define H5L_ACS_ELINK_FAPL_NAME \ + "external link fapl" /* file access property list for external link access \ */ #define H5L_ACS_ELINK_FLAGS_NAME "external link flags" /* file access flags for external link traversal */ #define H5L_ACS_ELINK_CB_NAME "external link callback" /* callback function for external link traversal */ diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 8d7dd7f..b791f13 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -67,9 +67,10 @@ typedef enum { H5L_TYPE_EXTERNAL = 64, /* External link id */ H5L_TYPE_MAX = 255 /* Maximum link type id */ } H5L_type_t; -#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT /* Maximum value link value for "built-in" link types */ -#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL /* Link ids at or above this value are "user-defined" link types. \ - */ +#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT /* Maximum value link value for "built-in" link types */ +#define H5L_TYPE_UD_MIN \ + H5L_TYPE_EXTERNAL /* Link ids at or above this value are "user-defined" link types. \ + */ /* Information struct for link (for H5Lget_info2/H5Lget_info_by_idx2) * H5O_token_t version used in VOL layer and future public API calls diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h index 20ead53..71af401 100644 --- a/src/H5MFpkg.h +++ b/src/H5MFpkg.h @@ -50,8 +50,9 @@ /* Free-space section types for file */ /* (values stored in free space data structures in file) */ -#define H5MF_FSPACE_SECT_SIMPLE 0 /* For non-paged aggregation: section is a range of actual bytes in file \ - */ +#define H5MF_FSPACE_SECT_SIMPLE \ + 0 /* For non-paged aggregation: section is a range of actual bytes in file \ + */ #define H5MF_FSPACE_SECT_SMALL \ 1 /* For paged aggregation: "small" meta/raw data section which is < fsp_size) */ #define H5MF_FSPACE_SECT_LARGE 2 /* For paged aggregation: "large" Section which is >= fsp_size) */ diff --git a/src/H5MVpkg.h b/src/H5MVpkg.h index 1c05da4..2d564e6 100644 --- a/src/H5MVpkg.h +++ b/src/H5MVpkg.h @@ -41,8 +41,9 @@ /* Free-space section types for file */ /* (values stored in free space data structures in file) */ -#define H5MV_FSPACE_SECT_SIMPLE 0 /* For non-paged aggregation: section is a range of actual bytes in file \ - */ +#define H5MV_FSPACE_SECT_SIMPLE \ + 0 /* For non-paged aggregation: section is a range of actual bytes in file \ + */ /****************************/ /* Package Private Typedefs */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 64476db..9524dca 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -352,19 +352,19 @@ H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t * H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled); -H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled); -H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); -H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); -H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); -H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); -H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata); -H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata); -H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, - hbool_t start_on_access); -H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, - size_t *location_size, hbool_t *start_on_access); -H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); -H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close); +H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled); +H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); +H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); +H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); +H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); +H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata); +H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata); +H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, + hbool_t start_on_access); +H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, + size_t *location_size, hbool_t *start_on_access); +H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); +H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close); #ifdef H5_HAVE_PARALLEL H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective); H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); diff --git a/test/fheap.c b/test/fheap.c index 2eb0372..2c888a2 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -80,8 +80,9 @@ #define IBLOCK_MAX_DROWS(fh, pos) \ H5HF_get_iblock_max_drows_test(fh, pos) /* Max. # of direct block rows in a indirect block */ #define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r) /* Size of a direct block in a given row */ -#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r) /* Free space in a direct block of a given row \ - */ +#define DBLOCK_FREE(fh, r) \ + H5HF_get_dblock_free_test(fh, r) /* Free space in a direct block of a given row \ + */ /* The number of settings for testing: page buffering, file space strategy and persisting free-space */ #define NUM_PB_FS 6 @@ -8467,10 +8468,10 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ fheap_heap_state_t state; /* State of fractal heap */ - const char * base_desc = - "skipping starting block, then adding object back to first block, then remove all objects %s"; /* Test - description - */ + const char *base_desc = "skipping starting block, then adding object back to first block, then remove " + "all objects %s"; /* Test + description + */ /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0) @@ -8919,11 +8920,11 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t * size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char * base_desc = - "skipping blocks with indirect root, then backfill and extend, then remove all objects %s"; /* Test - description - */ - unsigned u; /* Local index variable */ + const char *base_desc = "skipping blocks with indirect root, then backfill and extend, then remove all " + "objects %s"; /* Test + description + */ + unsigned u; /* Local index variable */ /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9086,10 +9087,10 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char * base_desc = - "filling first row, then skipping rows, then backfill and extend, then remove all objects %s"; /* Test - description - */ + const char *base_desc = "filling first row, then skipping rows, then backfill and extend, then remove " + "all objects %s"; /* Test + description + */ /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -9600,12 +9601,13 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char * base_desc = - "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too " - "large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Test - description - */ - unsigned u; /* Local index variables */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and " + "insert object too " + "large for 2nd level indirect blocks, then backfill and extend, then remove all " + "objects %s"; /* Test + description + */ + unsigned u; /* Local index variables */ /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -10854,12 +10856,12 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char - *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd " - "level indirect blocks, except last one, fill all direct blocks in last 3rd level " - "indirect block, and insert object too large for it's 2nd level indirect blocks, then " - "backfill and extend, then remove all objects %s"; /* Test description */ - unsigned u, v; /* Local index variables */ + const char * base_desc = + "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd " + "level indirect blocks, except last one, fill all direct blocks in last 3rd level " + "indirect block, and insert object too large for it's 2nd level indirect blocks, then " + "backfill and extend, then remove all objects %s"; /* Test description */ + unsigned u, v; /* Local index variables */ /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) @@ -11764,14 +11766,17 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ fheap_heap_state_t state; /* State of fractal heap */ - const char * base_desc = - "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill " - "first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, " - "fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect " - "block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test - description - */ - unsigned u, v; /* Local index variables */ + const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level " + "indirect blocks, fill " + "first row of 3rd level indirect blocks in 4th level indirect block except last " + "3rd level block, " + "fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of " + "4th level indirect " + "block's 3rd level indirect block, then backfill and extend, then remove all " + "objects %s"; /* Test + description + */ + unsigned u, v; /* Local index variables */ /* Perform common test initialization operations */ if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0) diff --git a/test/ntypes.c b/test/ntypes.c index fc69382..0235c60 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -1993,14 +1993,19 @@ error: static herr_t test_vlstr_dtype(hid_t file) { - const char *wdata[SPACE1_DIM1] = { - "Four score and seven years ago our forefathers brought forth on this continent a new nation,", - "conceived in liberty and dedicated to the proposition that all men are created equal.", - "Now we are engaged in a great civil war,", - "testing whether that nation or any nation so conceived and so dedicated can long endure."}; /* Information - to - write - */ + const char + * + wdata[SPACE1_DIM1] = + { + "Four score and seven years ago our forefathers brought forth on this continent a new " + "nation,", + "conceived in liberty and dedicated to the proposition that all men are created equal.", + "Now we are engaged in a great civil war,", + "testing whether that nation or any nation so conceived and so dedicated can long " + "endure."}; /* Information + to + write + */ char * rdata[SPACE1_DIM1]; /* Information read in */ hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */ hid_t dataset = -1; /* Dataset ID */ diff --git a/test/tvlstr.c b/test/tvlstr.c index e4c33f6..091dd77 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -110,14 +110,19 @@ test_vlstr_free_custom(void *_mem, void *info) static void test_vlstrings_basic(void) { - const char *wdata[SPACE1_DIM1] = { - "Four score and seven years ago our forefathers brought forth on this continent a new nation,", - "conceived in liberty and dedicated to the proposition that all men are created equal.", - "Now we are engaged in a great civil war,", - "testing whether that nation or any nation so conceived and so dedicated can long endure."}; /* Information - to - write - */ + const char + * + wdata[SPACE1_DIM1] = + { + "Four score and seven years ago our forefathers brought forth on this continent a new " + "nation,", + "conceived in liberty and dedicated to the proposition that all men are created equal.", + "Now we are engaged in a great civil war,", + "testing whether that nation or any nation so conceived and so dedicated can long " + "endure."}; /* Information + to + write + */ char * rdata[SPACE1_DIM1]; /* Information read in */ char * wdata2; hid_t dataspace, dataset2; diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index 0910409..9c5899e 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -3494,9 +3494,9 @@ main(void) nerrors += test_file_fapl(); #ifndef H5_HAVE_WIN32_API -/* XXX: VFD SWMR: Fails on Win32 due to problems unlinking the metadata file. - * The OS claims another process is using the file. - */ + /* XXX: VFD SWMR: Fails on Win32 due to problems unlinking the metadata file. + * The OS claims another process is using the file. + */ nerrors += test_writer_create_open_flush(); nerrors += test_writer_md(); #endif diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c index a3653d5..614a499 100644 --- a/test/vfd_swmr_bigset_writer.c +++ b/test/vfd_swmr_bigset_writer.c @@ -692,7 +692,7 @@ open_extensible_dset(state_t *s, unsigned int which) for (i = 0; i < tries; i++) { struct timespec one_tenth = {.tv_sec = 0, .tv_nsec = 1000000000L / 10}; - ds = H5Dopen(s->file[0], dname, s->dapl); + ds = H5Dopen2(s->file[0], dname, s->dapl); if (ds >= 0) break; diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index 93abe60..dad9e3d 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -126,7 +126,7 @@ disable_estack(void) { estack_state_t es = estack_get_state(); - (void)H5Eset_auto(H5E_DEFAULT, NULL, NULL); + (void)H5Eset_auto2(H5E_DEFAULT, NULL, NULL); return es; } @@ -137,7 +137,7 @@ estack_get_state(void) { estack_state_t es; - (void)H5Eget_auto(H5E_DEFAULT, &es.efunc, &es.edata); + (void)H5Eget_auto2(H5E_DEFAULT, &es.efunc, &es.edata); return es; } @@ -148,7 +148,7 @@ estack_get_state(void) void restore_estack(estack_state_t es) { - (void)H5Eset_auto(H5E_DEFAULT, es.efunc, es.edata); + (void)H5Eset_auto2(H5E_DEFAULT, es.efunc, es.edata); } #ifndef H5_HAVE_WIN32_API diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index 9a51b6d..e70c316 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -38,8 +38,8 @@ /************/ typedef struct _estack_state { - H5E_auto_t efunc; - void * edata; + H5E_auto2_t efunc; + void * edata; } estack_state_t; typedef enum _testsel { TEST_NONE = 0, TEST_NULL, TEST_OOB } testsel_t; diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c index aa87b72f..1c309e1 100644 --- a/test/vfd_swmr_group_writer.c +++ b/test/vfd_swmr_group_writer.c @@ -228,7 +228,7 @@ verify_group(state_t *s, unsigned int which) esnprintf(name, sizeof(name), "/group-%d", which); es = disable_estack(); - g = H5Gopen(s->file, name, H5P_DEFAULT); + g = H5Gopen2(s->file, name, H5P_DEFAULT); restore_estack(es); if (g < 0) diff --git a/test/vfd_swmr_vlstr_reader.c b/test/vfd_swmr_vlstr_reader.c index 029dc50..226c0a8 100644 --- a/test/vfd_swmr_vlstr_reader.c +++ b/test/vfd_swmr_vlstr_reader.c @@ -171,7 +171,7 @@ main(int argc, char **argv) dbgf(2, "iteration %d which %d", i, which); (void)snprintf(name[which], sizeof(name[which]), "dset-%d", which); es = disable_estack(); - dset[which] = H5Dopen(fid, name[which], H5P_DEFAULT); + dset[which] = H5Dopen2(fid, name[which], H5P_DEFAULT); restore_estack(es); if (caught_out_of_bounds || dset[which] == badhid) { dbgf(2, ": couldn't open\n"); diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 4ca38f7..1fbfbd4 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -1143,8 +1143,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons pass = FALSE; failure_mssg = "page buffer unexepectedly enabled."; } - else if ((file_ptr->shared->pb_ptr != NULL) && - ((enable_page_buffer) || (l_facc_type != FACC_MPIO))) { + else if ((file_ptr->shared->pb_ptr != NULL) && ((enable_page_buffer) || (l_facc_type != FACC_MPIO))) { pass = FALSE; failure_mssg = "page buffer unexepectedly disabled."; diff --git a/testpar/t_file.c b/testpar/t_file.c index 2c9bd03..d948804 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -639,7 +639,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t MPI_Barrier(MPI_COMM_WORLD); - VRFY((f->shared->pb_ptr!= NULL), ""); + VRFY((f->shared->pb_ptr != NULL), ""); VRFY((f->shared->pb_ptr->page_size == page_size), ""); VRFY((f->shared->pb_ptr->max_size == page_buffer_size), ""); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 54accc1..9aa51c1 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -97,8 +97,7 @@ enum H5TEST_COLL_CHUNK_API { #define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ #define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 \ - 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ #define FSPACE_DIM2 \ 3600 /* We will read dataset back from the file to the dataset \ in memory with these dataspace parameters. */ @@ -247,7 +246,7 @@ void collective_group_write(void); void independent_group_read(void); void test_fapl_mpio_dup(void); void test_split_comm_access(void); -//void test_page_buffer_access(void); +// void test_page_buffer_access(void); void dataset_atomicity(void); void dataset_writeInd(void); void dataset_writeAll(void); -- cgit v0.12