summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-11-12 09:05:47 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-11-12 09:05:47 (GMT)
commit1c6924f18bd8fdad63c4f191c00605092c17fa6e (patch)
treecfa3351ffe9a04b46e2ed226da6a5c00a80b4caa /test
parent70938cbf28ca91a17d8d975d5b5ebcd44648e1c9 (diff)
downloadhdf5-1c6924f18bd8fdad63c4f191c00605092c17fa6e.zip
hdf5-1c6924f18bd8fdad63c4f191c00605092c17fa6e.tar.gz
hdf5-1c6924f18bd8fdad63c4f191c00605092c17fa6e.tar.bz2
Refactor H5O code to clean up message allocation, align cache deserialize code
with revise_chunks changes, and remove unused "message locking" code.
Diffstat (limited to 'test')
-rw-r--r--test/ohdr.c142
1 files changed, 0 insertions, 142 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index 5642c41..e613a98 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -811,148 +811,6 @@ main(void)
FAIL_STACK_ERROR
PASSED();
- /*
- * Test moving message to first chunk
- */
- TESTING("locking messages");
- HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
- FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5AC_ind_read_dxpl_id))
- FAIL_STACK_ERROR
-
- /* Create second object header, to guarantee that first object header uses multiple chunks */
- HDmemset(&oh_loc2, 0, sizeof(oh_loc2));
- if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
- FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc2, 1, H5AC_ind_read_dxpl_id))
- FAIL_STACK_ERROR
-
- /* Fill object header with messages, creating multiple chunks */
- for(i = 0; i < 10; i++) {
- time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
- } /* end for */
-
- /* Get # of object header chunks */
- if(H5O_get_hdr_info(&oh_loc, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
- FAIL_STACK_ERROR
- if(hdr_info.nchunks != 2)
- TEST_ERROR
-
- /* Add message to lock to object header */
- time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
- FAIL_STACK_ERROR
- if(chunkno != 1)
- TEST_ERROR
-
- /* Lock the message into the chunk */
- if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Attempt to lock the message twice */
- H5E_BEGIN_TRY {
- ret = H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id);
- } H5E_END_TRY;
- if(ret >= 0)
- TEST_ERROR
-
- /* Delete all the other messages, which would move the message into
- * chunk #0, if it wasn't locked
- */
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
- FAIL_STACK_ERROR
- if(chunkno != 1)
- TEST_ERROR
-
- /* Unlock the message */
- if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Attempt to unlock the message twice */
- H5E_BEGIN_TRY {
- ret = H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id);
- } H5E_END_TRY;
- if(ret >= 0)
- TEST_ERROR
-
- /* Close object headers */
- if(H5O_close(&oh_loc2) < 0)
- FAIL_STACK_ERROR
- if(H5O_close(&oh_loc) < 0)
- FAIL_STACK_ERROR
-
- /* Open first object header */
- HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
- FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5AC_ind_read_dxpl_id))
- FAIL_STACK_ERROR
-
- /* Create second object header, to guarantee that first object header uses multiple chunks */
- HDmemset(&oh_loc2, 0, sizeof(oh_loc2));
- if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
- FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc2, 1, H5AC_ind_read_dxpl_id))
- FAIL_STACK_ERROR
-
- /* Add message to move to object header */
- time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
- FAIL_STACK_ERROR
- if(chunkno != 0)
- TEST_ERROR
-
- /* Lock the message into the chunk */
- if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Fill object header with messages, creating multiple chunks */
- /* (would normally move locked message to new chunk) */
- for(i = 0; i < 10; i++) {
- time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
- } /* end for */
-
- /* Get # of object header chunks */
- if(H5O_get_hdr_info(&oh_loc, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
- FAIL_STACK_ERROR
- if(hdr_info.nchunks != 2)
- TEST_ERROR
-
- /* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
- FAIL_STACK_ERROR
- if(chunkno != 0)
- TEST_ERROR
-
- /* Unlock the message */
- if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
- FAIL_STACK_ERROR
-
- /* Close object headers */
- if(H5O_close(&oh_loc2) < 0)
- FAIL_STACK_ERROR
- if(H5O_close(&oh_loc) < 0)
- FAIL_STACK_ERROR
-
- PASSED();
-
/* Close the file we created */
if(H5Fclose(file) < 0)
TEST_ERROR