diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-05 22:26:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-05 22:26:44 (GMT) |
commit | c560e68258bef4235fac0cebfe65e8850e25b61d (patch) | |
tree | 2ea489afcde3124fcb648161b41bd4101618e9df /test | |
parent | 51875fc8881cdfa0c939fba82b7a00012a2c611e (diff) | |
download | hdf5-c560e68258bef4235fac0cebfe65e8850e25b61d.zip hdf5-c560e68258bef4235fac0cebfe65e8850e25b61d.tar.gz hdf5-c560e68258bef4235fac0cebfe65e8850e25b61d.tar.bz2 |
[svn-r13240] Description:
More cleanups on the object header message handling code, to make it
easier to work with and move forward on the creation order coding.
Various other minor cleanups & warning fixes.
Tested on:
FreeBSD/32 6.2 (duty)
Diffstat (limited to 'test')
-rw-r--r-- | test/ohdr.c | 66 |
1 files changed, 5 insertions, 61 deletions
diff --git a/test/ohdr.c b/test/ohdr.c index 67d07a6..97501ef 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -105,7 +105,7 @@ main(void) H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } - if (NULL==H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, 0, &ro, H5P_DATASET_XFER_DEFAULT)) { + if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT)) { H5_FAILED(); H5Eprint_stack(H5E_DEFAULT, stdout); goto error; @@ -123,7 +123,7 @@ main(void) */ TESTING("message modification"); time_new = 33333333; - if (H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT)<0) { + if (H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT)<0) { H5_FAILED(); H5Eprint_stack(H5E_DEFAULT, stdout); goto error; @@ -133,7 +133,7 @@ main(void) H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } - if (NULL==H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, 0, &ro, H5P_DATASET_XFER_DEFAULT)) { + if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT)) { H5_FAILED(); H5Eprint_stack(H5E_DEFAULT, stdout); goto error; @@ -148,62 +148,6 @@ main(void) /* - * Test creation of a second message of the same type. - */ - TESTING("duplicate message creation"); - time_new = 55555555; - if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE)<0) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - if (NULL==H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, 1, &ro, H5P_DATASET_XFER_DEFAULT)) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - if (ro!=time_new) { - H5_FAILED(); - HDfprintf(stdout, " got: {%ld}\n", (long)ro); - HDfprintf(stdout, " ans: {%ld}\n", (long)time_new); - goto error; - } - PASSED(); - - /* - * Test modification of the second message with a symbol table. - */ - TESTING("duplicate message modification"); - time_new = 77777777; - if (H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 1, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT)<0) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - if (H5AC_flush(f, H5P_DATASET_XFER_DEFAULT, TRUE)<0) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - if (NULL==H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, 1, &ro, H5P_DATASET_XFER_DEFAULT)) { - H5_FAILED(); - H5Eprint_stack(H5E_DEFAULT, stdout); - goto error; - } - if (ro!=time_new) { - H5_FAILED(); - HDfprintf(stdout, " got: {%ld}\n", (long)ro); - HDfprintf(stdout, " ans: {%ld}\n", (long)time_new); - goto error; - } - PASSED(); - - /* * Test creation of a bunch of messages one after another to see * what happens when the object header overflows in core. * (Use 'old' MTIME message here, because it is large enough to be @@ -261,13 +205,13 @@ main(void) H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } - if (H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, 0, &ro, H5P_DATASET_XFER_DEFAULT)) { + if(H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT)) { H5_FAILED(); puts(" H5O_msg_read() should have failed but didn't"); H5Eclear_stack(H5E_DEFAULT); goto error; } - if (H5O_msg_read(&oh_loc, H5O_MTIME_ID, 0, &ro, H5P_DATASET_XFER_DEFAULT)) { + if(H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro, H5P_DATASET_XFER_DEFAULT)) { H5_FAILED(); puts(" H5O_msg_read() should have failed but didn't"); H5Eclear_stack(H5E_DEFAULT); |