diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-12-23 03:28:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-12-23 03:28:37 (GMT) |
commit | 02a90afcdcd9b6a41455a198799bc8033bf56485 (patch) | |
tree | 6161562ad0783e66a7df383be002cb90de2eedb2 /test/tsohm.c | |
parent | a0e70a08ba5a886bebca4ec305192693ec2f5a1d (diff) | |
download | hdf5-02a90afcdcd9b6a41455a198799bc8033bf56485.zip hdf5-02a90afcdcd9b6a41455a198799bc8033bf56485.tar.gz hdf5-02a90afcdcd9b6a41455a198799bc8033bf56485.tar.bz2 |
[svn-r14358] Description:
Tweak the constants for the shared message flags to be equal to the
other flags useds for the underlying messages.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test/tsohm.c')
-rw-r--r-- | test/tsohm.c | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/test/tsohm.c b/test/tsohm.c index c985493..abdbe77 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -33,10 +33,10 @@ const unsigned def_minsizes[H5O_SHMESG_MAX_NINDEXES] = {250,250,250,250,250,250} /* Non-default SOHM values for testing */ #define TEST_NUM_INDEXES 4 const unsigned test_type_flags[H5O_SHMESG_MAX_NINDEXES] = - {H5O_MESG_FILL_FLAG, - H5O_MESG_DTYPE_FLAG | H5O_MESG_ATTR_FLAG, - H5O_MESG_SDSPACE_FLAG, - H5O_MESG_PLINE_FLAG, + {H5O_SHMESG_FILL_FLAG, + H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_ATTR_FLAG, + H5O_SHMESG_SDSPACE_FLAG, + H5O_SHMESG_PLINE_FLAG, 0, 0}; const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000}; #define TEST_L2B 65 @@ -326,20 +326,20 @@ static void test_sohm_fcpl(void) VERIFY(ret, -1, "H5Pset_shared_mesg_index"); /* Setting an unknown flag (all flags + 1) should fail */ - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ALL_FLAG + 1, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_ALL_FLAG + 1, 15); VERIFY(ret, -1, "H5Pset_shared_mesg_index"); /* Try setting two different indexes to hold fill messages. They * should hold even very small messages for testing, even though we * wouldn't really want to share such tiny messages in the real world. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_FILL_FLAG, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_FILL_FLAG, 15); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_FILL_FLAG, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_FILL_FLAG, 15); CHECK_I(ret, "H5Pset_shared_mesg_index"); fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT); VERIFY(fid, -1, "H5Fcreate"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG, 15); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG, 15); CHECK_I(ret, "H5Pset_shared_mesg_index"); fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT); VERIFY(fid, -1, "H5Fcreate"); @@ -733,7 +733,7 @@ static void test_sohm_size1(void) h5_stat_size_t sohm_btree_final_filesize2; H5O_info_t oinfo; unsigned num_indexes = 1; - unsigned index_flags = H5O_MESG_DTYPE_FLAG; + unsigned index_flags = H5O_SHMESG_DTYPE_FLAG; unsigned min_mesg_size = 50; unsigned list_max = 11; unsigned btree_min = 10; @@ -1097,42 +1097,42 @@ static void test_sohm_attrs(void) /* Run tests with only one kind of message to be shared */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); /* Verify */ sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); /* Run with any two types shared */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ATTR_FLAG | H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ATTR_FLAG | H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); /* Run test with all three kinds of message shared */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG | H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); @@ -1141,19 +1141,19 @@ static void test_sohm_attrs(void) /* Try using two indexes */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ATTR_FLAG | H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ATTR_FLAG | H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_SDSPACE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_SDSPACE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ATTR_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_ATTR_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); @@ -1162,7 +1162,7 @@ static void test_sohm_attrs(void) /* One index for each kind of message */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 3); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_SDSPACE_FLAG, 2); + ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_SHMESG_SDSPACE_FLAG, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); sohm_attr_helper(fcpl_id); @@ -1980,7 +1980,7 @@ static void test_sohm_size2(int close_reopen) ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Set the indexes to use a medium-sized list */ @@ -2028,11 +2028,11 @@ static void test_sohm_size2(int close_reopen) ret = H5Pset_shared_mesg_nindexes(fcpl_id, 3); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_DTYPE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_FILL_FLAG | H5O_MESG_PLINE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_ATTR_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_SHMESG_ATTR_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Use lists that are the same size as the "medium" list on the previous @@ -2057,11 +2057,11 @@ static void test_sohm_size2(int close_reopen) /* Edit the same property list (this should work) and don't share all messages. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_PLINE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_PLINE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG, 100000); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG, 100000); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_ATTR_FLAG | H5O_MESG_SDSPACE_FLAG, 20); + ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_SHMESG_ATTR_FLAG | H5O_SHMESG_SDSPACE_FLAG, 20); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Use "normal-sized" lists. */ @@ -2084,7 +2084,7 @@ static void test_sohm_size2(int close_reopen) /* Change the second index to hold only gigantic messages. Result should * be the same as the previous file. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_FILL_FLAG, 100000); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG, 100000); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Get the file size & verify its contents */ @@ -2099,7 +2099,7 @@ static void test_sohm_size2(int close_reopen) * as one gains from sharing them. */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG | H5O_MESG_SDSPACE_FLAG, 1); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_SDSPACE_FLAG, 1); ret = H5Pset_shared_mesg_phase_change(fcpl_id, 1000, 900); /* Get the file size & verify its contents */ @@ -2107,7 +2107,7 @@ static void test_sohm_size2(int close_reopen) size2_verify(); /* Create the same file but don't share the really tiny messages */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG | H5O_MESG_SDSPACE_FLAG, 100); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_SDSPACE_FLAG, 100); ret = H5Pset_shared_mesg_phase_change(fcpl_id, 1000, 900); /* Get the file size & verify its contents */ @@ -2786,7 +2786,7 @@ test_sohm_delete(void) CHECK_I(fcpl_id, "H5Pcreate"); ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); @@ -2814,9 +2814,9 @@ test_sohm_delete(void) /* Use two indexes */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_ATTR_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_ATTR_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_DTYPE_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Use big list indexes */ @@ -2844,7 +2844,7 @@ test_sohm_delete(void) ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); for(x=DELETE_MIN_MESG_SIZE; x<=DELETE_MAX_MESG_SIZE; x += 10) { - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, (size_t) x); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, (size_t) x); CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); delete_helper(fcpl_id, dspace_id, dcpl_id); } @@ -2992,9 +2992,9 @@ test_sohm_delete_revert(void) CHECK_I(fcpl_id, "H5Pcreate"); ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG, 10); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_DTYPE_FLAG, 10); CHECK_I(ret, "H5Pset_shared_mesg_index"); - ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_SDSPACE_FLAG, 10); + ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_SHMESG_SDSPACE_FLAG, 10); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Call the helper function to test this FCPL. */ @@ -3011,7 +3011,7 @@ test_sohm_delete_revert(void) /* Try sharing all messages */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 10); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 10); CHECK_I(ret, "H5Pset_shared_mesg_index"); ret = H5Pset_shared_mesg_phase_change(fcpl_id, 10, 5); CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); @@ -3038,7 +3038,7 @@ test_sohm_delete_revert(void) /* Try with shared messages enabled, but when messages are too big * to be shared. */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 35); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 35); CHECK_I(ret, "H5Pset_shared_mesg_phase_change"); ret = test_sohm_delete_revert_helper(fcpl_id); CHECK_I(ret, "test_sohm_delete_revert_helper"); @@ -3138,7 +3138,7 @@ test_sohm_extlink(void) CHECK_I(fcpl_id, "H5Pcreate"); ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); /* Test using external links when the source or destination file uses @@ -3686,7 +3686,7 @@ test_sohm_extend_dset(void) /* Only dataspaces */ - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_SDSPACE_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); ret = test_sohm_extend_dset_helper(fcpl_id, FALSE); @@ -3697,7 +3697,7 @@ test_sohm_extend_dset(void) /* All messages */ ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1); CHECK_I(ret, "H5Pset_shared_mesg_nindexes"); - ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 16); + ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_SHMESG_ALL_FLAG, 16); CHECK_I(ret, "H5Pset_shared_mesg_index"); ret = test_sohm_extend_dset_helper(fcpl_id, FALSE); |