summaryrefslogtreecommitdiffstats
path: root/test/ohdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-08-24 19:09:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-08-24 19:09:36 (GMT)
commitb6494f0fc9159fae1418e033126826cf61a3ff21 (patch)
treed69e857ee6484f6e716400d92f2b8dae61b0e627 /test/ohdr.c
parent81e3eef99a7c0363d10c4d8972163da25a0da662 (diff)
downloadhdf5-b6494f0fc9159fae1418e033126826cf61a3ff21.zip
hdf5-b6494f0fc9159fae1418e033126826cf61a3ff21.tar.gz
hdf5-b6494f0fc9159fae1418e033126826cf61a3ff21.tar.bz2
[svn-r17415] Description:
Bring r17408, 17411, 17412, 17413 & 17414 from trunk back to 1.8 branch: r17408: Move flush operation on mounted file hierarchy into H5Fmount module. r17411: Make H5AC_flush just flush the cache and make H5AC_dest perform the proper parallel synchronization before destroying the cache. Also, further discriminate between 'closing' and 'non-closing' actions in H5F_flush. r17412: Seperate 'flush' functionality from 'destroy' functionality at the H5F level also. r17413: Remove vestigial intermediate routine for flushing file and move it into API routine. Also, remove private, unused (now) 'H5F_FLUSH_DOWN' symbol from public header file. r17414: Flush the core VFD's buffer before closing the file, also flush the metadata accumulator before reseting it. Write the driver info message out in the superblock flush routine more directly, instead of using wrapper routine, since the wrapper routine won't work when the superblock is being shutdown. Tested on: FreeBSD/32 6.3 (duty) in debug mode (h5committest performed on trunk)
Diffstat (limited to 'test/ohdr.c')
-rw-r--r--test/ohdr.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index 905551d..df5f63b 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -60,8 +60,8 @@ test_cont(char *filename, hid_t fapl)
H5O_info_t oinfo;
H5O_loc_t oh_locA, oh_locB;
time_t time_new;
- char *short_name = "T";
- char *long_name = "This is the message";
+ const char *short_name = "T";
+ const char *long_name = "This is the message";
size_t nchunks;
TESTING("object header continuation block");
@@ -100,7 +100,9 @@ test_cont(char *filename, hid_t fapl)
if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
+ if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_locA.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
if(H5O_get_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, FALSE, &oinfo) < 0)
@@ -210,7 +212,9 @@ main(void)
time_new = 11111111;
if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
+ if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
@@ -226,7 +230,9 @@ main(void)
time_new = 33333333;
if(H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
+ if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR
@@ -255,7 +261,9 @@ main(void)
if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
} /* end for */
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
+ if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
/* Make certain that chunk #0 in the object header will be encoded with a 2-byte size */
@@ -294,7 +302,9 @@ main(void)
time_new = (i + 1) * 1000 + 10;
if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
+ if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
} /* end for */
PASSED();
@@ -322,7 +332,9 @@ main(void)
time_new = 22222222;
if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE) < 0)
+ if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
FAIL_STACK_ERROR