diff options
Diffstat (limited to 'test/cache_tagging.c')
-rw-r--r-- | test/cache_tagging.c | 272 |
1 files changed, 136 insertions, 136 deletions
diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 6c65280..77554fd 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -15,7 +15,7 @@ * * This file contains tests for metadata tagging. */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ #define H5F_TESTING #include "H5Fpkg.h" @@ -29,16 +29,16 @@ /* Test Defines */ /* ============ */ -#define FILENAME "tagging_test.h5" -#define FILENAME2 "tagging_ext_test.h5" -#define GROUPNAME "Group" +#define FILENAME "tagging_test.h5" +#define FILENAME2 "tagging_ext_test.h5" +#define GROUPNAME "Group" #define GROUPNAMEPATH "/Group" #define GROUPNAMECOPY "GroupCopy" -#define ATTRNAME "Attribute 1" -#define ATTRNAME3 "Attribute 3" -#define DATASETNAME "Dataset" -#define DATASETNAME2 "Dataset2" -#define LINKNAME "Link" +#define ATTRNAME "Attribute 1" +#define ATTRNAME3 "Attribute 3" +#define DATASETNAME "Dataset" +#define DATASETNAME2 "Dataset2" +#define LINKNAME "Link" #define RANK 2 #define DIMS 32 @@ -47,7 +47,7 @@ #define TEST_DEFAULT 0 #define TEST_SHMESG 1 #define NUM_TEST_TYPES 2 - + /* ===================== */ /* Function Declarations */ /* ===================== */ @@ -98,7 +98,7 @@ static unsigned check_invalid_tag_application(void); #ifndef NDEBUG - + /*------------------------------------------------------------------------- * Function: dump_cache() * @@ -127,19 +127,19 @@ static int dump_cache(hid_t fid) TEST_ERROR; return 0; - + error: return -1; } /* dump_cache */ #endif /* NDEBUG */ /* end debugging functions */ - + /*------------------------------------------------------------------------- * Function: verify_no_unknown_tags() * * Purpose: Verifies that all tags in the provided cache have the - * 'dirtied' flag set. Other verification functions in this - * test file set this flag after checking them, so + * 'dirtied' flag set. Other verification functions in this + * test file set this flag after checking them, so * this is handy to verify that tests have checked all entries * in the cache. * @@ -181,7 +181,7 @@ error: return -1; } /* verify_no_unknown_tags */ - + /*------------------------------------------------------------------------- * Function: mark_all_entries_investigated() * @@ -229,7 +229,7 @@ error: return -1; } /* mark_all_entries_investigated */ - + /*------------------------------------------------------------------------- * Function: reset_all_entries_investigated() * @@ -275,15 +275,15 @@ error: return -1; } /* reset_all_entries_investigated */ - + /*------------------------------------------------------------------------- * Function: verify_tag() * * Purpose: Asserts that there is an entry in the specified cache with * the provided entry id and provided tag. The function will - * fail if this is not the case. If found, this function will - * set the entry's flush_marker flag, so future verification - * attempts can skip over this entry, knowing it has already been + * fail if this is not the case. If found, this function will + * set the entry's flush_marker flag, so future verification + * attempts can skip over this entry, knowing it has already been * checked. * * Return: 0 on Success, -1 on Failure @@ -327,7 +327,7 @@ verify_tag(hid_t fid, int id, haddr_t tag) /* Didn't find the tagged entry, throw an error */ TEST_ERROR; - + done: return 0; @@ -358,7 +358,7 @@ error: return -1; } /* evict entries */ - + /*------------------------------------------------------------------------- * Function: get_object_header_tag() * @@ -389,7 +389,7 @@ error: return -1; } /* get_object_header_tag */ - + /*------------------------------------------------------------------------- * Function: get_sbe_tag() * @@ -420,7 +420,7 @@ error: /* Test Functions */ /* ============== */ - + /*------------------------------------------------------------------------- * Function: check_file_creation_tags * @@ -434,7 +434,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_file_creation_tags(hid_t fcpl_id, int type) { /* Variable Declarations */ @@ -501,7 +501,7 @@ error: return 1; } /* check_file_creation_tags */ - + /*------------------------------------------------------------------------- * Function: check_file_open_tags * @@ -515,7 +515,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_file_open_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -539,12 +539,12 @@ check_file_open_tags(hid_t fcpl, int type) /* Retrieve various tags */ if ( type == TEST_SHMESG ) { - + /* determine tag value of superblock extension object header */ if ( get_sbe_tag(fid, &sbe_tag) < 0 ) TEST_ERROR; } /* end if */ - + /* Close the file */ if ( H5Fclose(fid) < 0 ) TEST_ERROR; @@ -607,7 +607,7 @@ error: return 1; } /* check_file_open_tags */ - + /*------------------------------------------------------------------------- * Function: check_group_creation_tags * @@ -621,7 +621,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_group_creation_tags(void) { /* Variable Declarations */ @@ -633,7 +633,7 @@ check_group_creation_tags(void) /* Testing Macro */ TESTING("tag application during group creation"); - + /* ===== */ /* Setup */ /* ===== */ @@ -665,7 +665,7 @@ check_group_creation_tags(void) /* if verbose, print cache index to screen for visual verification */ if ( verbose ) dump_cache(fid); #endif /* NDEBUG */ /* end debugging functions */ - + /* Verify root group's tagged metadata */ if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR; if ( verify_tag(fid, H5AC_SNODE_ID, root_tag) < 0 ) TEST_ERROR; @@ -702,7 +702,7 @@ error: return 1; } /* check_group_creation_tags */ - + /*------------------------------------------------------------------------- * Function: check_multi_group_creation_tags * @@ -716,7 +716,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_multi_group_creation_tags(void) { /* Variable Declarations */ @@ -829,7 +829,7 @@ error: return 1; } /* check_multi_group_creation_tags */ - + /*------------------------------------------------------------------------- * Function: check_link_iteration_tags * @@ -843,7 +843,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_link_iteration_tags(void) { /* Variable Declarations */ @@ -941,7 +941,7 @@ error: return 1; } /* check_link_iteration_tags */ - + /*------------------------------------------------------------------------- * Function: check_dense_attribute_tags * @@ -955,7 +955,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dense_attribute_tags(void) { /* Variable Declarations */ @@ -969,7 +969,7 @@ check_dense_attribute_tags(void) hid_t fapl = -1; /* File access property list */ haddr_t d_tag = 0; /* Dataset tag value */ haddr_t root_tag = 0; /* Root group tag value */ - char attrname[500]; /* Name of attribute */ + char attrname[500]; /* Name of attribute */ /* Testing Macro */ TESTING("tag application during dense attribute manipulation"); @@ -995,10 +995,10 @@ check_dense_attribute_tags(void) /* Create dataset */ if ( (did = H5Dcreate2(fid, DATASETNAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0 ) TEST_ERROR; if ( H5Pclose(dcpl) < 0 ) TEST_ERROR; - + /* get dataset object header */ if ( get_object_header_tag(did, &d_tag) < 0 ) TEST_ERROR; - + /* Clear Metadata Tags (don't care about them for this test */ mark_all_entries_investigated(fid); @@ -1124,7 +1124,7 @@ error: return 1; } /* check_dense_attribute_tags */ - + /*------------------------------------------------------------------------- * Function: check_group_open_tags * @@ -1138,7 +1138,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_group_open_tags(void) { /* Variable Declarations */ @@ -1150,7 +1150,7 @@ check_group_open_tags(void) /* Testing Macro */ TESTING("tag application during group open"); - + /* ===== */ /* Setup */ /* ===== */ @@ -1225,7 +1225,7 @@ error: return 1; } /* check_group_open_tags */ - + /*------------------------------------------------------------------------- * Function: check_attribute_creation_tags * @@ -1239,7 +1239,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_attribute_creation_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -1312,7 +1312,7 @@ check_attribute_creation_tags(hid_t fcpl, int type) /* verify shared message index tagged with sohm */ if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; if ( verify_tag(fid, H5AC_SOHM_TABLE_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; - + /* verify fractal heap header belonging to group */ if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; @@ -1331,7 +1331,7 @@ check_attribute_creation_tags(hid_t fcpl, int type) /* verify no other entries present */ if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR; - + /* Reset the changes we've made to the cache's data structures */ if(reset_all_entries_investigated(fid) < 0) TEST_ERROR; @@ -1354,7 +1354,7 @@ error: return 1; } /* check_attribute_creation_tags */ - + /*------------------------------------------------------------------------- * Function: check_attribute_open_tags * @@ -1368,7 +1368,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_attribute_open_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -1439,7 +1439,7 @@ check_attribute_open_tags(hid_t fcpl, int type) /* verify object header chunk belonging to group */ if ( verify_tag(fid, H5AC_OHDR_CHK_ID, g_tag) < 0 ) TEST_ERROR; - + if ( type == TEST_SHMESG ) { /* verify (another) object header chunk belonging to group */ @@ -1485,7 +1485,7 @@ error: return 1; } /* check_attribute_open_tags */ - + /*------------------------------------------------------------------------- * Function: check_attribute_rename_tags * @@ -1499,7 +1499,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_attribute_rename_tags(hid_t fcpl, int type) { /* Variable declarations */ @@ -1547,7 +1547,7 @@ check_attribute_rename_tags(hid_t fcpl, int type) /* Create attribute */ if ( (aid = H5Acreate2(gid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR; - + /* fill out data buffer */ for(i = 0; i < DIMS; i++) for(j = 0; j < DIMS; j++) @@ -1613,11 +1613,11 @@ check_attribute_rename_tags(hid_t fcpl, int type) /* verify shared header message stored as a list */ if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; - /* - * 3 calls to verify_tag() for verifying free space: - * one freespace header tag for H5FD_MEM_DRAW manager, - * one freespace header tag for H5FD_MEM_SUPER manager - * one freespace section info tag for H5FD_MEM_SUPER manager + /* + * 3 calls to verify_tag() for verifying free space: + * one freespace header tag for H5FD_MEM_DRAW manager, + * one freespace header tag for H5FD_MEM_SUPER manager + * one freespace section info tag for H5FD_MEM_SUPER manager */ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; @@ -1664,7 +1664,7 @@ error: return 1; } /* check_attribute_rename_tags */ - + /*------------------------------------------------------------------------- * Function: check_attribute_delete_tags * @@ -1678,7 +1678,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_attribute_delete_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -1726,7 +1726,7 @@ check_attribute_delete_tags(hid_t fcpl, int type) /* Create attribute */ if ( (aid = H5Acreate2(gid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR; - + /* fill out data buffer */ for(i = 0;i < DIMS; i++) for(j = 0;j < DIMS; j++) @@ -1764,30 +1764,30 @@ check_attribute_delete_tags(hid_t fcpl, int type) /* verify object header belonging to group */ if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR; - + if ( type == TEST_SHMESG ) { /* verify shared header message master table */ if ( verify_tag(fid, H5AC_SOHM_TABLE_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; - /* - * 2 calls to verify_tag() for verifying free space: + /* + * 2 calls to verify_tag() for verifying free space: * one freespace header tag for free-space header, * one freespace header tag for free-space section info */ - if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) + if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; - if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 ) + if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; #if 0 - /* If the free space managers are persistent, the + /* If the free space managers are persistent, the * H5MF_tidy_self_referential_fsm_hack() must have been run. - * Since this function floats all self referential free space - * managers, the H5FD_MEM_SUPER FSM will not be in the metadata + * Since this function floats all self referential free space + * managers, the H5FD_MEM_SUPER FSM will not be in the metadata * cache. */ - if ( ( ! persistent_fsms ) && + if ( ( ! persistent_fsms ) && ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) ) TEST_ERROR; #endif @@ -1822,7 +1822,7 @@ error: return 1; } /* check_attribute_delete_tags */ - + /*------------------------------------------------------------------------- * Function: check_dataset_creation_tags * @@ -1836,7 +1836,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_creation_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -1874,10 +1874,10 @@ check_dataset_creation_tags(hid_t fcpl, int type) /* ============================ */ /* Create Dataset in Root Group */ /* ============================ */ - + /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -1919,7 +1919,7 @@ check_dataset_creation_tags(hid_t fcpl, int type) /* Verify dataset's tagged metadata */ if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; - + /* Verify shared object header message tags */ if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; @@ -1949,7 +1949,7 @@ error: return 1; } /* check_dataset_creation_tags */ - + /*------------------------------------------------------------------------- * Function: check_dataset_creation_earlyalloc_tags * @@ -1963,7 +1963,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -2046,7 +2046,7 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) /* Verify dataset's tagged metadata */ if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; - + /* Verify shared object header message tags */ if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; @@ -2080,7 +2080,7 @@ error: return 1; } /* check_dataset_creation_earlyalloc_tags */ - + /*------------------------------------------------------------------------- * Function: check_dataset_open_tags * @@ -2094,7 +2094,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_open_tags(void) { /* Variable Declarations */ @@ -2125,7 +2125,7 @@ check_dataset_open_tags(void) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -2155,7 +2155,7 @@ check_dataset_open_tags(void) /* ========================== */ /* Open Dataset in Root Group */ /* ========================== */ - + if (( did = H5Dopen2(fid, DATASETNAME, H5P_DEFAULT)) < 0 ) TEST_ERROR; /* =================================== */ @@ -2200,7 +2200,7 @@ error: return 1; } /* check_dataset_open_tags */ - + /*------------------------------------------------------------------------- * Function: check_dataset_write_tags * @@ -2214,7 +2214,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_write_tags(void) { /* Variable Declarations */ @@ -2250,7 +2250,7 @@ check_dataset_write_tags(void) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -2299,7 +2299,7 @@ check_dataset_write_tags(void) /* if verbose, print cache index to screen for visual verification */ if ( verbose ) dump_cache(fid); #endif /* NDEBUG */ /* end debugging functions */ - + /* Verify 10 b-tree nodes belonging to dataset */ for (i=0; i<10; i++) if ( verify_tag(fid, H5AC_BT_ID, d_tag) < 0 ) TEST_ERROR; @@ -2335,7 +2335,7 @@ error: return 1; } /* check_dataset_write_tags */ - + /*------------------------------------------------------------------------- * Function: check_attribute_write_tags * @@ -2349,7 +2349,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_attribute_write_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -2424,7 +2424,7 @@ check_attribute_write_tags(hid_t fcpl, int type) /* if verbose, print cache index to screen for visual verification */ if ( verbose ) dump_cache(fid); #endif /* NDEBUG */ /* end debugging functions */ - + /* Verify object header of group */ if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR; @@ -2483,7 +2483,7 @@ error: return 1; } /* check_attribute_write_tags */ - + /*------------------------------------------------------------------------- * Function: check_dataset_read_tags * @@ -2497,7 +2497,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_read_tags(void) { /* Variable Declarations */ @@ -2533,7 +2533,7 @@ check_dataset_read_tags(void) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -2581,7 +2581,7 @@ check_dataset_read_tags(void) /* if verbose, print cache index to screen for visual verification */ if ( verbose ) dump_cache(fid); #endif /* NDEBUG */ /* end debugging functions */ - + /* Verify 19 b-tree nodes belonging to dataset */ for (i=0; i<19; i++) if ( verify_tag(fid, H5AC_BT_ID, d_tag) < 0 ) TEST_ERROR; @@ -2614,7 +2614,7 @@ error: return 1; } /* check_dataset_read_tags */ - + /*------------------------------------------------------------------------- * Function: check_dataset_size_retrieval * @@ -2628,7 +2628,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_size_retrieval(void) { /* Variable Declarations */ @@ -2665,7 +2665,7 @@ check_dataset_size_retrieval(void) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -2746,7 +2746,7 @@ error: return 1; } /* check_dataset_size_retrieval */ - + /*------------------------------------------------------------------------- * Function: check_dataset_extend_tags * @@ -2760,7 +2760,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_dataset_extend_tags(void) { @@ -2798,7 +2798,7 @@ check_dataset_extend_tags(void) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -2879,7 +2879,7 @@ error: return 1; } /* check_dataset_extend_tags */ - + /*------------------------------------------------------------------------- * Function: check_object_info_tags * @@ -2893,7 +2893,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_object_info_tags(void) { /* Variable Declarations */ @@ -2902,7 +2902,7 @@ check_object_info_tags(void) int verbose = FALSE; /* verbose file output */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; - H5O_info_t oinfo; /* Object info struct */ + H5O_info_t oinfo; /* Object info struct */ /* Testing Macro */ TESTING("tag application during object info retrieval"); @@ -2982,7 +2982,7 @@ error: return 1; } /* check_object_info_tags */ - + /*------------------------------------------------------------------------- * Function: check_object_copy_tags * @@ -2996,7 +2996,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_object_copy_tags(void) { /* Variable Declarations */ @@ -3046,7 +3046,7 @@ check_object_copy_tags(void) if ( (gid = H5Gopen2(fid, GROUPNAMECOPY, H5P_DEFAULT)) < 0 ) TEST_ERROR; if ( get_object_header_tag(gid, ©_tag) < 0 ) TEST_ERROR; if (H5Gclose(gid) < 0) TEST_ERROR; - + /* =================================== */ /* Verification of Metadata Tag Values */ /* =================================== */ @@ -3095,7 +3095,7 @@ error: return 1; } /* check_object_copy_tags */ - + /*------------------------------------------------------------------------- * Function: check_link_removal_tags * @@ -3109,7 +3109,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_link_removal_tags(hid_t fcpl, int type) { /* Variable Declarations */ @@ -3156,7 +3156,7 @@ check_link_removal_tags(hid_t fcpl, int type) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -3219,7 +3219,7 @@ check_link_removal_tags(hid_t fcpl, int type) if ( verify_tag(fid, H5AC_SOHM_TABLE_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; } /* end if */ - + /* verify no other entries present */ if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR; @@ -3247,7 +3247,7 @@ error: return 1; } /* check_link_removal_tags */ - + /*------------------------------------------------------------------------- * Function: check_link_getname_tags * @@ -3261,7 +3261,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_link_getname_tags(void) { /* Variable Declarations */ @@ -3309,7 +3309,7 @@ check_link_getname_tags(void) /* Set up creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - + /* Enable chunking */ if ( H5Pset_chunk(dcpl, RANK, cdims) < 0 ) TEST_ERROR; @@ -3392,7 +3392,7 @@ error: return 1; } /* check_link_getname_tags */ - + /*------------------------------------------------------------------------- * Function: check_external_link_creation_tags * @@ -3406,7 +3406,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_external_link_creation_tags(void) { /* Variable Declarations */ @@ -3449,7 +3449,7 @@ check_external_link_creation_tags(void) /* ==================== */ /* Create External Link */ /* ==================== */ - + if (H5Lcreate_external(FILENAME2, GROUPNAMEPATH, fid, LINKNAME, H5P_DEFAULT, H5P_DEFAULT) < 0 ) TEST_ERROR; /* =================================== */ @@ -3460,7 +3460,7 @@ check_external_link_creation_tags(void) /* if verbose, print cache index to screen for visual verification */ if ( verbose ) dump_cache(fid); #endif /* NDEBUG */ /* end debugging functions */ - + /* Verify root group metadata */ if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR; if ( verify_tag(fid, H5AC_OHDR_CHK_ID, root_tag) < 0 ) TEST_ERROR; @@ -3490,7 +3490,7 @@ error: return 1; } /* check_external_link_creation_tags */ - + /*------------------------------------------------------------------------- * Function: check_external_link_open_tags * @@ -3504,7 +3504,7 @@ error: * *------------------------------------------------------------------------- */ -static unsigned +static unsigned check_external_link_open_tags(void) { /* Variable Declarations */ @@ -3556,11 +3556,11 @@ check_external_link_open_tags(void) /* ================== */ /* Open External Link */ /* ================== */ - + if ( (xid = H5Gopen2(fid, LINKNAME, H5P_DEFAULT)) < 0 ) TEST_ERROR; if ( (fid2 = H5Iget_file_id(xid)) < 0) TEST_ERROR; if ( get_object_header_tag(xid, &link_tag) < 0 ) TEST_ERROR; - + /* =================================== */ /* Verification of Metadata Tag Values */ /* =================================== */ @@ -3614,12 +3614,12 @@ error: return 1; } /* check_external_link_open_tags */ - + /*------------------------------------------------------------------------- * Function: check_invalid_tag_application * * Purpose: This function verifies that an error occurs if a tag - * has not been set up during a protect or set of + * has not been set up during a protect or set of * a new piece of metadata. * * Return: 0 on Success, 1 on Failure @@ -3643,7 +3643,7 @@ check_invalid_tag_application(void) /* Testing Macro */ TESTING("failure on invalid tag application"); - + #if H5C_DO_TAGGING_SANITY_CHECKS /* Create a test file */ if ( (fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR; @@ -3705,7 +3705,7 @@ error: return 1; } /* check_invalid_tag_application */ - + /*------------------------------------------------------------------------- * Function: main * @@ -3718,8 +3718,8 @@ error: * *------------------------------------------------------------------------- */ -int -main(void) +int +main(void) { /* Variable Declarations */ hid_t fcpl_default = -1; /* file creation prop list */ @@ -3727,13 +3727,13 @@ main(void) hid_t fcpl = -1; /* file creation prop list */ unsigned nerrs = 0; /* Error Encountered */ int test_type = 0; /* test type iterator */ - + /* Open the HDF5 Library */ H5open(); - - /* ========== */ + + /* ========== */ /* Test Setup */ - /* ========== */ + /* ========== */ /* Create a standard file creation property list */ fcpl_default = H5Pcreate(H5P_FILE_CREATE); @@ -3749,13 +3749,13 @@ main(void) /* ========= */ for (test_type=0; test_type<NUM_TEST_TYPES; test_type++) { - + /* Run tests on each fcpl set up above. */ if (test_type == TEST_DEFAULT) { if (!nerrs) HDprintf("Testing standard tag application cases w/ default fcpl:\n"); fcpl = fcpl_default; - + } else if (test_type == TEST_SHMESG) { if (!nerrs) HDprintf("Testing standard tag application cases w/ shared messages:\n"); @@ -3792,7 +3792,7 @@ main(void) if (!nerrs) nerrs += check_link_getname_tags(); if (!nerrs) nerrs += check_external_link_creation_tags(); if (!nerrs) nerrs += check_external_link_open_tags(); - + if (!nerrs) nerrs += check_dense_attribute_tags(); if (!nerrs) nerrs += check_link_iteration_tags(); if (!nerrs) nerrs += check_invalid_tag_application(); |