diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-16 15:52:51 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-16 15:52:51 (GMT) |
commit | bdd7d59902483885dd8b883f3b2393e77383e5e8 (patch) | |
tree | aaf20ab132d057b95b3c016d50fc22b77719084b /test | |
parent | 8bc0d5ed9019a681e1ea20c24264415d01c1cf2a (diff) | |
download | hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.zip hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.gz hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.bz2 |
[svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following
script:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Tested on:
Mac OS X/32 10.5.5 (amazon)
No need for h5committest, just whitespace changes...
Diffstat (limited to 'test')
-rw-r--r-- | test/big.c | 2 | ||||
-rw-r--r-- | test/btree2.c | 4 | ||||
-rw-r--r-- | test/cache.c | 934 | ||||
-rw-r--r-- | test/cache_api.c | 8 | ||||
-rw-r--r-- | test/cache_common.c | 162 | ||||
-rw-r--r-- | test/cache_common.h | 38 | ||||
-rw-r--r-- | test/chunk_info.c | 36 | ||||
-rw-r--r-- | test/cmpd_dset.c | 46 | ||||
-rw-r--r-- | test/dsets.c | 6 | ||||
-rw-r--r-- | test/dtransform.c | 4 | ||||
-rw-r--r-- | test/dtypes.c | 6 | ||||
-rw-r--r-- | test/earray.c | 6 | ||||
-rw-r--r-- | test/enum.c | 4 | ||||
-rw-r--r-- | test/extend.c | 2 | ||||
-rw-r--r-- | test/external.c | 4 | ||||
-rw-r--r-- | test/fheap.c | 10 | ||||
-rw-r--r-- | test/fillval.c | 6 | ||||
-rw-r--r-- | test/flush1.c | 10 | ||||
-rw-r--r-- | test/flush2.c | 10 | ||||
-rw-r--r-- | test/gen_udlinks.c | 4 | ||||
-rw-r--r-- | test/getname.c | 60 | ||||
-rw-r--r-- | test/h5test.h | 4 | ||||
-rw-r--r-- | test/hyperslab.c | 2 | ||||
-rw-r--r-- | test/links.c | 122 | ||||
-rw-r--r-- | test/mount.c | 2 | ||||
-rw-r--r-- | test/mtime.c | 2 | ||||
-rw-r--r-- | test/ntypes.c | 4 | ||||
-rwxr-xr-x | test/objcopy.c | 48 | ||||
-rw-r--r-- | test/ohdr.c | 6 | ||||
-rwxr-xr-x | test/reserved.c | 2 | ||||
-rw-r--r-- | test/tattr.c | 64 | ||||
-rw-r--r-- | test/tcoords.c | 20 | ||||
-rw-r--r-- | test/th5o.c | 6 | ||||
-rw-r--r-- | test/tmisc.c | 2 | ||||
-rw-r--r-- | test/tsohm.c | 16 | ||||
-rw-r--r-- | test/ttsafe_error.c | 6 | ||||
-rw-r--r-- | test/tvltypes.c | 10 | ||||
-rw-r--r-- | test/vfd.c | 12 |
38 files changed, 845 insertions, 845 deletions
@@ -600,7 +600,7 @@ main (int ac, char **av) puts("Test passed with the Family Driver."); /* - * We shouldn't run this test if the file system doesn't support big files + * We shouldn't run this test if the file system doesn't support big files * because we would generate multi-gigabyte files. */ puts("\nChecking if file system supports big files..."); diff --git a/test/btree2.c b/test/btree2.c index e01de65..d4347d4 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -7450,9 +7450,9 @@ main(void) unsigned nerrors = 0; /* Cumulative error count */ int ExpressMode; const char *envval = NULL; - + envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { /* Reset library */ diff --git a/test/cache.c b/test/cache.c index 6ea92ef..7de613e 100644 --- a/test/cache.c +++ b/test/cache.c @@ -965,7 +965,7 @@ smoke_check_5(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -1205,7 +1205,7 @@ smoke_check_6(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -1445,7 +1445,7 @@ smoke_check_7(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (8 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -1686,7 +1686,7 @@ smoke_check_8(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -1871,9 +1871,9 @@ smoke_check_8(void) * Purpose: A repeat of smoke check 1, only with the cache corked * part of the time. * - * Recall that smoke check 1 is a basic functional test, - * with inserts, destroys, and renames in the mix, along - * with repeated protects and unprotects. All entries are + * Recall that smoke check 1 is a basic functional test, + * with inserts, destroys, and renames in the mix, along + * with repeated protects and unprotects. All entries are * marked as clean. * * Return: void @@ -2178,9 +2178,9 @@ smoke_check_9(void) * Purpose: A repeat of smoke check 2, only with the cache corked * part of the time. * - * Recall that smoke check 2 is a basic functional test, - * with inserts, destroys, and renames in the mix, along - * with some repeated protects and unprotects. About half + * Recall that smoke check 2 is a basic functional test, + * with inserts, destroys, and renames in the mix, along + * with some repeated protects and unprotects. About half * the entries are marked as dirty. * * Return: void @@ -2708,12 +2708,12 @@ check_insert_entry(void) pass = TRUE; - /* Allocate a cache, and insert entries into it using all + /* Allocate a cache, and insert entries into it using all * combinations of flags. Verify that the entries are inserted, * and that the flags have the desired effects. * * Note that the dirty parameter in insert_entry is no longer - * used, as we have decided that all inserted entries are + * used, as we have decided that all inserted entries are * dirty by definition. (Which sounds very reasonable, but didn't * used to be the case.) */ @@ -2729,10 +2729,10 @@ check_insert_entry(void) if ( pass ) { insert_entry(cache_ptr, entry_type, 0, TRUE, H5C__NO_FLAGS_SET); - insert_entry(cache_ptr, entry_type, 1, TRUE, + insert_entry(cache_ptr, entry_type, 1, TRUE, H5C__SET_FLUSH_MARKER_FLAG); insert_entry(cache_ptr, entry_type, 2, TRUE, H5C__PIN_ENTRY_FLAG); - insert_entry(cache_ptr, entry_type, 3, TRUE, + insert_entry(cache_ptr, entry_type, 3, TRUE, (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG)); } @@ -2748,7 +2748,7 @@ check_insert_entry(void) /* Start by checking everything we can via H5C_get_entry_status() */ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -2757,10 +2757,10 @@ check_insert_entry(void) failure_mssg = "H5AC_get_entry_status() reports failure."; } - if ( pass ) { + if ( pass ) { /* check the universals */ - if ( ( ! in_cache ) || ( ! is_dirty ) || ( is_protected ) || + if ( ( ! in_cache ) || ( ! is_dirty ) || ( is_protected ) || ( entry_size != entry_sizes[entry_type] ) ) { pass = FALSE; @@ -2819,7 +2819,7 @@ check_insert_entry(void) search_ptr = cache_ptr->pel_head_ptr; while ( ( search_ptr != NULL ) && - ( search_ptr != + ( search_ptr != (struct H5C_cache_entry_t *)entry_ptr ) ) { search_ptr = search_ptr->next; @@ -2841,7 +2841,7 @@ check_insert_entry(void) search_ptr = cache_ptr->LRU_head_ptr; while ( ( search_ptr != NULL ) && - ( search_ptr != + ( search_ptr != (struct H5C_cache_entry_t *)entry_ptr ) ) { search_ptr = search_ptr->next; @@ -2864,7 +2864,7 @@ check_insert_entry(void) search_ptr = cache_ptr->dLRU_head_ptr; while ( ( search_ptr != NULL ) && - ( search_ptr != + ( search_ptr != (struct H5C_cache_entry_t *)entry_ptr ) ) { search_ptr = search_ptr->aux_next; @@ -2884,8 +2884,8 @@ check_insert_entry(void) } /* while */ - /* So much for looking at the individual entries. Now verify - * that the various counts and sized in the cache header are + /* So much for looking at the individual entries. Now verify + * that the various counts and sized in the cache header are * as expected. */ @@ -5383,9 +5383,9 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr, /*------------------------------------------------------------------------- * Function: check_flush_cache__flush_ops() * - * Purpose: Run the flush ops cache tests. + * Purpose: Run the flush ops cache tests. * - * These are tests that test the cache's ability to handle + * These are tests that test the cache's ability to handle * the case in which the flush callback dirties, resizes, * and/or renames entries. * @@ -5421,7 +5421,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #1 */ { /* start with a very simple test, in which there are two entries - * resident in cache, and the second entry dirties the first in + * resident in cache, and the second entry dirties the first in * the flush callback. No size changes, and no flush flags. */ int test_num = 1; @@ -5431,9 +5431,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE; int expected_index_len = 2; size_t expected_index_size = 2 * PICO_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[2] = + struct fo_flush_cache_test_spec spec[2] = { - { + { /* entry_num = */ 0, /* entry_type = */ 0, /* entry_index = */ 0, @@ -5461,7 +5461,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 1, /* entry_type = */ 0, /* entry_index = */ 1, @@ -5529,8 +5529,8 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) * Note that we must repeat all tests with the flush invalidate flag * as this triggers a different set of code to execute the flush. * - * Create two entries resident in cache, and have the second entry - * dirty the first in the flush callback. + * Create two entries resident in cache, and have the second entry + * dirty the first in the flush callback. */ int test_num = 2; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG; @@ -5539,9 +5539,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE; int expected_index_len = 0; size_t expected_index_size = 0; - struct fo_flush_cache_test_spec spec[2] = + struct fo_flush_cache_test_spec spec[2] = { - { + { /* entry_num = */ 0, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -5569,7 +5569,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 1, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -5644,9 +5644,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4; int expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, @@ -5723,9 +5723,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4; int expected_index_len = 0; size_t expected_index_size = 0; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, @@ -5793,8 +5793,8 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) * which the call back function renames the entry for which it has * been called. * - * Run this entry twice, as the first run moves the entry to its - * alternate address, and the second moves it back. + * Run this entry twice, as the first run moves the entry to its + * alternate address, and the second moves it back. */ int test_num = 5; /* and 6 */ unsigned int flush_flags = H5C__NO_FLAGS_SET; @@ -5803,9 +5803,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE; int expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, @@ -5866,15 +5866,15 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) check_size, checks); - /* this change forces the rename to move the target entry back to its + /* this change forces the rename to move the target entry back to its * main address. The first test moved it to its alternate address. * * Note that these two tests are not the same, as in the first test, - * the renamed entry is moved forward in the slist. In the second + * the renamed entry is moved forward in the slist. In the second * it is moved backwards. * * Since there is only one entry in the cache, this doesn't really - * matter in this case. But we will do similar tests later with + * matter in this case. But we will do similar tests later with * other entries in the cache. */ if ( pass ) { @@ -5898,15 +5898,15 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #7 & #8 */ { - /* Run tests 5 & 6 again, using the flush invalidate flag on the + /* Run tests 5 & 6 again, using the flush invalidate flag on the * second test. * * Single entry test verifying that the cache can handle the case in * which the call back function renames the entry for which it has * been called. * - * Run this entry twice, as the first run moves the entry to its - * alternate address, and the second moves it back. + * Run this entry twice, as the first run moves the entry to its + * alternate address, and the second moves it back. */ int test_num = 7; /* and 8 */ unsigned int flush_flags = H5C__NO_FLAGS_SET; @@ -5915,9 +5915,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE; int expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, @@ -5978,15 +5978,15 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) check_size, checks); - /* this change forces the rename to move the target entry back to its + /* this change forces the rename to move the target entry back to its * main address. The first test moved it to its alternate address. * * Note that these two tests are not the same, as in the first test, - * the renamed entry is moved forward in the slist. In the second + * the renamed entry is moved forward in the slist. In the second * it is moved backwards. * * Since there is only one entry in the cache, this doesn't really - * matter in this case. But we will do similar tests later with + * matter in this case. But we will do similar tests later with * other entries in the cache. */ @@ -6016,11 +6016,11 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #9 & #10 */ { /* Single entry test verifying that the cache can handle the case in - * which the call back function both resizes and renames the entry + * which the call back function both resizes and renames the entry * for which it has been called. * - * Again, we run this entry twice, as the first run moves the entry to its - * alternate address, and the second moves it back. + * Again, we run this entry twice, as the first run moves the entry to its + * alternate address, and the second moves it back. */ int test_num = 9; /* and 10 */ unsigned int flush_flags = H5C__NO_FLAGS_SET; @@ -6029,9 +6029,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2; int expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, @@ -6092,15 +6092,15 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) check_size, checks); - /* this change forces the rename to move the target entry back to its + /* this change forces the rename to move the target entry back to its * main address. The first test moved it to its alternate address. * * Note that these two tests are not the same, as in the first test, - * the renamed entry is moved forward in the slist. In the second + * the renamed entry is moved forward in the slist. In the second * it is moved backwards. * * Since there is only one entry in the cache, this doesn't really - * matter in this case. But we will do similar tests later with + * matter in this case. But we will do similar tests later with * other entries in the cache. */ if ( pass ) { @@ -6128,11 +6128,11 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) * second test. * * Single entry test verifying that the cache can handle the case in - * which the call back function both resizes and renames the entry + * which the call back function both resizes and renames the entry * for which it has been called. * - * Again, we run this entry twice, as the first run moves the entry to its - * alternate address, and the second moves it back. + * Again, we run this entry twice, as the first run moves the entry to its + * alternate address, and the second moves it back. */ int test_num = 11; /* and 12 */ unsigned int flush_flags = H5C__NO_FLAGS_SET; @@ -6141,9 +6141,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2; int expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 0, @@ -6204,15 +6204,15 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) check_size, checks); - /* this change forces the rename to move the target entry back to its + /* this change forces the rename to move the target entry back to its * main address. The first test moved it to its alternate address. * * Note that these two tests are not the same, as in the first test, - * the renamed entry is moved forward in the slist. In the second + * the renamed entry is moved forward in the slist. In the second * it is moved backwards. * * Since there is only one entry in the cache, this doesn't really - * matter in this case. But we will do similar tests later with + * matter in this case. But we will do similar tests later with * other entries in the cache. */ if ( pass ) { @@ -6241,9 +6241,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #13 */ { - /* Test the ability of the cache to handle the case in which - * the flush function of an entry that is resident in cache - * dirties two entries that are not in cache. No size + /* Test the ability of the cache to handle the case in which + * the flush function of an entry that is resident in cache + * dirties two entries that are not in cache. No size * changes. * * At present, I am assured that this case will never occur, but @@ -6256,9 +6256,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE; int expected_index_len = 3; size_t expected_index_size = 3 * PICO_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ 0, /* entry_index = */ 1, @@ -6339,9 +6339,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) { /* Repeat previous test with the flush invalidate flag. * - * Test the ability of the cache to handle the case in which - * the flush function of an entry that is resident in cache - * dirties two entries that are not in cache. No size + * Test the ability of the cache to handle the case in which + * the flush function of an entry that is resident in cache + * dirties two entries that are not in cache. No size * changes. * * At present, I am assured that this case will never occur, but @@ -6354,9 +6354,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE; int expected_index_len = 0; size_t expected_index_size = (size_t)0; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ 0, /* entry_index = */ 1, @@ -6435,8 +6435,8 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #15 */ { - /* Test the ability of the cache to handle the case in which - * the flush function of an entry that is resident in cache + /* Test the ability of the cache to handle the case in which + * the flush function of an entry that is resident in cache * resizes and dirties two entries that are not in cache. * * At present, I am assured that this case will never occur, but @@ -6451,9 +6451,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t expected_index_size = VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2); - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -6534,8 +6534,8 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) { /* Repeat previous test with the flush invalidate flag. * - * Test the ability of the cache to handle the case in which - * the flush function of an entry that is resident in cache + * Test the ability of the cache to handle the case in which + * the flush function of an entry that is resident in cache * resizes and dirties two entries that are not in cache. * * At present, I am assured that this case will never occur, but @@ -6548,9 +6548,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE; int expected_index_len = 0; size_t expected_index_size = (size_t)0; - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -6629,8 +6629,8 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #17 & #18 */ { - /* Test the ability of the cache to handle the case in which - * the flush function of an entry that is resident in cache + /* Test the ability of the cache to handle the case in which + * the flush function of an entry that is resident in cache * resizes, dirties, and renames two entries that are not in cache. * * At present, I am assured that this case will never occur, but @@ -6645,9 +6645,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t expected_index_size = VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2); - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -6710,7 +6710,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_destroyed = */ FALSE } }; - + check_flush_cache__flush_op_test(cache_ptr, test_num, flush_flags, @@ -6723,12 +6723,12 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) check_size, checks); - /* this change forces the renames to move the target entries back to - * their main address. The first test moved them to their alternate + /* this change forces the renames to move the target entries back to + * their main address. The first test moved them to their alternate * address. * * Note that these two tests are not the same, as in the first test, - * the renamed entries are moved forward in the slist. In the second + * the renamed entries are moved forward in the slist. In the second * they are moved backwards. */ if ( pass ) { @@ -6758,8 +6758,8 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* Repeat the above test with the flush invalidate flag on the * second test. * - * Test the ability of the cache to handle the case in which - * the flush function of an entry that is resident in cache + * Test the ability of the cache to handle the case in which + * the flush function of an entry that is resident in cache * resizes, dirties, and renames two entries that are not in cache. * * At present, I am assured that this case will never occur, but @@ -6774,9 +6774,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t expected_index_size = VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2); - struct fo_flush_cache_test_spec spec[1] = + struct fo_flush_cache_test_spec spec[1] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -6852,12 +6852,12 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) check_size, checks); - /* this change forces the renames to move the target entries back to - * their main address. The first test moved them to their alternate + /* this change forces the renames to move the target entries back to + * their main address. The first test moved them to their alternate * address. * * Note that these two tests are not the same, as in the first test, - * the renamed entries are moved forward in the slist. In the second + * the renamed entries are moved forward in the slist. In the second * they are moved backwards. */ if ( pass ) { @@ -6894,14 +6894,14 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) { /* Now mix things up a bit. * - * Load several entries, two of which have flush functions that - * resize, dirty, and rename two entries that are not in the - * cache. Mark only one of these entries, and then flush the + * Load several entries, two of which have flush functions that + * resize, dirty, and rename two entries that are not in the + * cache. Mark only one of these entries, and then flush the * cache with the flush marked entries flag. * - * This is the only test in which we test the + * This is the only test in which we test the * H5C__FLUSH_MARKED_ENTRIES_FLAG. The hope is that since - * we test the two features extensively by themselves, so + * we test the two features extensively by themselves, so * it should be sufficient to verify that they play together * as expected. */ @@ -6915,9 +6915,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2) + (2 * PICO_ENTRY_SIZE); - struct fo_flush_cache_test_spec spec[4] = + struct fo_flush_cache_test_spec spec[4] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -6945,7 +6945,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 1, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 11, @@ -6973,7 +6973,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ FALSE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -7001,7 +7001,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -7113,9 +7113,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) { /* Mix things up some more. * - * Load lots of entries, some of which have flush functions that - * resize, dirty, and rename two entries that are not in the - * cache. + * Load lots of entries, some of which have flush functions that + * resize, dirty, and rename two entries that are not in the + * cache. * * Also load entries that have flush ops on entries that are in * cache. @@ -7130,9 +7130,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) (2 * (VARIABLE_ENTRY_SIZE / 4)) + (2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * PICO_ENTRY_SIZE); - struct fo_flush_cache_test_spec spec[6] = + struct fo_flush_cache_test_spec spec[6] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -7160,7 +7160,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 1, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 11, @@ -7188,7 +7188,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -7216,7 +7216,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -7244,7 +7244,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ FALSE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 4, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 10, @@ -7272,7 +7272,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 5, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 20, @@ -7386,9 +7386,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) * * Mix things up some more. * - * Load lots of entries, some of which have flush functions that - * resize, dirty, and rename two entries that are not in the - * cache. + * Load lots of entries, some of which have flush functions that + * resize, dirty, and rename two entries that are not in the + * cache. * * Also load entries that have flush ops on entries that are in * cache. @@ -7400,9 +7400,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (4 * PICO_ENTRY_SIZE); int expected_index_len = 0; size_t expected_index_size = 0; - struct fo_flush_cache_test_spec spec[6] = + struct fo_flush_cache_test_spec spec[6] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 1, @@ -7430,7 +7430,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 1, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 11, @@ -7458,7 +7458,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -7486,7 +7486,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -7514,7 +7514,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 4, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 10, @@ -7542,7 +7542,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 5, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 20, @@ -7666,9 +7666,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE; int expected_index_len = 3; size_t expected_index_size = 3 * PICO_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[3] = + struct fo_flush_cache_test_spec spec[3] = { - { + { /* entry_num = */ 0, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 100, @@ -7800,9 +7800,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE; int expected_index_len = 0; size_t expected_index_size = (size_t)0; - struct fo_flush_cache_test_spec spec[3] = + struct fo_flush_cache_test_spec spec[3] = { - { + { /* entry_num = */ 0, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 100, @@ -7922,22 +7922,22 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #26 */ { - /* This one is complex. + /* This one is complex. * - * In the following overvies table, VET stands for + * In the following overvies table, VET stands for * VARIABLE_ENTRY_TYPE. * * In trying to follow what happens when we flush the * set of entries constructed below, recall that each - * flush operation is executed the first time the + * flush operation is executed the first time the * entry is flushed, and then not executed again. - * This may be a weakness in the tests, but that + * This may be a weakness in the tests, but that * is the way it is for now. * - * After thinking about it for a while, I'm not sure that - * the interaction between pins and flush operations needs - * all that much testing, as the two are essentially - * orthoginal. Thus this is a bit of a smoke check to + * After thinking about it for a while, I'm not sure that + * the interaction between pins and flush operations needs + * all that much testing, as the two are essentially + * orthoginal. Thus this is a bit of a smoke check to * verify that we get the expected results. * * (VET, 100) initially not resident in cache @@ -8004,9 +8004,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE; int expected_index_len = 13; size_t expected_index_size = 9 * VARIABLE_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[10] = + struct fo_flush_cache_test_spec spec[10] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 200, @@ -8357,24 +8357,24 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) { /* Repeat test #26 with the flush invalidate flag. * - * In the following overview table, VET stands for + * In the following overview table, VET stands for * VARIABLE_ENTRY_TYPE. * * In trying to follow what happens when we flush the * set of entries constructed below, recall that each - * flush operation is executed the first time the + * flush operation is executed the first time the * entry is flushed, and then not executed again. - * This may be a weakness in the tests, but that + * This may be a weakness in the tests, but that * is the way it is for now. * - * After thinking about it for a while, I'm not sure that - * the interaction between pins and flush operations needs - * all that much testing, as the two are essentially + * After thinking about it for a while, I'm not sure that + * the interaction between pins and flush operations needs + * all that much testing, as the two are essentially * orthoginal. The big thing is to verify that flushes of - * pinned entries with flush ops result in the expected + * pinned entries with flush ops result in the expected * updates of the cache. * - * Thus this is a bit of a smoke check to * verify that we + * Thus this is a bit of a smoke check to * verify that we * get the expected results. * * (VET, 100) initially not resident in cache @@ -8441,9 +8441,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE; int expected_index_len = 0; size_t expected_index_size = (size_t)0; - struct fo_flush_cache_test_spec spec[10] = + struct fo_flush_cache_test_spec spec[10] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 200, @@ -8793,7 +8793,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) if ( pass ) /* test #28 */ { /* Test the expected fheap case, in which an entry dirties - * and resizes itself, and dirties an entry which it has + * and resizes itself, and dirties an entry which it has * pinned. */ int test_num = 28; @@ -8803,9 +8803,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE; int expected_index_len = 5; size_t expected_index_size = 4 * VARIABLE_ENTRY_SIZE; - struct fo_flush_cache_test_spec spec[5] = + struct fo_flush_cache_test_spec spec[5] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 100, @@ -8986,7 +8986,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /* Repeat test #28 with the flush invalidate flag. * * Test the expected fheap case, in which an entry dirties - * and resizes itself, and dirties an entry which it has + * and resizes itself, and dirties an entry which it has * pinned. */ int test_num = 29; @@ -8996,9 +8996,9 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE; int expected_index_len = 0; size_t expected_index_size = 0; - struct fo_flush_cache_test_spec spec[5] = + struct fo_flush_cache_test_spec spec[5] = { - { + { /* entry_num = */ 0, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 100, @@ -9185,7 +9185,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr) /*------------------------------------------------------------------------- * Function: check_flush_cache__flush_op_test() * - * Purpose: Run a flush op flush cache test. Of the nature of + * Purpose: Run a flush op flush cache test. Of the nature of * flush operations, this is a multi-entry test. * * Return: void @@ -9222,7 +9222,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr, #if 0 /* This is useful debugging code -- lets keep it around. */ HDfprintf(stdout, "check_flush_cache__flush_op_test: test %d\n", test_num); -#endif +#endif if ( cache_ptr == NULL ) { @@ -9282,23 +9282,23 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr, ( check[i].entry_index < 0 ) || ( check[i].entry_index > max_indices[check[i].entry_type] ) || ( check[i].expected_size <= (size_t)0 ) || - ( ( check[i].in_cache != TRUE ) && + ( ( check[i].in_cache != TRUE ) && ( check[i].in_cache != FALSE ) ) || - ( ( check[i].at_main_addr != TRUE ) && + ( ( check[i].at_main_addr != TRUE ) && ( check[i].at_main_addr != FALSE ) ) || - ( ( check[i].is_dirty != TRUE ) && + ( ( check[i].is_dirty != TRUE ) && ( check[i].is_dirty != FALSE ) ) || - ( ( check[i].is_protected != TRUE ) && + ( ( check[i].is_protected != TRUE ) && ( check[i].is_protected != FALSE ) ) || - ( ( check[i].is_pinned != TRUE ) && + ( ( check[i].is_pinned != TRUE ) && ( check[i].is_pinned != FALSE ) ) || - ( ( check[i].expected_loaded != TRUE ) && + ( ( check[i].expected_loaded != TRUE ) && ( check[i].expected_loaded != FALSE ) ) || - ( ( check[i].expected_cleared != TRUE ) && + ( ( check[i].expected_cleared != TRUE ) && ( check[i].expected_cleared != FALSE ) ) || - ( ( check[i].expected_flushed != TRUE ) && + ( ( check[i].expected_flushed != TRUE ) && ( check[i].expected_flushed != FALSE ) ) || - ( ( check[i].expected_destroyed != TRUE ) && + ( ( check[i].expected_destroyed != TRUE ) && ( check[i].expected_destroyed != FALSE ) ) ) { pass = FALSE; @@ -9338,7 +9338,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr, for ( j = 0; j < spec[i].num_flush_ops; j++ ) { - add_flush_op(spec[i].entry_type, + add_flush_op(spec[i].entry_type, spec[i].entry_index, spec[i].flush_ops[j].op_code, spec[i].flush_ops[j].type, @@ -9420,7 +9420,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr, i = 0; while ( ( pass ) && ( i < check_size ) ) { - if ( check[i].in_cache != entry_in_cache(cache_ptr, + if ( check[i].in_cache != entry_in_cache(cache_ptr, check[i].entry_type, check[i].entry_index) ) { @@ -9460,7 +9460,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr, if ( ( ! entry_ptr->header.destroy_in_progress ) && ( check[i].in_cache ) && ( entry_ptr->header.size != check[i].expected_size ) ) { - HDfprintf(stdout, + HDfprintf(stdout, "(!destroy in progress and in cache and size (expected) = %d (%d).\n", (int)(entry_ptr->header.size), (int)(check[i].expected_size)); @@ -9654,9 +9654,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) test_entry_t * base_addr; struct expected_entry_status expected[8 + 31 + 14] = { - /* the expected array is used to maintain a table of the expected status of every + /* the expected array is used to maintain a table of the expected status of every * entry used in this test. Note that since the function that processes this - * array only processes as much of it as it is told to, we don't have to + * array only processes as much of it as it is told to, we don't have to * worry about maintaining the status of entries that we haven't used yet. */ /* entry entry in at main */ @@ -9745,9 +9745,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) if ( pass ) { /* the basic idea in this test is to insert a bunch of entries - * with flush operations associated with them, and then load - * other entries into the cache until the cache is full. At - * that point, load yet more entries into the cache, and see + * with flush operations associated with them, and then load + * other entries into the cache until the cache is full. At + * that point, load yet more entries into the cache, and see * if the flush operations are performed as expected. * * To make things a bit more interesting, we also include a @@ -9765,43 +9765,43 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) */ protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 0); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 0, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 1); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 1, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET, (size_t)0); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 2); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 2, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET, (size_t)0); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 3); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 3, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 4); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 4, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 5); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 5, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 5, H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 6); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 6, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 6, H5C__NO_FLAGS_SET, (size_t)0); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 7); - unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 7, + unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 7, H5C__NO_FLAGS_SET, (size_t)0); if ( ( cache_ptr->index_len != 8 ) || - ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 2)) + + ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * VARIABLE_ENTRY_SIZE) ) ) { pass = FALSE; @@ -9811,7 +9811,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) if ( pass ) { - /* Now set up the pinning relationships: + /* Now set up the pinning relationships: * * Briefly, (VET, 0) is pinned by (VET, 1), (VET, 2), and (VET, 3) * (VET, 7) is pinned by (VET, 3), and (VET, 5) @@ -9841,39 +9841,39 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * * (VET, 7) dirties (VET, 6) */ - add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, + add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, - VARIABLE_ENTRY_TYPE, 0, FALSE, + add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, + VARIABLE_ENTRY_TYPE, 0, FALSE, 3 * VARIABLE_ENTRY_SIZE / 4); - add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__DIRTY, + add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RESIZE, + add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE); - add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RENAME, + add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RENAME, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, + add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, + add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 3, FALSE, VARIABLE_ENTRY_SIZE); - add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, + add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 6, FALSE, (size_t)0); } if ( pass ) { - /* to summarize, at present the following variable size entries + /* to summarize, at present the following variable size entries * are in cache with the following characteristics: * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 5 KB Y Y - - * - * (VET, 1) Y 10 KB N N 0 dirty (VET, 0), + * (VET, 1) Y 10 KB N N 0 dirty (VET, 0), * resize (VET, 0) to 7.5 KB * * (VET, 2) Y 10 KB N N 0 dirty (VET, 0) @@ -9888,11 +9888,11 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) Y 5 KB Y N 7 - * * (VET, 6) Y 10 KB N N - - - * + * * (VET, 7) Y 10 KB N Y - dirty (VET, 6) * - * Recall that in this test bed, flush operations are excuted the - * first time the associated entry is flushed, and are then + * Recall that in this test bed, flush operations are excuted the + * first time the associated entry is flushed, and are then * deleted. */ @@ -9900,14 +9900,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 0; i < 31; i++ ) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 1; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -9926,9 +9926,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) /* verify the expected status of all entries we have loaded to date: */ num_large_entries = 1; - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 0, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } } @@ -9936,8 +9936,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) if ( pass ) { - /* Now load a large entry. This should result in the eviction - * of (VET,1), and the increase in the size of (VET, 0) from .5 + /* Now load a large entry. This should result in the eviction + * of (VET,1), and the increase in the size of (VET, 0) from .5 * VARIABLE_ENTRY_SIZE to .75 VARIABLE_ENTRY_SIZE. * * The following table illustrates the intended state of affairs @@ -9945,7 +9945,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 7.5 KB Y Y - - * * (VET, 1) N 10 KB N N - - @@ -9962,7 +9962,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) Y 5 KB Y N 7 - * * (VET, 6) Y 10 KB N N - - - * + * * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) * * Start by updating the expected table for the expected changes in entry status: @@ -9975,7 +9975,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) num_large_entries = 2; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 1, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 40 ) || @@ -9994,25 +9994,25 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 1, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { - /* Now load another large entry. This should result in the eviction + /* Now load another large entry. This should result in the eviction * of (VET, 2), the increase in the size of (VET, 0) from .75 * VARIABLE_ENTRY_SIZE to 1.0 VARIABLE_ENTRY_SIZE, and the renaming * of (VET, 0) to its alternate address. * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 10 KB Y Y - - * * (VET, 1) N 10 KB N N - - @@ -10027,7 +10027,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) Y 5 KB Y N 7 - * * (VET, 6) Y 10 KB N N - - - * + * * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) * * Start by updating the expected table for the expected changes in entry status: @@ -10041,7 +10041,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) num_large_entries = 3; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 2, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 2, H5C__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 40 ) || @@ -10051,7 +10051,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) (2 * LARGE_ENTRY_SIZE) ) || ( cache_ptr->index_size != ((3 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) + - (31 * MONSTER_ENTRY_SIZE) + + (31 * MONSTER_ENTRY_SIZE) + (3 * LARGE_ENTRY_SIZE)) ) ) { pass = FALSE; @@ -10059,9 +10059,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 2, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } @@ -10071,16 +10071,16 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * flushed, and increasing its size from 1/2 VARIABLE_ENTRY_SIZE to * VARIABLE_ENTRY_SIZE. * - * As a result of this size increase, the cache will have to look + * As a result of this size increase, the cache will have to look * for another entry to evict. After flushing (VET, 4) and (VET, 5), * it should evict (VET, 6), yielding the needed memory. * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 10 KB Y Y - - * * (VET, 1) N 10 KB N N - - @@ -10094,7 +10094,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) Y 5 KB N N 7 - * * (VET, 6) N 10 KB N N - - - * + * * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) * * Start by updating the expected table for the expected changes in entry status: @@ -10114,11 +10114,11 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) num_large_entries = 5; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 3, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 3, H5C__DIRTIED_FLAG, (size_t)0); protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 4); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 4, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG, (size_t)0); /* verify cache size */ @@ -10137,16 +10137,16 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 3, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { /* now touch all the non VARIABLE_ENTRY_TYPE entries in the - * cache to bring all the VARIABLE_ENTRY_TYPE entries to the + * cache to bring all the VARIABLE_ENTRY_TYPE entries to the * end of the LRU list. * * Note that we don't have to worry about (VET, 0) and (VET, 7) @@ -10155,14 +10155,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 0; i < 31; i++ ) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 5; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10177,9 +10177,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 4, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } @@ -10188,12 +10188,12 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) /* Now load three more large entries. This should result * in the eviction of (VET, 3), and the unpinning of (VET, 0) * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 10 KB Y N - - * * (VET, 1) N 10 KB N N - - @@ -10207,7 +10207,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) Y 5 KB N N 7 - * * (VET, 6) N 10 KB N N - - - * + * * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) * * Start by updating the expected table for the expected changes in entry status: @@ -10222,7 +10222,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 5; i < 8; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10241,9 +10241,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 5, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } @@ -10251,12 +10251,12 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) /* load another large entry. (VET, 4) should be evicted. * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 10 KB Y N - - * * (VET, 1) N 10 KB N N - - @@ -10270,7 +10270,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) Y 5 KB N N 7 - * * (VET, 6) N 10 KB N N - - - * + * * (VET, 7) Y 10 KB Y Y - dirty (VET, 6) * * Start by updating the expected table for the expected changes in entry status: @@ -10284,7 +10284,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 8; i < 9; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10304,24 +10304,24 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 6, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { - /* Load another large entry. + /* Load another large entry. * - * (VET, 5) should be evicted, and (VET, 7) should be unpinned. + * (VET, 5) should be evicted, and (VET, 7) should be unpinned. * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 10 KB Y N - - * * (VET, 1) N 10 KB N N - - @@ -10335,7 +10335,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) N 5 KB N N - - * * (VET, 6) N 10 KB N N - - - * + * * (VET, 7) Y 10 KB Y N - dirty (VET, 6) * * Start by updating the expected table for the expected changes in entry status: @@ -10350,7 +10350,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 9; i < 10; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10368,16 +10368,16 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 7, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { /* Again, touch all the non VARIABLE_ENTRY_TYPE entries in the - * cache to bring all the VARIABLE_ENTRY_TYPE entries to the + * cache to bring all the VARIABLE_ENTRY_TYPE entries to the * end of the LRU list. * * Both (VET, 0) and (VET, 7) have been unpinned, so they are @@ -10386,14 +10386,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 0; i < 31; i++ ) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 10; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10411,35 +10411,35 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 8, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { - /* load two more large entries. + /* load two more large entries. * * (VET, 0) should be flushed, but not evicted initially since it is dirty. * - * (VET, 7) should be evicted, but (VET, 7) has an eviction operation that - * dirties (VET, 6). Since (VET, 6) is not in the cache, it will be loaded. + * (VET, 7) should be evicted, but (VET, 7) has an eviction operation that + * dirties (VET, 6). Since (VET, 6) is not in the cache, it will be loaded. * Since this results in no net increase in free space, the cache will * continue to attempt to create free space. * * The cache will then flush all the monster and large entries, but since they - * are all dirty, they will not be evicted. + * are all dirty, they will not be evicted. * * Finally, it will reach (VET, 0) again, and evict it on the second pass. * This finally makes the necessary space. * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) N 10 KB N N - - * * (VET, 1) N 10 KB N N - - @@ -10453,12 +10453,12 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) N 5 KB N N - - * * (VET, 6) Y 10 KB Y N - - - * + * * (VET, 7) N 10 KB N N - - * * Start by updating the expected table for the expected changes in entry status: * - * Note that we reset the loaded, cleared, flushed, and destroyed fields of + * Note that we reset the loaded, cleared, flushed, and destroyed fields of * (VET,6) so we can track what is happening. */ base_addr = entries[VARIABLE_ENTRY_TYPE]; @@ -10486,7 +10486,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) /* a newly loaded entry is not inserted in the cache until after space has been * made for it. Thus (LET, 11) will not be flushed. */ - for ( i = num_variable_entries; + for ( i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1; i++ ) { @@ -10497,7 +10497,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 10; i < 12; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10515,34 +10515,34 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 9, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { /* Again, touch all the non VARIABLE_ENTRY_TYPE entries in the - * cache to bring the last remaining VARIABLE_ENTRY_TYPE entry to the - * end of the LRU list. + * cache to bring the last remaining VARIABLE_ENTRY_TYPE entry to the + * end of the LRU list. */ for ( i = 0; i < num_monster_entries; i++ ) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < num_large_entries; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } /* update the expected array to mark all these entries dirty again. */ - for ( i = num_variable_entries; + for ( i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1; i++ ) { @@ -10563,27 +10563,27 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 10, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass ) { - - /* Load two more large entries. + + /* Load two more large entries. * * Since (VET, 6) is dirty, at first this will just cause (VET, 6) to be flushed. * * But all other entries in the cache are dirty, so the cache will flush them all, * and then evict (VET, 6) on the second pass. * - * The following table shows the expected states of the variable + * The following table shows the expected states of the variable * size entries after the test. * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) N 10 KB N N - - * * (VET, 1) N 10 KB N N - - @@ -10597,7 +10597,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 5) N 5 KB N N - - * * (VET, 6) N 10 KB N N - - - * + * * (VET, 7) N 10 KB N N - - * * Start by updating the expected table for the expected changes in entry status: @@ -10613,7 +10613,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) /* a newly loaded entry is not inserted in the cache until after space has been * made for it. Thus (LET, 13) will not be flushed. */ - for ( i = num_variable_entries; + for ( i = num_variable_entries; i < num_variable_entries + num_monster_entries + num_large_entries - 1; i++ ) { @@ -10624,7 +10624,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) for ( i = 12; i < 14; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG, (size_t)0); } @@ -10641,9 +10641,9 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } /* verify entry status */ - verify_entry_status(cache_ptr, + verify_entry_status(cache_ptr, 11, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } @@ -10671,12 +10671,12 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) } } -#if H5C_COLLECT_CACHE_STATS +#if H5C_COLLECT_CACHE_STATS /* If we are collecting stats, check to see if we get the expected * values. * * Testing the stats code is fairly new, but given the extent - * to which I find myself depending on the stats, I've decided + * to which I find myself depending on the stats, I've decided * to start testing the stats whenever it is convenient to do * so. */ @@ -12544,7 +12544,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr, (int)expected_flushed, (int)(entry_ptr->destroyed), (int)expected_destroyed); -#endif +#endif pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.", @@ -13084,7 +13084,7 @@ check_expunge_entry(void) */ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13151,14 +13151,14 @@ check_expunge_entry(void) } /* Expunge the entry and then verify that it is no longer in the cache. - * Also verify that the entry was loaded, cleared, and destroyed, but + * Also verify that the entry was loaded, cleared, and destroyed, but * not flushed. */ expunge_entry(cache_ptr, 0, 0); if ( pass ) { - /* entry shouldn't be in cache -- only in_cache should be touched + /* entry shouldn't be in cache -- only in_cache should be touched * by the status call. Thus, only check that boolean. */ @@ -13193,7 +13193,7 @@ check_expunge_entry(void) /* now repeat the process with a different entry. On unprotect * mark the entry as dirty. Verify that it is not flushed. */ - + base_addr = entries[0]; entry_ptr = &(base_addr[1]); @@ -13204,7 +13204,7 @@ check_expunge_entry(void) */ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13243,7 +13243,7 @@ check_expunge_entry(void) if ( pass ) { result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13279,12 +13279,12 @@ check_expunge_entry(void) if ( pass ) { - /* entry shouldn't be in cache -- only in_cache should be touched + /* entry shouldn't be in cache -- only in_cache should be touched * by the status call. Thus, only check that boolean. */ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13333,7 +13333,7 @@ check_expunge_entry(void) /*------------------------------------------------------------------------- * Function: check_multiple_read_protect() * - * Purpose: Verify that multiple, simultaneous read protects of a + * Purpose: Verify that multiple, simultaneous read protects of a * single entry perform as expectd. * * Return: void @@ -13390,7 +13390,7 @@ check_multiple_read_protect(void) entry_ptr = &((entries[0])[0]); - if ( ( entry_ptr->header.is_protected ) || + if ( ( entry_ptr->header.is_protected ) || ( entry_ptr->header.is_read_only ) || ( entry_ptr->header.ro_ref_count != 0 ) ) { @@ -13413,7 +13413,7 @@ check_multiple_read_protect(void) { protect_entry_ro(cache_ptr, 0, 0); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 1 ) ) { @@ -13436,7 +13436,7 @@ check_multiple_read_protect(void) { protect_entry_ro(cache_ptr, 0, 0); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 2 ) ) { @@ -13459,7 +13459,7 @@ check_multiple_read_protect(void) { unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 1 ) ) { @@ -13482,7 +13482,7 @@ check_multiple_read_protect(void) { protect_entry_ro(cache_ptr, 0, 0); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 2 ) ) { @@ -13505,7 +13505,7 @@ check_multiple_read_protect(void) { protect_entry_ro(cache_ptr, 0, 0); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 3 ) ) { @@ -13528,7 +13528,7 @@ check_multiple_read_protect(void) { unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 2 ) ) { @@ -13551,7 +13551,7 @@ check_multiple_read_protect(void) { unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( ! ( entry_ptr->header.is_read_only ) ) || ( entry_ptr->header.ro_ref_count != 1 ) ) { @@ -13574,7 +13574,7 @@ check_multiple_read_protect(void) { unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); - if ( ( entry_ptr->header.is_protected ) || + if ( ( entry_ptr->header.is_protected ) || ( entry_ptr->header.is_read_only ) || ( entry_ptr->header.ro_ref_count != 0 ) ) { @@ -13594,7 +13594,7 @@ check_multiple_read_protect(void) #endif /* H5C_COLLECT_CACHE_STATS */ - /* If we get this far, do a write protect and unprotect to verify + /* If we get this far, do a write protect and unprotect to verify * that the stats are getting collected properly here as well. */ @@ -13602,7 +13602,7 @@ check_multiple_read_protect(void) { protect_entry(cache_ptr, 0, 0); - if ( ( ! ( entry_ptr->header.is_protected ) ) || + if ( ( ! ( entry_ptr->header.is_protected ) ) || ( entry_ptr->header.is_read_only ) || ( entry_ptr->header.ro_ref_count != 0 ) ) { @@ -13625,7 +13625,7 @@ check_multiple_read_protect(void) { unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); - if ( ( entry_ptr->header.is_protected ) || + if ( ( entry_ptr->header.is_protected ) || ( entry_ptr->header.is_read_only ) || ( entry_ptr->header.ro_ref_count != 0 ) ) { @@ -13645,7 +13645,7 @@ check_multiple_read_protect(void) #endif /* H5C_COLLECT_CACHE_STATS */ - /* Finally, mix things up a little, using a mix of reads and + /* Finally, mix things up a little, using a mix of reads and * and writes on different entries. Also include a pin to verify * that it works as well. * @@ -14142,7 +14142,7 @@ check_resize_entry(void) /* Setup a cache and verify that it is empty. * - * Then force the load of an entry by protecting it, and verify that + * Then force the load of an entry by protecting it, and verify that * the entry and cache have the expected sizes. * * Then unprotect the entry with the size changed flag and a reduced @@ -14150,10 +14150,10 @@ check_resize_entry(void) * sizes. * * Use a second protect/unprotect cycle to restore the entry to - * its original size. Verify that the entry and cache have the + * its original size. Verify that the entry and cache have the * expected sizes. * - * Protect and unprotect the entry again to pin it. Use + * Protect and unprotect the entry again to pin it. Use * H5C_resize_entry to reduce its size. Verify that the entry * and cache have the expected sizes. * @@ -14165,7 +14165,7 @@ check_resize_entry(void) * * * Obesrve that all the above tests have been done with only one - * entry in the cache. Repeat the tests with several entries in + * entry in the cache. Repeat the tests with several entries in * the cache. */ @@ -14218,8 +14218,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14249,9 +14249,9 @@ check_resize_entry(void) if ( pass ) { - result = H5C_unprotect(NULL, -1, -1, cache_ptr, + result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2)); @@ -14288,8 +14288,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14322,9 +14322,9 @@ check_resize_entry(void) if ( pass ) { - result = H5C_unprotect(NULL, -1, -1, cache_ptr, + result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE); @@ -14361,8 +14361,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14397,17 +14397,17 @@ check_resize_entry(void) if ( pass ) { - result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, + result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (LARGE_ENTRY_SIZE / 4)); if ( result < 0 ) { pass = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C_resize_pinned_entry() reports failure 1."); failure_mssg = msg; - } + } } if ( pass ) { @@ -14426,8 +14426,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14458,17 +14458,17 @@ check_resize_entry(void) if ( pass ) { - result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, + result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, LARGE_ENTRY_SIZE); if ( result < 0 ) { pass = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C_resize_pinned_entry() reports failure 2."); failure_mssg = msg; - } + } } if ( pass ) { @@ -14487,8 +14487,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14519,13 +14519,13 @@ check_resize_entry(void) protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); if ( pass ) { result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14630,8 +14630,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14661,9 +14661,9 @@ check_resize_entry(void) if ( pass ) { - result = H5C_unprotect(NULL, -1, -1, cache_ptr, + result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2)); @@ -14687,10 +14687,10 @@ check_resize_entry(void) if ( pass ) { if ( ( cache_ptr->index_len != 4 ) || - ( cache_ptr->index_size != + ( cache_ptr->index_size != ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 2)) ) || ( cache_ptr->slist_len != 2 ) || - ( cache_ptr->slist_size != + ( cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)) ) ) { pass = FALSE; @@ -14702,8 +14702,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14736,9 +14736,9 @@ check_resize_entry(void) if ( pass ) { - result = H5C_unprotect(NULL, -1, -1, cache_ptr, + result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE); @@ -14775,8 +14775,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14811,26 +14811,26 @@ check_resize_entry(void) if ( pass ) { - result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, + result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (LARGE_ENTRY_SIZE / 4)); if ( result < 0 ) { pass = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C_resize_pinned_entry() reports failure 3."); failure_mssg = msg; - } + } } if ( pass ) { if ( ( cache_ptr->index_len != 4 ) || - ( cache_ptr->index_size != + ( cache_ptr->index_size != ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 4)) ) || ( cache_ptr->slist_len != 2 ) || - ( cache_ptr->slist_size != + ( cache_ptr->slist_size != (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)) ) ) { pass = FALSE; @@ -14842,8 +14842,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14874,17 +14874,17 @@ check_resize_entry(void) if ( pass ) { - result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, + result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, LARGE_ENTRY_SIZE); if ( result < 0 ) { pass = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C_resize_pinned_entry() reports failure 4."); failure_mssg = msg; - } + } } if ( pass ) { @@ -14903,8 +14903,8 @@ check_resize_entry(void) if ( pass ) { - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14935,13 +14935,13 @@ check_resize_entry(void) protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, FALSE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); if ( pass ) { result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15028,7 +15028,7 @@ check_resize_entry(void) /*------------------------------------------------------------------------- * Function: check_evictions_enabled() * - * Purpose: Verify that H5C_get_evictions_enabled() and + * Purpose: Verify that H5C_get_evictions_enabled() and * H5C_set_evictions_enabled() functions perform as expected. * * Return: void @@ -15077,7 +15077,7 @@ check_evictions_enabled(void) * Load another entry -- verify that this does not cause an entry * to be evicted. * - * Insert an entry -- verify that this does not cause an entry to + * Insert an entry -- verify that this does not cause an entry to * be evicted. * * Use H5C_set_evictions_enabled() to re-enable evictions. Verify @@ -15090,7 +15090,7 @@ check_evictions_enabled(void) * Protect an entry not in the cache. Verify that this causes * two evictions. * - * Used H5C_set_evictions_enabled() to disable evictions again. + * Used H5C_set_evictions_enabled() to disable evictions again. * Verify with a call to H5C_get_evictions_enabled(). * * Now flush and discard the cache -- should succeed. @@ -15159,7 +15159,7 @@ check_evictions_enabled(void) for ( i = 0; i < 16 ; i++ ) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i, FALSE, H5C__NO_FLAGS_SET); } @@ -15190,7 +15190,7 @@ check_evictions_enabled(void) /* protect and unprotect another entry */ protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16); - unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16, + unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16, FALSE, H5C__NO_FLAGS_SET); if ( show_progress ) /* 7 */ @@ -15221,7 +15221,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[0]); - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -15284,7 +15284,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[1]); - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -15355,7 +15355,7 @@ check_evictions_enabled(void) /* protect and unprotect another entry */ protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18); - unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18, + unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18, FALSE, H5C__NO_FLAGS_SET); if ( show_progress ) /* 15 */ @@ -15428,7 +15428,7 @@ check_evictions_enabled(void) /* protect and unprotect an entry that is in the cache */ protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19); - unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19, + unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19, FALSE, H5C__NO_FLAGS_SET); if ( show_progress ) /* 20 */ @@ -15457,14 +15457,14 @@ check_evictions_enabled(void) /* protect and unprotect an entry that isn't in the cache */ protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20); - unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20, + unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20, FALSE, H5C__NO_FLAGS_SET); if ( show_progress ) /* 22 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* verify that the entries have been evicted to bring the + /* verify that the entries have been evicted to bring the * cache back down to its normal size. */ @@ -15491,7 +15491,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[2]); - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -15527,7 +15527,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[3]); - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -15576,11 +15576,11 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that isn't in the cache, forcing + /* protect and unprotect an entry that isn't in the cache, forcing * the cache to grow. */ protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21); - unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21, + unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21, FALSE, H5C__NO_FLAGS_SET); @@ -15656,7 +15656,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[4]); - result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, + result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -16777,7 +16777,7 @@ check_expunge_entry_errs(void) if ( pass ) { - result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, + result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, &(types[0]), entry_ptr->addr); if ( result > 0 ) { @@ -16795,7 +16795,7 @@ check_expunge_entry_errs(void) if ( pass ) { - result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, + result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, &(types[0]), entry_ptr->addr); if ( result > 0 ) { @@ -16813,7 +16813,7 @@ check_expunge_entry_errs(void) if ( pass ) { - result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, + result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, &(types[0]), entry_ptr->addr); if ( result < 0 ) { @@ -16874,11 +16874,11 @@ check_resize_entry_errs(void) pass = TRUE; - /* Allocate a cache, protect an entry, and then call + /* Allocate a cache, protect an entry, and then call * H5C_resize_pinned_entry() to resize it -- this should fail. * * Unprotect the the entry with the pinned flag, and then call - * H5C_resize_pinned_entry() again with new size of zero. + * H5C_resize_pinned_entry() again with new size of zero. * This should fail too. * * Finally, unpin the entry and destroy the cache. @@ -16980,7 +16980,7 @@ check_unprotect_ro_dirty_err(void) pass = TRUE; - /* allocate a cache, protect an entry read only, and then unprotect it + /* allocate a cache, protect an entry read only, and then unprotect it * with the dirtied flag set. This should fail. Destroy the cache * -- should succeed. */ @@ -17022,8 +17022,8 @@ check_unprotect_ro_dirty_err(void) takedown_cache(cache_ptr, FALSE, FALSE); } - /* allocate a another cache, protect an entry read only twice, and - * then unprotect it with the dirtied flag set. This should fail. + /* allocate a another cache, protect an entry read only twice, and + * then unprotect it with the dirtied flag set. This should fail. * Unprotect it with no flags set twice and then destroy the cache. * This should succeed. */ @@ -17110,9 +17110,9 @@ check_protect_ro_rw_err(void) pass = TRUE; - /* allocate a cache, protect an entry read only, and then try to protect + /* allocate a cache, protect an entry read only, and then try to protect * it again rw. This should fail. - * + * * Unprotect the entry and destroy the cache -- should succeed. */ @@ -17166,7 +17166,7 @@ check_protect_ro_rw_err(void) /*------------------------------------------------------------------------- * Function: check_evictions_enabled_err() * - * Purpose: Verify that H5C_get_evictions_enabled() and + * Purpose: Verify that H5C_get_evictions_enabled() and * H5C_set_evictions_enabled() generate errors as expected. * * Return: void @@ -17200,7 +17200,7 @@ check_check_evictions_enabled_err(void) * * Repeat with a NULL evictions_enabled_ptr, should fail as well. * - * Configure the cache to use auto cache resize. Call + * Configure the cache to use auto cache resize. Call * H5C_set_evictions_enabled() to disable evictions. Should fail. * * Unprotect the entry and destroy the cache -- should succeed. @@ -17317,7 +17317,7 @@ check_check_evictions_enabled_err(void) * * John Mainzer 1/8/08 * Added a basic set of tests for the flash cache size - * increment code. + * increment code. * *------------------------------------------------------------------------- */ @@ -17372,7 +17372,7 @@ check_auto_cache_resize(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -20523,10 +20523,10 @@ check_auto_cache_resize(void) } /* now test the flash cache size increment code. At least at present, - * there should be no interaction between the regular auto-resize - * code and the flash cache size increment code other than a reset + * there should be no interaction between the regular auto-resize + * code and the flash cache size increment code other than a reset * of the counter and stats collection used by the regular auto-resize - * code. Thus we do only limited tests of the two pieces of code + * code. Thus we do only limited tests of the two pieces of code * operating together. * * Start with simple test to verify that the flash cache increment @@ -20535,7 +20535,7 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* allocate a cache, enable the flash cache size increase code, and + /* allocate a cache, enable the flash cache size increase code, and * then force the flash size increase code through all its operational * modes. Verify that all performs as expected. */ @@ -20648,7 +20648,7 @@ check_auto_cache_resize(void) /* Now load a monster entry. Since a monster entry is larger than * half the size of the cache, and there is not sufficient space - * for a monster entry in the cache, we will add space to the + * for a monster entry in the cache, we will add space to the * cache to make room for the entry. */ if ( pass ) { @@ -20664,7 +20664,7 @@ check_auto_cache_resize(void) ( ( ( cache_ptr->max_cache_size != (80 * 1024) ) || ( cache_ptr->min_clean_size != (40 * 1024) ) || ( cache_ptr->index_len != 2 ) || - ( cache_ptr->index_size != (HUGE_ENTRY_SIZE + + ( cache_ptr->index_size != (HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE) ) || ( cache_ptr->cache_accesses != 1 ) ) ) ) { @@ -20726,9 +20726,9 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* delete existing entries to prepare for next test, and reset + /* delete existing entries to prepare for next test, and reset * the size of the cache. - */ + */ if ( pass ) { expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1); @@ -20736,12 +20736,12 @@ check_auto_cache_resize(void) if ( pass ) { - result = H5C_set_cache_auto_resize_config(cache_ptr, + result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass = FALSE; + pass = FALSE; failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n"; } } @@ -20758,7 +20758,7 @@ check_auto_cache_resize(void) } } - /* repeat the above basic test, only this time, use inserts to add + /* repeat the above basic test, only this time, use inserts to add * entries to the cache, not protects. */ @@ -20793,7 +20793,7 @@ check_auto_cache_resize(void) /* Now insert a monster entry. Since a monster entry is larger than * half the size of the cache, and there is not sufficient space - * for a monster entry in the cache, we will add space to the + * for a monster entry in the cache, we will add space to the * cache to make room for the entry. */ if ( pass ) { @@ -20805,7 +20805,7 @@ check_auto_cache_resize(void) ( ( ( cache_ptr->max_cache_size != (80 * 1024) ) || ( cache_ptr->min_clean_size != (40 * 1024) ) || ( cache_ptr->index_len != 2 ) || - ( cache_ptr->index_size != + ( cache_ptr->index_size != HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE ) || ( cache_ptr->cache_accesses != 0 ) ) ) ) { @@ -20820,14 +20820,14 @@ check_auto_cache_resize(void) */ if ( pass ) { - insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5, TRUE, + insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5, TRUE, H5C__NO_FLAGS_SET); if ( ( pass ) && ( ( ( cache_ptr->max_cache_size != (144 * 1024) ) || ( cache_ptr->min_clean_size != ( 72 * 1024) ) || ( cache_ptr->index_len != 3 ) || - ( cache_ptr->index_size != + ( cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE + HUGE_ENTRY_SIZE ) || ( cache_ptr->cache_accesses != 0 ) ) ) ) { @@ -20862,11 +20862,11 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* delete existing entries to prepare for next test, and reset + /* delete existing entries to prepare for next test, and reset * the size of the cache. We must also change the size of the needed - * variable entries before we run the test, so will protect and + * variable entries before we run the test, so will protect and * unprotect them now so as to get the correct initial size. - */ + */ if ( pass ) { expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5); @@ -20894,12 +20894,12 @@ check_auto_cache_resize(void) if ( pass ) { auto_size_ctl.initial_size = 6 * 1024; - result = H5C_set_cache_auto_resize_config(cache_ptr, + result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass = FALSE; + pass = FALSE; failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n"; } } @@ -20922,11 +20922,11 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__NO_FLAGS_SET); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__NO_FLAGS_SET); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12); @@ -21049,7 +21049,7 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); /* re-size the variable entries back down to their initial size, and - * restore the cache to its initial size as well, in preparation + * restore the cache to its initial size as well, in preparation * for the next test. */ if ( pass ) { @@ -21067,12 +21067,12 @@ check_auto_cache_resize(void) if ( pass ) { auto_size_ctl.initial_size = 6 * 1024; - result = H5C_set_cache_auto_resize_config(cache_ptr, + result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass = FALSE; + pass = FALSE; failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n"; } } @@ -21096,7 +21096,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE); @@ -21135,7 +21135,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE); @@ -21156,7 +21156,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE); @@ -21180,15 +21180,15 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); if ( ( pass ) && @@ -21206,7 +21206,7 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); /* re-size the variable entries back down to their initial size, and - * restore the cache to its initial size as well, in preparation + * restore the cache to its initial size as well, in preparation * for the next test. */ if ( pass ) { @@ -21224,12 +21224,12 @@ check_auto_cache_resize(void) if ( pass ) { auto_size_ctl.initial_size = 6 * 1024; - result = H5C_set_cache_auto_resize_config(cache_ptr, + result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass = FALSE; + pass = FALSE; failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n"; } } @@ -21249,7 +21249,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024); @@ -21288,7 +21288,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024); @@ -21309,7 +21309,7 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__PIN_ENTRY_FLAG); resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024); @@ -21333,15 +21333,15 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C__UNPIN_ENTRY_FLAG); if ( ( pass ) && @@ -21455,14 +21455,14 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); /* protect and unprotect a large entry -- no change in cache size since - * a large entry will just fill the available space in the cache. + * a large entry will just fill the available space in the cache. */ if ( pass ) { rpt_fcn_called = FALSE; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -21480,7 +21480,7 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* protect and unprotect another a large entry -- should trigger a + /* protect and unprotect another a large entry -- should trigger a * flash cache size increase to 12 KB (remember that flash_multiple is * set to 2.0). */ @@ -21489,7 +21489,7 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -21507,7 +21507,7 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* protect and unprotect two more large entries -- shouldnt trigger a + /* protect and unprotect two more large entries -- shouldnt trigger a * flash cache size increase. */ if ( pass ) { @@ -21515,10 +21515,10 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE, H5C__NO_FLAGS_SET); protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && @@ -21536,7 +21536,7 @@ check_auto_cache_resize(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* do many accesses of a single entry to talk the cache into reducing + /* do many accesses of a single entry to talk the cache into reducing * its size to the minimum. */ if ( pass ) { @@ -21572,17 +21572,17 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, + unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, H5C__NO_FLAGS_SET); if ( ( pass ) && ( ( ( cache_ptr->max_cache_size != (4 * 1024 + 128) ) || ( cache_ptr->min_clean_size != (2 * 1024 + 64) ) || ( cache_ptr->index_len != 2 ) || - ( cache_ptr->index_size != + ( cache_ptr->index_size != LARGE_ENTRY_SIZE + TINY_ENTRY_SIZE ) || ( cache_ptr->cache_accesses != 1 ) || - ( rpt_fcn_called == FALSE ) || + ( rpt_fcn_called == FALSE ) || ( rpt_status != flash_increase ) ) ) ) { pass = FALSE; @@ -21610,7 +21610,7 @@ check_auto_cache_resize(void) if ( ( cache_ptr->max_cache_size != (20 * 1024) ) || ( cache_ptr->min_clean_size != (10 * 1024) ) || - ( rpt_fcn_called == FALSE ) || + ( rpt_fcn_called == FALSE ) || ( rpt_status != at_max_size ) ) { pass = FALSE; @@ -21654,7 +21654,7 @@ check_auto_cache_resize(void) * * Modifications: * - * Added code to include the flash cache size increment + * Added code to include the flash cache size increment * code in this test. * JRM -- 1/10/08 * @@ -21695,7 +21695,7 @@ check_auto_cache_resize_disable(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 1.0, /* double flash_threshold = */ 0.25, @@ -24207,27 +24207,27 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); /* Now test the flash cache size increment code to verify that it - * is disabled when it should be. + * is disabled when it should be. * - * Since the flash size increase code doesn't look at hit rate, or + * Since the flash size increase code doesn't look at hit rate, or * use epochs (other than to start a new epoch if a flash cache size * increase is triggered), we go about these tests somewhat differently * than the rest of the tests in this function. * - * As of this writing, there is only one flash cache size increment + * As of this writing, there is only one flash cache size increment * mode (add space), which is triggered whenever the size of a newly * loaded or inserted entry, or the delta between old and new entry * sizes exceeds some fraction of the current maximum cache size, and * the cache doesn't have enough free space to accomodate the new/ * resize entry without performing evictions. The range of permissible * values for the flash_threshold (0.1 to 1.0 as of this writing), and - * for the flash_multiple (0.1 to 10.0) do not permit the facility to + * for the flash_multiple (0.1 to 10.0) do not permit the facility to * be turned off by configuration. Thus, flash cache size increases - * can be disabled only via the flash_incr_mode, and by setting the + * can be disabled only via the flash_incr_mode, and by setting the * current max_cache_size equal to max_size. * * We have already tested the latter in check_auto_cache_resize(), so - * we need only thest the former here. Do this by disabling flash + * we need only thest the former here. Do this by disabling flash * cache size increments via the flash_incr_mode, and then creating * situations that would trigger flash cache size increases were that * code enabled. @@ -24339,7 +24339,7 @@ check_auto_cache_resize_disable(void) * size increment code was active, this would trigger an increase. * Verify that it doesn't. * - * This finishes the additional tests needed for the flash cache + * This finishes the additional tests needed for the flash cache * size increase code. */ if ( pass ) { @@ -24446,7 +24446,7 @@ check_auto_cache_resize_epoch_markers(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -25116,7 +25116,7 @@ check_auto_cache_resize_epoch_markers(void) * * Modifications: * - * Added code to verify that errors in the flash cache size + * Added code to verify that errors in the flash cache size * increment related fields are caught as well. * * JRM -- 1/17/08 @@ -25186,7 +25186,7 @@ check_auto_cache_resize_input_errs(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -26567,7 +26567,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); - invalid_auto_size_ctl.flash_incr_mode = + invalid_auto_size_ctl.flash_incr_mode = (enum H5C_cache_flash_incr_mode) -1; /* INVALID */ invalid_auto_size_ctl.flash_multiple = 2.0; invalid_auto_size_ctl.flash_threshold = 0.5; @@ -26643,7 +26643,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); - invalid_auto_size_ctl.flash_incr_mode = + invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 0.09; /* INVALID */ invalid_auto_size_ctl.flash_threshold = 0.5; @@ -26717,7 +26717,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); - invalid_auto_size_ctl.flash_incr_mode = + invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 10.01; /* INVALID */ invalid_auto_size_ctl.flash_threshold = 0.5; @@ -26793,7 +26793,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); - invalid_auto_size_ctl.flash_incr_mode = + invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 1.0; invalid_auto_size_ctl.flash_threshold = 0.09; /* INVALID */ @@ -26867,7 +26867,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); - invalid_auto_size_ctl.flash_incr_mode = + invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 1.0; invalid_auto_size_ctl.flash_threshold = 1.001; /* INVALID */ @@ -27632,7 +27632,7 @@ check_auto_cache_resize_aux_fcns(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C_cache_flash_incr_mode */ + /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, diff --git a/test/cache_api.c b/test/cache_api.c index fcc4664..4e430b3 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -3854,7 +3854,7 @@ check_file_mdc_api_errs(void) { if ( show_progress ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s: testing H5Fset_mdc_config() with invalid config %d.\n", fcn_name, i); } @@ -3884,7 +3884,7 @@ check_file_mdc_api_errs(void) if ( show_progress ) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n", + HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n", fcn_name); } @@ -3903,7 +3903,7 @@ check_file_mdc_api_errs(void) if ( show_progress ) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n", + HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n", fcn_name); } @@ -3924,7 +3924,7 @@ check_file_mdc_api_errs(void) if ( show_progress ) { - HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n", + HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n", fcn_name); } diff --git a/test/cache_common.c b/test/cache_common.c index 25eb988..5eb91dc 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -736,7 +736,7 @@ flush(H5F_t *f, HDassert( entry_ptr->header.addr == entry_ptr->addr ); HDassert( entry_ptr->addr == addr ); HDassert( entry_ptr->header.size == entry_ptr->size ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || + HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || ( entry_ptr->size == entry_sizes[entry_ptr->type] ) ); HDassert( entry_ptr->header.is_dirty == entry_ptr->is_dirty ); HDassert( entry_ptr->cache_ptr != NULL ); @@ -748,7 +748,7 @@ flush(H5F_t *f, for ( i = 0; i < entry_ptr->num_flush_ops; i++ ) { - execute_flush_op(entry_ptr->cache_ptr, + execute_flush_op(entry_ptr->cache_ptr, entry_ptr, &((entry_ptr->flush_ops)[i]), flags_ptr); @@ -782,8 +782,8 @@ flush(H5F_t *f, } /* flush() */ -herr_t -pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +herr_t +pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); @@ -791,7 +791,7 @@ pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); @@ -799,7 +799,7 @@ nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); @@ -807,7 +807,7 @@ micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); @@ -815,7 +815,7 @@ tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); @@ -823,7 +823,7 @@ small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); @@ -831,7 +831,7 @@ medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); @@ -839,7 +839,7 @@ large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); @@ -847,7 +847,7 @@ huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); @@ -855,7 +855,7 @@ monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, } herr_t -variable_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, +variable_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing, unsigned * flags_ptr) { HDassert ( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); @@ -1135,7 +1135,7 @@ variable_size(H5F_t * f, void * thing, size_t * size_ptr) * * Purpose: Do noting if pass is FALSE on entry. * - * Otherwise, add the specified flush operation to the + * Otherwise, add the specified flush operation to the * target instance of test_entry_t. * * Return: void @@ -1162,10 +1162,10 @@ add_flush_op(int target_type, test_entry_t * target_entry_ptr; HDassert( ( 0 <= target_type ) && ( target_type < NUMBER_OF_ENTRY_TYPES ) ); - HDassert( ( 0 <= target_idx ) && + HDassert( ( 0 <= target_idx ) && ( target_idx <= max_indices[target_type] ) ); HDassert( ( 0 <= op_code ) && ( op_code <= FLUSH_OP__MAX_OP ) ); - HDassert( ( op_code != FLUSH_OP__RESIZE ) || + HDassert( ( op_code != FLUSH_OP__RESIZE ) || ( type == VARIABLE_ENTRY_TYPE ) ); HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) ); HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) ); @@ -1190,7 +1190,7 @@ add_flush_op(int target_type, (target_entry_ptr->flush_ops)[i].size = new_size; } - + return; } /* add_flush_op() */ @@ -1282,11 +1282,11 @@ create_pinned_entry_dependency(H5C_t * cache_ptr, * Function: dirty_entry * * Purpose: Given a pointer to a cache, an entry type, and an index, - * dirty the target entry. + * dirty the target entry. * * If the dirty_pin parameter is true, verify that the - * target entry is in the cache and is pinned. If it - * isn't, scream and die. If it is, use the + * target entry is in the cache and is pinned. If it + * isn't, scream and die. If it is, use the * H5C_mark_pinned_entry_dirty() call to dirty it. * * Do nothing if pass is false on entry. @@ -1338,7 +1338,7 @@ dirty_entry(H5C_t * cache_ptr, pass = FALSE; failure_mssg = "entry to be dirty pinned is not pinned."; - + } else { mark_pinned_entry_dirty(cache_ptr, type, idx, FALSE, (size_t)0); @@ -1346,7 +1346,7 @@ dirty_entry(H5C_t * cache_ptr, } } } else { - + protect_entry(cache_ptr, type, idx); unprotect_entry(cache_ptr, type, idx, TRUE, H5C__NO_FLAGS_SET); } @@ -1391,13 +1391,13 @@ execute_flush_op(H5C_t * cache_ptr, HDassert( ( entry_ptr->flush_op_self_resize_in_progress ) || ( entry_ptr->header.size == entry_ptr->size ) ); HDassert( op_ptr != NULL ); - HDassert( ( 0 <= entry_ptr->type ) && + HDassert( ( 0 <= entry_ptr->type ) && ( entry_ptr->type < NUMBER_OF_ENTRY_TYPES ) ); - HDassert( ( 0 <= entry_ptr->index ) && + HDassert( ( 0 <= entry_ptr->index ) && ( entry_ptr->index <= max_indices[entry_ptr->type] ) ); - HDassert( ( 0 <= op_ptr->type ) && + HDassert( ( 0 <= op_ptr->type ) && ( op_ptr->type < NUMBER_OF_ENTRY_TYPES ) ); - HDassert( ( 0 <= op_ptr->idx ) && + HDassert( ( 0 <= op_ptr->idx ) && ( op_ptr->idx <= max_indices[op_ptr->type] ) ); HDassert( ( op_ptr->flag == FALSE ) || ( op_ptr->flag == TRUE ) ); HDassert( flags_ptr != NULL ); @@ -1410,17 +1410,17 @@ execute_flush_op(H5C_t * cache_ptr, break; case FLUSH_OP__DIRTY: - HDassert( ( entry_ptr->type != op_ptr->type ) || + HDassert( ( entry_ptr->type != op_ptr->type ) || ( entry_ptr->index != op_ptr->idx ) ); dirty_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag); break; case FLUSH_OP__RESIZE: - if ( ( entry_ptr->type == op_ptr->type ) && + if ( ( entry_ptr->type == op_ptr->type ) && ( entry_ptr->index == op_ptr->idx ) ) { - /* the flush operation is acting on the entry to + /* the flush operation is acting on the entry to * which it is attached. Handle this here: */ HDassert( entry_ptr->type == VARIABLE_ENTRY_TYPE ); @@ -1439,18 +1439,18 @@ execute_flush_op(H5C_t * cache_ptr, entry_ptr->header.size = entry_ptr->size; } - + } else { /* change the size of some other entry */ - resize_entry(cache_ptr, op_ptr->type, op_ptr->idx, + resize_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->size, op_ptr->flag); } break; case FLUSH_OP__RENAME: - rename_entry(cache_ptr, op_ptr->type, op_ptr->idx, + rename_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag); break; @@ -1538,7 +1538,7 @@ entry_in_cache(H5C_t * cache_ptr, * fields. * * JRM -- 4/1/07 - * Added initialization for the new is_read_only, and + * Added initialization for the new is_read_only, and * ro_ref_count fields. * *------------------------------------------------------------------------- @@ -1641,12 +1641,12 @@ reset_entries(void) * * Purpose: Given a pointer to a cache, an entry type, an index, and * a size, set the size of the target entry to the size. Note - * that at present, the type of the entry must be + * that at present, the type of the entry must be * VARIABLE_ENTRY_TYPE. * * If the resize_pin parameter is true, verify that the - * target entry is in the cache and is pinned. If it - * isn't, scream and die. If it is, use the + * target entry is in the cache and is pinned. If it + * isn't, scream and die. If it is, use the * H5C_mark_pinned_entry_dirty() call to resize it. * * Do nothing if pass is false on entry. @@ -1701,15 +1701,15 @@ resize_entry(H5C_t * cache_ptr, pass = FALSE; failure_mssg = "entry to be resized pinned is not pinned."; - + } else { - mark_pinned_entry_dirty(cache_ptr, type, idx, + mark_pinned_entry_dirty(cache_ptr, type, idx, TRUE, new_size); } } } else { - + protect_entry(cache_ptr, type, idx); unprotect_entry_with_size_change(cache_ptr, type, idx, H5C__SIZE_CHANGED_FLAG, new_size); @@ -1778,13 +1778,13 @@ resize_pinned_entry(H5C_t * cache_ptr, pass = FALSE; failure_mssg = "entry to be resized is not pinned."; - + } else { entry_ptr->size = new_size; - result = H5C_resize_pinned_entry(cache_ptr, - (void *)entry_ptr, + result = H5C_resize_pinned_entry(cache_ptr, + (void *)entry_ptr, new_size); if ( result != SUCCEED ) { @@ -1845,7 +1845,7 @@ verify_clean(void) for ( j = 0; j <= max_index; j++ ) { - if ( ( base_addr[j].header.is_dirty ) || + if ( ( base_addr[j].header.is_dirty ) || ( base_addr[j].is_dirty ) ) { dirty_count++; @@ -1914,7 +1914,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( pass ) { - in_cache = entry_in_cache(cache_ptr, expected[i].entry_type, + in_cache = entry_in_cache(cache_ptr, expected[i].entry_type, expected[i].entry_index); if ( in_cache != expected[i].in_cache ) { @@ -1936,7 +1936,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->size != expected[i].size ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) size actualexpected = %ld/%ld.\n", tag, (int)expected[i].entry_type, @@ -1952,7 +1952,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->header.size != expected[i].size ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) header size actual/expected = %ld/%ld.\n", tag, (int)expected[i].entry_type, @@ -1968,7 +1968,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->at_main_addr != expected[i].at_main_addr ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) at main addr actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -1984,7 +1984,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->is_dirty != expected[i].is_dirty ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) is_dirty actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -2000,7 +2000,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->header.is_dirty != expected[i].is_dirty ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) header is_dirty actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -2016,7 +2016,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->is_protected != expected[i].is_protected ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) is_protected actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -2032,7 +2032,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->header.is_protected != expected[i].is_protected ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) header is_protected actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -2048,7 +2048,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->is_pinned != expected[i].is_pinned ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) is_pinned actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -2064,7 +2064,7 @@ verify_entry_status(H5C_t * cache_ptr, if ( entry_ptr->header.is_pinned != expected[i].is_pinned ) { pass = FALSE; - sprintf(msg, + sprintf(msg, "%d entry (%d, %d) header is_pinned actual/expected = %d/%d.\n", tag, (int)expected[i].entry_type, @@ -2546,7 +2546,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr, entry_ptr->is_dirty = TRUE; if ( size_changed ) { - + /* update entry size now to keep the sanity checks happy */ entry_ptr->size = new_size; } @@ -2569,16 +2569,16 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr, (int)(entry_ptr->header.is_dirty)); HDfprintf(stdout, "entry_ptr->header.is_pinned = %d.\n", (int)(entry_ptr->header.is_pinned)); - HDfprintf(stdout, + HDfprintf(stdout, "(entry_ptr->header.type != &(types[type])) = %d.\n", (int)(entry_ptr->header.type != &(types[type]))); - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->size = %ld, entry_ptr->header.size = %ld.\n", (long)(entry_ptr->size), (long)(entry_ptr->header.size)); - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->addr = %ld, entry_ptr->header.addr = %ld.\n", (long)(entry_ptr->addr), (long)(entry_ptr->header.addr)); -#endif +#endif pass = FALSE; failure_mssg = "error in H5C_mark_pinned_entry_dirty()."; @@ -2761,7 +2761,7 @@ rename_entry(H5C_t * cache_ptr, if ( ! done ) { - if ( ( result < 0 ) || + if ( ( result < 0 ) || ( ( ! ( entry_ptr->header.destroy_in_progress ) ) && ( entry_ptr->header.addr != new_addr ) ) ) { @@ -2798,8 +2798,8 @@ rename_entry(H5C_t * cache_ptr, * 6/11/04 * * Modifications: - * - * - Modified call to H5C_protect to pass H5C__NO_FLAGS_SET in the + * + * - Modified call to H5C_protect to pass H5C__NO_FLAGS_SET in the * new flags parameter. * JRM -- 3/28/07 * @@ -2886,7 +2886,7 @@ protect_entry(H5C_t * cache_ptr, /*------------------------------------------------------------------------- * Function: protect_entry_ro() * - * Purpose: Do a read only protect the entry indicated by the type + * Purpose: Do a read only protect the entry indicated by the type * and index. * * Do nothing if pass is FALSE on entry. @@ -2897,7 +2897,7 @@ protect_entry(H5C_t * cache_ptr, * 4/1/07 * * Modifications: - * + * * - None. * *------------------------------------------------------------------------- @@ -2925,8 +2925,8 @@ protect_entry_ro(H5C_t * cache_ptr, HDassert( entry_ptr->index == idx ); HDassert( entry_ptr->type == type ); HDassert( entry_ptr == entry_ptr->self ); - HDassert( ( ! ( entry_ptr->is_protected ) ) || - ( ( entry_ptr->is_read_only ) && + HDassert( ( ! ( entry_ptr->is_protected ) ) || + ( ( entry_ptr->is_read_only ) && ( entry_ptr->ro_ref_count > 0 ) ) ); cache_entry_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]), @@ -3062,7 +3062,7 @@ unpin_entry(H5C_t * cache_ptr, * JRM -- 3/31/06 * Update for pinned entries. * - * JRM -- 4/1/07 + * JRM -- 4/1/07 * Updated for new multiple read protects. * *------------------------------------------------------------------------- @@ -3160,7 +3160,7 @@ unprotect_entry(H5C_t * cache_ptr, entry_ptr->ro_ref_count = 0; } else { - + entry_ptr->is_protected = FALSE; } @@ -3264,14 +3264,14 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr, HDassert ( ( ! pin_flag_set ) || ( ! (entry_ptr->is_pinned) ) ); HDassert ( ( ! unpin_flag_set ) || ( entry_ptr->is_pinned ) ); HDassert ( ( ! size_changed_flag_set ) || ( new_size > 0 ) ); - HDassert ( ( ! size_changed_flag_set ) || + HDassert ( ( ! size_changed_flag_set ) || ( type == VARIABLE_ENTRY_TYPE ) ); entry_ptr->is_dirty = (entry_ptr->is_dirty || dirty_flag_set); if ( size_changed_flag_set ) { - entry_ptr->is_dirty = TRUE; + entry_ptr->is_dirty = TRUE; entry_ptr->size = new_size; } @@ -3457,7 +3457,7 @@ row_major_scan_forward(H5C_t * cache_ptr, ( (idx + lag - 5) % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, + HDfprintf(stdout, "(p-ro, %d, %d) ", type, (idx + lag - 5)); protect_entry_ro(cache_ptr, type, (idx + lag - 5)); @@ -3468,7 +3468,7 @@ row_major_scan_forward(H5C_t * cache_ptr, ( (idx + lag - 6) % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, + HDfprintf(stdout, "(p-ro, %d, %d) ", type, (idx + lag - 6)); protect_entry_ro(cache_ptr, type, (idx + lag - 6)); @@ -3479,7 +3479,7 @@ row_major_scan_forward(H5C_t * cache_ptr, ( (idx + lag - 7) % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, + HDfprintf(stdout, "(p-ro, %d, %d) ", type, (idx + lag - 7)); protect_entry_ro(cache_ptr, type, (idx + lag - 7)); @@ -3490,7 +3490,7 @@ row_major_scan_forward(H5C_t * cache_ptr, ( (idx + lag - 7) % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, + HDfprintf(stdout, "(u-ro, %d, %d) ", type, (idx + lag - 7)); unprotect_entry(cache_ptr, type, (idx + lag - 7), @@ -3502,7 +3502,7 @@ row_major_scan_forward(H5C_t * cache_ptr, ( (idx + lag - 8) % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, + HDfprintf(stdout, "(u-ro, %d, %d) ", type, (idx + lag - 8)); unprotect_entry(cache_ptr, type, (idx + lag - 8), @@ -3514,7 +3514,7 @@ row_major_scan_forward(H5C_t * cache_ptr, ( (idx + lag - 9) % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, + HDfprintf(stdout, "(u-ro, %d, %d) ", type, (idx + lag - 9)); unprotect_entry(cache_ptr, type, (idx + lag - 9), @@ -3874,7 +3874,7 @@ row_major_scan_backward(H5C_t * cache_ptr, ( (idx - lag + 5) % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, + HDfprintf(stdout, "(p-ro, %d, %d) ", type, (idx - lag + 5)); protect_entry_ro(cache_ptr, type, (idx - lag + 5)); @@ -3885,7 +3885,7 @@ row_major_scan_backward(H5C_t * cache_ptr, ( (idx - lag + 6) % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, + HDfprintf(stdout, "(p-ro, %d, %d) ", type, (idx - lag + 6)); protect_entry_ro(cache_ptr, type, (idx - lag + 6)); @@ -3896,7 +3896,7 @@ row_major_scan_backward(H5C_t * cache_ptr, ( (idx - lag + 7) % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(p-ro, %d, %d) ", type, + HDfprintf(stdout, "(p-ro, %d, %d) ", type, (idx - lag + 7)); protect_entry_ro(cache_ptr, type, (idx - lag + 7)); @@ -3907,7 +3907,7 @@ row_major_scan_backward(H5C_t * cache_ptr, ( (idx - lag + 7) % 9 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, + HDfprintf(stdout, "(u-ro, %d, %d) ", type, (idx - lag + 7)); unprotect_entry(cache_ptr, type, (idx - lag + 7), @@ -3919,7 +3919,7 @@ row_major_scan_backward(H5C_t * cache_ptr, ( (idx - lag + 8) % 11 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, + HDfprintf(stdout, "(u-ro, %d, %d) ", type, (idx - lag + 8)); unprotect_entry(cache_ptr, type, (idx - lag + 8), @@ -3931,7 +3931,7 @@ row_major_scan_backward(H5C_t * cache_ptr, ( (idx - lag + 9) % 13 == 0 ) ) { if ( verbose ) - HDfprintf(stdout, "(u-ro, %d, %d) ", type, + HDfprintf(stdout, "(u-ro, %d, %d) ", type, (idx - lag + 9)); unprotect_entry(cache_ptr, type, (idx - lag + 9), diff --git a/test/cache_common.h b/test/cache_common.h index e1d33f2..f76f47c 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -46,7 +46,7 @@ #define MONSTER_ENTRY_TYPE 8 #define VARIABLE_ENTRY_TYPE 9 -#define NUMBER_OF_ENTRY_TYPES 10 +#define NUMBER_OF_ENTRY_TYPES 10 #define PICO_ENTRY_SIZE (size_t)1 #define NANO_ENTRY_SIZE (size_t)4 @@ -124,7 +124,7 @@ #define FLUSH_OP__MAX_OP 3 #define MAX_FLUSH_OPS 10 /* Maximum number of flush operations - * that can be associated with a + * that can be associated with a * cache entry. */ @@ -151,29 +151,29 @@ typedef struct flush_op * function implementing the flush * operation. */ - hbool_t flag; /* boolean flag passed into the + hbool_t flag; /* boolean flag passed into the * function implementing the flush * operation. The meaning of the * flag is dependant upon the flush * operation: * - * FLUSH_OP__DIRTY: TRUE iff the - * target is pinned, and is to - * be dirtied via the + * FLUSH_OP__DIRTY: TRUE iff the + * target is pinned, and is to + * be dirtied via the * H5C_mark_pinned_entry_dirty() * call. * * FLUSH_OP__RESIZE: TRUE iff the - * target is pinned, and is to - * be resized via the + * target is pinned, and is to + * be resized via the * H5C_mark_pinned_entry_dirty() * call. * * FLUSH_OP__RENAME: TRUE iff the - * target is to be renamed to + * target is to be renamed to * its main address. */ - size_t size; /* New target size in the + size_t size; /* New target size in the * FLUSH_OP__RENAME operation. * Unused elsewhere. */ @@ -224,7 +224,7 @@ typedef struct test_entry_t hbool_t is_protected; /* entry should currently be on * the cache's protected list. */ - hbool_t is_read_only; /* TRUE iff the entry should be + hbool_t is_read_only; /* TRUE iff the entry should be * protected read only. */ int ro_ref_count; /* Number of outstanding read only @@ -250,14 +250,14 @@ typedef struct test_entry_t * entries pinned by this entry. */ int num_flush_ops; /* integer field containing the - * number of flush operations to - * be executed when the entry is + * number of flush operations to + * be executed when the entry is * flushed. This value must lie in - * the closed interval + * the closed interval * [0, MAX_FLUSH_OPS]. */ struct flush_op flush_ops[MAX_FLUSH_OPS]; /* Array of instances - * of struct flush_op detailing the + * of struct flush_op detailing the * flush operations (if any) that * are to be executed when the entry * is flushed from the cache. @@ -265,14 +265,14 @@ typedef struct test_entry_t * num_flush_ops contains the number * of valid entries in this array. */ - hbool_t flush_op_self_resize_in_progress; /* Boolean flag - * that is set to TRUE iff this + hbool_t flush_op_self_resize_in_progress; /* Boolean flag + * that is set to TRUE iff this * entry is being flushed, it has * been resized by a resize flush * op, and the flush function has * not yet returned, This field is - * used to turn off overactive santity - * checking code that would otherwise + * used to turn off overactive santity + * checking code that would otherwise * cause a false test failure. */ hbool_t loaded; /* entry has been loaded since the diff --git a/test/chunk_info.c b/test/chunk_info.c index 48db292..68bf774 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -34,17 +34,17 @@ int main( void ) { - + hid_t fid; /* file ID */ hid_t did; /* dataset ID */ hid_t f_sid; /* file space ID */ hid_t m_sid; /* memory space ID */ hid_t pid; /* property list ID */ hsize_t start[2]; /* chunk location to start writing */ - hsize_t dims[2] = { 4, 4}; + hsize_t dims[2] = { 4, 4}; hsize_t chunk_dims[2] = { 2, 2 }; - int chunk_data[2][2] = { {1, 1}, {1, 1} }; - int buf[4][4]; + int chunk_data[2][2] = { {1, 1}, {1, 1} }; + int buf[4][4]; int fillvalue = 0; int i, j, ii, jj; @@ -82,22 +82,22 @@ int main( void ) /* iterate in dim 0 */ for (j = 0; j < chunk_dims[0]; j++) { - + /* reset start in dim 1 */ start[1] = 0; - + /* iterate in dim 1 */ for (i = 0; i < chunk_dims[1]; i++) { - + /* select file hyperslab to save a 2x2 chunk */ if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, chunk_dims, NULL) < 0) TEST_ERROR; - + /* write the data to the hyperslab. */ - if (H5Dwrite(did, H5T_NATIVE_INT, m_sid, f_sid, H5P_DEFAULT, chunk_data) < 0) TEST_ERROR; - - /* read back and display complete dataset 4x4 */ - if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR; + if (H5Dwrite(did, H5T_NATIVE_INT, m_sid, f_sid, H5P_DEFAULT, chunk_data) < 0) TEST_ERROR; + + /* read back and display complete dataset 4x4 */ + if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR; #if defined (PRINT_DATA) @@ -108,14 +108,14 @@ int main( void ) printf("\n"); } #endif - - + + /* increment start in dim 1 */ start[1] += 2; - - + + } - + /* increment start in dim 0 */ start[0] += 2; } @@ -134,7 +134,7 @@ int main( void ) if (H5Fclose(fid) < 0) TEST_ERROR PASSED(); - + puts("All chunk info tests passed."); return 0; diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index a03d37e..c6ba30b 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -935,7 +935,7 @@ initialize_stype2(unsigned char *buf, const size_t num) * * Purpose: Initialize data buffer. * - * Return: Success: + * Return: Success: * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -1019,7 +1019,7 @@ initialize_stype4(unsigned char *buf, const size_t num) * * Return: Success: datatype ID * - * Failure: negative + * Failure: negative * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -1053,7 +1053,7 @@ create_stype1(void) H5Tinsert(tid, "k", HOFFSET(stype1, k), H5T_NATIVE_DOUBLE) < 0 || H5Tinsert(tid, "l", HOFFSET(stype1, l), H5T_NATIVE_DOUBLE) < 0 || H5Tinsert(tid, "m", HOFFSET(stype1, m), H5T_NATIVE_DOUBLE) < 0 || - H5Tinsert(tid, "n", HOFFSET(stype1, n), H5T_NATIVE_DOUBLE) < 0) + H5Tinsert(tid, "n", HOFFSET(stype1, n), H5T_NATIVE_DOUBLE) < 0) goto error; if(H5Tclose(array_dt1) < 0) @@ -1075,7 +1075,7 @@ error: * * Return: Success: datatype ID * - * Failure: negative + * Failure: negative * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -1134,7 +1134,7 @@ error: * * Return: Success: datatype ID * - * Failure: negative + * Failure: negative * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -1177,7 +1177,7 @@ error: * * Return: Success: datatype ID * - * Failure: negative + * Failure: negative * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -1239,7 +1239,7 @@ error: * * Return: Success: 0 * - * Failure: negative + * Failure: negative * * Programmer: Raymond Lu * Friday, 15 June 2007 @@ -1286,14 +1286,14 @@ compare_data(void *src_data, void *dst_data, hbool_t src_subset) printf(" i=%d\n", i); printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n", s_ptr->a, s_ptr->b, s_ptr->c[0], s_ptr->c[1], s_ptr->c[2], - s_ptr->c[3], s_ptr->c[4], s_ptr->c[5], s_ptr->c[6], s_ptr->c[7], + s_ptr->c[3], s_ptr->c[4], s_ptr->c[5], s_ptr->c[6], s_ptr->c[7], s_ptr->d, s_ptr->e, s_ptr->f, s_ptr->g,s_ptr->h[0],s_ptr->h[1],s_ptr->h[2], s_ptr->h[3],s_ptr->h[4],s_ptr->h[5],s_ptr->h[6],s_ptr->h[7],s_ptr->h[8], s_ptr->h[9],s_ptr->h[10],s_ptr->h[11],s_ptr->h[12],s_ptr->h[13],s_ptr->h[14], s_ptr->h[15], s_ptr->i,s_ptr->j,s_ptr->k,s_ptr->l,s_ptr->m,s_ptr->n); printf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d,%d,%d,%d,%d], d=%d, e=%d, f=%f, g=%f, h=[%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f], i=%f, j=%f, k=%f, l=%f, m=%f, n=%f}\n", d_ptr->a, d_ptr->b, d_ptr->c[0], d_ptr->c[1], d_ptr->c[2], - d_ptr->c[3], d_ptr->c[4], d_ptr->c[5], d_ptr->c[6], d_ptr->c[7], + d_ptr->c[3], d_ptr->c[4], d_ptr->c[5], d_ptr->c[6], d_ptr->c[7], d_ptr->d, d_ptr->e, d_ptr->f, d_ptr->g,d_ptr->h[0],d_ptr->h[1],d_ptr->h[2], d_ptr->h[3],d_ptr->h[4],d_ptr->h[5],d_ptr->h[6],d_ptr->h[7],d_ptr->h[8], d_ptr->h[9],d_ptr->h[10],d_ptr->h[11],d_ptr->h[12],d_ptr->h[13], @@ -1330,7 +1330,7 @@ error: * Failure: 1 * * Programmer: Raymond Lu - * Friday, 15 June 2007 + * Friday, 15 June 2007 * * Modifications: *------------------------------------------------------------------------- @@ -1338,7 +1338,7 @@ error: static int test_hdf5_src_subset(char *filename, hid_t fapl) { - hid_t file; + hid_t file; hid_t rew_tid, src_tid, dst_tid; hid_t dataset; hid_t space; @@ -1415,7 +1415,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) /* *###################################################################### - * STEP 2. Rewrite the data with a subset of original data type. + * STEP 2. Rewrite the data with a subset of original data type. */ TESTING("rewriting data with a subset of original data type"); @@ -1463,7 +1463,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0) FAIL_STACK_ERROR - if(compare_data(orig, rbuf, TRUE) < 0) + if(compare_data(orig, rbuf, TRUE) < 0) TEST_ERROR if(H5Dclose(dataset) < 0) @@ -1476,7 +1476,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl) if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0) FAIL_STACK_ERROR - if(compare_data(orig, rbuf, TRUE) < 0) + if(compare_data(orig, rbuf, TRUE) < 0) TEST_ERROR if(H5Dclose(dataset) < 0) @@ -1527,15 +1527,15 @@ error: * TYPE4 D; } * TYPE5 E; * }; - * This optimization is for the Chicago company. This test - * is in opposite of test_hdf5_src_subset. + * This optimization is for the Chicago company. This test + * is in opposite of test_hdf5_src_subset. * * Return: Success: 0 * * Failure: 1 * * Programmer: Raymond Lu - * Friday, 15 June 2007 + * Friday, 15 June 2007 * * Modifications: *------------------------------------------------------------------------- @@ -1543,7 +1543,7 @@ error: static int test_hdf5_dst_subset(char *filename, hid_t fapl) { - hid_t file; + hid_t file; hid_t rew_tid, src_tid, dst_tid; hid_t dataset; hid_t space; @@ -1619,7 +1619,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) /* *###################################################################### - * STEP 2. Rewrite the data with a subset of original data type. + * STEP 2. Rewrite the data with a subset of original data type. */ TESTING("rewriting data with a subset of original data type"); @@ -1667,7 +1667,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0) goto error; - if(compare_data(orig, rbuf, FALSE) < 0) + if(compare_data(orig, rbuf, FALSE) < 0) goto error; if(H5Dclose(dataset) < 0) @@ -1680,7 +1680,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0) goto error; - if(compare_data(orig, rbuf, FALSE) < 0) + if(compare_data(orig, rbuf, FALSE) < 0) goto error; if(H5Dclose(dataset) < 0) @@ -1721,12 +1721,12 @@ error: /*------------------------------------------------------------------------- * Function: main * - * Purpose: Test different cases of I/O for compound data and the + * Purpose: Test different cases of I/O for compound data and the * compound optimization for the Chicago company. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Raymond Lu * Friday, 15 June 2007 diff --git a/test/dsets.c b/test/dsets.c index d0b2098..b22ec27 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -1874,7 +1874,7 @@ error: *------------------------------------------------------------------------- */ static herr_t -test_filters(hid_t file, hid_t +test_filters(hid_t file, hid_t #ifndef H5_HAVE_FILTER_SZIP UNUSED #endif /* H5_HAVE_FILTER_SZIP */ @@ -5368,7 +5368,7 @@ test_set_local(hid_t fapl) /* Check that the values read are the modified version of what was written */ for(i=0; i<dims[0]; i++) { for(j=0; j<dims[1]; j++) { - /* If the difference between two values is greater than 0.001%, they're + /* If the difference between two values is greater than 0.001%, they're * considered not equal. */ if(!DBL_REL_EQUAL(points_dbl[i][j],check_dbl[i][j],0.00001)) { H5_FAILED(); @@ -6606,7 +6606,7 @@ main(void) nerrors += (test_deprec(file) < 0 ? 1 : 0); #endif /* H5_NO_DEPRECATED_SYMBOLS */ nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0); - + if(H5Fclose(file) < 0) goto error; } /* end for */ diff --git a/test/dtransform.c b/test/dtransform.c index b1bca24..c5a4fa8 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -236,7 +236,7 @@ int main(void) const char* polynomial = "(2+x)* ((x-8)/2)"; /* inverses the utrans transform in init_test to get back original array */ const char* utrans_inv = "(x/3)*4 - 100"; - + if((file_id = H5Fcreate("dtransform.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; if((dxpl_id_c_to_f = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; @@ -311,7 +311,7 @@ int main(void) TEST_TYPE_CHUNK(dxpl_id_c_to_f, long double, H5T_NATIVE_LDOUBLE, "ldouble", windchillFfloat, 1); #endif - if(test_copy(dxpl_id_c_to_f_copy, dxpl_id_polynomial_copy) < 0) TEST_ERROR; + if(test_copy(dxpl_id_c_to_f_copy, dxpl_id_polynomial_copy) < 0) TEST_ERROR; if(test_trivial(dxpl_id_simple) < 0) TEST_ERROR; if(test_poly(dxpl_id_polynomial) < 0) TEST_ERROR; if(test_getset(dxpl_id_c_to_f) < 0) TEST_ERROR; diff --git a/test/dtypes.c b/test/dtypes.c index f7802ed..4009d8c 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2308,7 +2308,7 @@ test_compound_13(void) TESTING("compound datatypes of boundary size with latest format"); - /* Create some phony data. */ + /* Create some phony data. */ for(u = 0; u < COMPOUND13_ARRAY_SIZE + 1; u++) data_out.x[u] = u; data_out.y = 99.99; @@ -2338,7 +2338,7 @@ test_compound_13(void) /* Write some data. */ if(H5Awrite(attid, typeid, &data_out) < 0) FAIL_STACK_ERROR - + /* Release all resources. */ if(H5Aclose(attid) < 0) FAIL_STACK_ERROR if(H5Tclose(array1_tid) < 0) FAIL_STACK_ERROR @@ -4637,7 +4637,7 @@ test_latest(void) if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR new_dtype_oh_size = oi.hdr.space.total; - + /* Check that the new format is smaller than the old format */ if(old_dtype_oh_size <= new_dtype_oh_size) TEST_ERROR diff --git a/test/earray.c b/test/earray.c index 0663252..199d213 100644 --- a/test/earray.c +++ b/test/earray.c @@ -100,7 +100,7 @@ h5_stat_size_t empty_size_g; /*------------------------------------------------------------------------- * Function: init_cparam * - * Purpose: Initialize array creation parameter structure + * Purpose: Initialize array creation parameter structure * * Return: Success: 0 * Failure: -1 @@ -271,7 +271,7 @@ error: *------------------------------------------------------------------------- */ static int -create_array(H5F_t *f, hid_t dxpl, const H5EA_create_t *cparam, +create_array(H5F_t *f, hid_t dxpl, const H5EA_create_t *cparam, H5EA_t **ea, haddr_t *ea_addr) { hsize_t nelmts; /* Number of elements in array */ @@ -1115,7 +1115,7 @@ main(void) if(NULL == (envval = HDgetenv("HDF5_DRIVER"))) envval = "nomatch"; - if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && + if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { /* Set the filename to use for this test (dependent on fapl) */ h5_fixname(FILENAME[0], fapl, filename_g, sizeof(filename_g)); diff --git a/test/enum.c b/test/enum.c index e40965c..3196195 100644 --- a/test/enum.c +++ b/test/enum.c @@ -216,7 +216,7 @@ test_tr1(hid_t file) TESTING("O(1) conversions"); envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "split")) { if((cwg = H5Gcreate2(file, "test_tr1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -309,7 +309,7 @@ test_tr2(hid_t file) TESTING("O(log N) converions"); envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "split")) { if((cwg = H5Gcreate2(file, "test_tr2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR diff --git a/test/extend.c b/test/extend.c index 2248b5d..f5b0f2e 100644 --- a/test/extend.c +++ b/test/extend.c @@ -254,7 +254,7 @@ main (void) const char *envval = NULL; envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "split")) { h5_reset(); diff --git a/test/external.c b/test/external.c index 6820543..8524e72 100644 --- a/test/external.c +++ b/test/external.c @@ -612,7 +612,7 @@ test_2 (hid_t fapl) int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f}; TESTING("read external dataset"); - + /* Write the data to external files directly */ for (i=0; i<4; i++) { for (j=0; j<25; j++) { @@ -899,7 +899,7 @@ test_4 (hid_t fapl) goto error; PASSED(); - } else + } else SKIPPED(); return 0; diff --git a/test/fheap.c b/test/fheap.c index 2b7dc1e..34c44ff 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -15785,12 +15785,12 @@ main(void) if(envval == NULL) envval = "nomatch"; - /* This test case with Direct driver has a poor performance on - * NCSA copper, though it works. Skip it if the express mode is set on - * and worry about the performance later. + /* This test case with Direct driver has a poor performance on + * NCSA copper, though it works. Skip it if the express mode is set on + * and worry about the performance later. */ - if((HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && - HDstrcmp(envval, "family") && HDstrcmp(envval, "stdio")) && + if((HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && + HDstrcmp(envval, "family") && HDstrcmp(envval, "stdio")) && !(!HDstrcmp(envval, "direct") && (ExpressMode > 1))) { diff --git a/test/fillval.c b/test/fillval.c index e92872a..f0ee9ba 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1529,7 +1529,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Create dataspace describing memory buffer */ if((mspace = H5Screate_simple(5, hs_size, hs_size)) < 0) TEST_ERROR - /* Select elements within file dataspace */ + /* Select elements within file dataspace */ if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride, hs_size, NULL) < 0) TEST_ERROR /* Write to all even data locations */ @@ -1721,7 +1721,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Verify the element read in is the value written out */ if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, buf) < 0) TEST_ERROR - + /* Set the element back to fillval */ if(H5Dwrite(dset, dtype, mspace, fspace, H5P_DEFAULT, fillval) < 0) TEST_ERROR @@ -2112,7 +2112,7 @@ main(int argc, char *argv[]) const char *envval = NULL; envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1; diff --git a/test/flush1.c b/test/flush1.c index 97ddf76..d9a55ed 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -52,7 +52,7 @@ static double the_data[100][100]; */ static hid_t create_file(char* name, hid_t fapl) -{ +{ hid_t file, dcpl, space, dset, groups, grp; hsize_t ds_size[2] = {100, 100}; hsize_t ch_size[2] = {5, 5}; @@ -110,7 +110,7 @@ error: */ static hid_t extend_file(hid_t file) -{ +{ hid_t dcpl, space, dset; hsize_t ds_size[2] = {100, 100}; hsize_t ch_size[2] = {5, 5}; @@ -162,7 +162,7 @@ error: * Sept. 26, 2006, expand test to check for failure if H5Fflush is not called. * Oct. 4 2006, expand test to check for partial failure in case file is flushed, but then * new datasets are created after the flush. - * + * * *------------------------------------------------------------------------- */ @@ -178,7 +178,7 @@ main(void) TESTING("H5Fflush (part1)"); envval = HDgetenv("HDF5_DRIVER"); - if (envval == NULL) + if (envval == NULL) envval = "nomatch"; if (HDstrcmp(envval, "split")) { /* Create the file */ @@ -194,7 +194,7 @@ main(void) if(H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) goto error; /* Add a bit to the file and don't flush the new part */ extend_file(file); - + /* Create the other file which will not be flushed */ h5_fixname(FILENAME[1], fapl, name, sizeof name); file = create_file(name, fapl); diff --git a/test/flush2.c b/test/flush2.c index 5ec5300..0304406 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -50,7 +50,7 @@ static double the_data[100][100]; */ static int check_dset(hid_t file, const char* name) -{ +{ hid_t space, dset; hsize_t ds_size[2] = {100, 100}; double error; @@ -122,7 +122,7 @@ check_file(char* filename, hid_t fapl, int flag) if(H5Gclose(grp) < 0) goto error; } /* end for */ - /* Check to see if that last added dataset in the third file is accessible + /* Check to see if that last added dataset in the third file is accessible * (it shouldn't be...but it might. Flag an error in case it is for now */ if(flag && check_dset(file, "dset2")) goto error; @@ -180,8 +180,8 @@ main(void) } else PASSED(); - - + + /* Check the case where the file was not flushed. This should give an error * so we turn off the error stack temporarily */ TESTING("H5Fflush (part2 without flush)"); @@ -229,7 +229,7 @@ main(void) } H5Eset_auto2(H5E_DEFAULT, func, NULL); - + h5_cleanup(FILENAME, fapl); } else diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c index 08a25cc..a1312d2 100644 --- a/test/gen_udlinks.c +++ b/test/gen_udlinks.c @@ -22,9 +22,9 @@ * They will be named according to the platform and should * be placed in the hdf5/test directory so that the links test can use them. * - * Note: The be_extlink2.h5 is also used by external.c to test opening + * Note: The be_extlink2.h5 is also used by external.c to test opening * external link twice. -SLU 2007/11/7 - * + * */ #include "hdf5.h" diff --git a/test/getname.c b/test/getname.c index 954790f..2d19d33 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2401,7 +2401,7 @@ test_obj_ref(hid_t fapl) FAIL_STACK_ERROR if(H5Dclose(dataset) < 0) FAIL_STACK_ERROR - + /* Create a dataset(inside Group1) */ if((dataset = H5Dcreate2(group, "Dataset1", H5T_STD_U32LE, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -2421,11 +2421,11 @@ test_obj_ref(hid_t fapl) /* Create another dataset(inside Group1) */ if((dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - + /* Close Dataset */ if(H5Dclose(dataset) < 0) FAIL_STACK_ERROR - + /* Create a datatype to refer to */ if((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0) FAIL_STACK_ERROR @@ -2448,19 +2448,19 @@ test_obj_ref(hid_t fapl) /* Create a new group in group1 */ if((group2 = H5Gcreate2(group, "Group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - + /* Create a hard link to group1 in group2 */ if(H5Lcreate_hard(fid1, "/Group1", H5L_SAME_LOC, "/Group1/Group2/Link", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - + /* Create dataset in that group */ if((dataset = H5Dcreate2(group2, "Dataset4", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - + /* Close Dataset */ if(H5Dclose(dataset) < 0) FAIL_STACK_ERROR - + /* Close group */ if(H5Gclose(group) < 0) FAIL_STACK_ERROR @@ -2498,7 +2498,7 @@ test_obj_ref(hid_t fapl) /* Create reference to named datatype */ if(H5Rcreate(&wbuf[3], fid1, "/Group1/Datatype1", H5R_OBJECT, -1) < 0) FAIL_STACK_ERROR - + if(H5Rcreate(&wbuf[4], fid1, "/Group1/Group2/Dataset4", H5R_OBJECT, -1) < 0) FAIL_STACK_ERROR if(H5Rcreate(&wbuf[5], fid1, "/Group1/Group2", H5R_OBJECT, -1) < 0) @@ -2514,7 +2514,7 @@ test_obj_ref(hid_t fapl) if(H5Dwrite(dataset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) FAIL_STACK_ERROR - TESTING("getting path to normal dataset in root group"); + TESTING("getting path to normal dataset in root group"); if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[0])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); @@ -2526,7 +2526,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to dataset in /Group1"); + TESTING("getting path to dataset in /Group1"); if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[1])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); @@ -2538,7 +2538,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to /Group1"); + TESTING("getting path to /Group1"); if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[2])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(group, (char*)buf, sizeof(buf)); @@ -2550,7 +2550,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to datatype in /Group1"); + TESTING("getting path to datatype in /Group1"); if((tid1 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[3])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(tid1, (char*)buf, sizeof(buf)); @@ -2562,7 +2562,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to dataset in nested group"); + TESTING("getting path to dataset in nested group"); if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); @@ -2574,7 +2574,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to nested group"); + TESTING("getting path to nested group"); if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[5])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(group, (char*)buf, sizeof(buf)); @@ -2586,7 +2586,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to dataset created via hard link"); + TESTING("getting path to dataset created via hard link"); if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[6])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); @@ -2598,7 +2598,7 @@ test_obj_ref(hid_t fapl) PASSED() HDmemset(buf, 0, sizeof(buf)); - TESTING("getting path to root group"); + TESTING("getting path to root group"); if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[7])) < 0) FAIL_STACK_ERROR *buf = '\0'; i = H5Iget_name(group, (char*)buf, sizeof(buf)); @@ -2629,8 +2629,8 @@ test_obj_ref(hid_t fapl) FAIL_STACK_ERROR if(H5Ldelete(fid1, "/Group1/Dataset2", H5P_DEFAULT) < 0) FAIL_STACK_ERROR - - TESTING("getting path to dataset that has been unlinked"); + + TESTING("getting path to dataset that has been unlinked"); *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR @@ -2639,15 +2639,15 @@ test_obj_ref(hid_t fapl) i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf)); if(i != 0) TEST_ERROR PASSED() - + /* Close disk dataspace */ if(H5Sclose(sid1) < 0) FAIL_STACK_ERROR - + /* Close Dataset */ if(H5Dclose(dataset) < 0) FAIL_STACK_ERROR - + /* Close file */ if(H5Fclose(fid1) < 0) FAIL_STACK_ERROR @@ -2666,8 +2666,8 @@ test_reg_ref(hid_t fapl) char filename1[1024]; hid_t file_id; /* file identifier */ hid_t dsetv_id; /*dataset identifiers*/ - hid_t dsetr_id; - hid_t space_id, spacer_id; + hid_t dsetr_id; + hid_t space_id, spacer_id; hsize_t dims[2] = {2,9}; hsize_t dimsr[1] = {2}; int rank = 2; @@ -2713,8 +2713,8 @@ test_reg_ref(hid_t fapl) /* * Create a reference to the hyperslab. */ - start[0] = 0; - start[1] = 3; + start[0] = 0; + start[1] = 3; count[0] = 2; count[1] = 3; if((status = H5Sselect_hyperslab(space_id,H5S_SELECT_SET,start,NULL,count,NULL)) < 0) @@ -2760,7 +2760,7 @@ test_reg_ref(hid_t fapl) TESTING("H5Rget_name to get name from region reference(hyperslab)"); *buf1 = '\0'; name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char*)buf1, NAME_BUF_SIZE); - if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR + if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR PASSED() TESTING("H5Iget_name to get name from region reference(hyperslab)"); @@ -2770,7 +2770,7 @@ test_reg_ref(hid_t fapl) /* Get name of the dataset the first region reference points using H5Iget_name */ *buf2 = '\0'; - name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE); + name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE); if(!((HDstrcmp(buf2, "/MATRIX") == 0) &&(name_size2 == 7))) TEST_ERROR if((status = H5Dclose(dsetv_id)) < 0) TEST_ERROR @@ -2780,7 +2780,7 @@ test_reg_ref(hid_t fapl) /* Get name of the dataset the second region reference points to using H5Rget_name */ TESTING("H5Rget_name to get name from region reference(pnt selec)"); *buf1 = '\0'; - name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char*)buf1, NAME_BUF_SIZE); + name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char*)buf1, NAME_BUF_SIZE); if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR PASSED() @@ -2791,7 +2791,7 @@ test_reg_ref(hid_t fapl) /* Get name of the dataset the first region reference points using H5Iget_name */ *buf2 = '\0'; - name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE); + name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE); if(!((HDstrcmp(buf2, "/MATRIX") == 0) &&(name_size2 == 7))) TEST_ERROR if((status = H5Dclose(dsetv_id)) < 0) TEST_ERROR @@ -2802,7 +2802,7 @@ test_reg_ref(hid_t fapl) TEST_ERROR if((status = H5Fclose(file_id)) < 0) TEST_ERROR - + return 0; error: diff --git a/test/h5test.h b/test/h5test.h index 4add74c..04c664e 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -120,12 +120,12 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */ /* * The methods to compare the equality of floating-point values: - * 1. XXX_ABS_EQUAL - check if the difference is smaller than the + * 1. XXX_ABS_EQUAL - check if the difference is smaller than the * Epsilon value. The Epsilon values, FLT_EPSILON, DBL_EPSILON, * and LDBL_EPSILON, are defined by compiler in float.h. * 2. XXX_REL_EQUAL - check if the relative difference is smaller than a * predefined value M. See if two values are relatively equal. - * It's the test's responsibility not to pass in the value 0, which + * It's the test's responsibility not to pass in the value 0, which * may cause the equation to fail. */ #define FLT_ABS_EQUAL(X,Y) ((float)fabs(X-Y)<FLT_EPSILON) diff --git a/test/hyperslab.c b/test/hyperslab.c index 89dbc5c..194c0f6 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -666,7 +666,7 @@ test_multifill(size_t nx) sprintf(s, "bad dst[%lu].left", (unsigned long)i); } else if (!DBL_ABS_EQUAL(dst[i].mid, fill.mid)) { /* Check if two DOUBLE values are equal. If their difference - * is smaller than the EPSILON value for double, they are + * is smaller than the EPSILON value for double, they are * considered equal. See the definition in h5test.h. */ sprintf(s, "bad dst[%lu].mid", (unsigned long)i); diff --git a/test/links.c b/test/links.c index c49d966..f471815 100644 --- a/test/links.c +++ b/test/links.c @@ -65,13 +65,13 @@ const char *FILENAME[] = { "extlinks9", /* 27: */ "tmp/extlinks9", /* 28: */ "extlinks10", /* 29: */ /* TESTS for windows */ - "tmp/extlinks10", /* 30: */ - "tmp/extlinks11", /* 31: */ - "tmp/extlinks12", /* 32: */ + "tmp/extlinks10", /* 30: */ + "tmp/extlinks11", /* 31: */ + "tmp/extlinks12", /* 32: */ "extlinks13", /* 33: */ - "tmp/extlinks13", /* 34: */ - "tmp/extlinks14", /* 35: */ - "tmp/extlinks15", /* 36: */ + "tmp/extlinks13", /* 34: */ + "tmp/extlinks14", /* 35: */ + "tmp/extlinks15", /* 36: */ NULL }; @@ -1746,7 +1746,7 @@ external_link_root(hid_t fapl, hbool_t new_format) /* Close external object (lets first file close) */ if(H5Gclose(gid) < 0) TEST_ERROR - /* Create a new object using H5Gcreate2 through the external link + /* Create a new object using H5Gcreate2 through the external link * directly */ if((gid = H5Gcreate2(fid, "ext_link/newer_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -1754,7 +1754,7 @@ external_link_root(hid_t fapl, hbool_t new_format) /* Close file and group */ if(H5Gclose(gid) < 0) TEST_ERROR if(H5Fclose(fid) < 0) TEST_ERROR - + /* Open first file again with read-only access and check on objects created */ if((fid = H5Fopen(filename1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR @@ -2052,10 +2052,10 @@ external_link_mult(hid_t fapl, hbool_t new_format) if((fid2 = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR if(H5Fclose(fid2) < 0) TEST_ERROR - /* Open the other with write access and delete the external link in it */ + /* Open the other with write access and delete the external link in it */ if((fid2 = H5Fopen(filename3, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR if(H5Ldelete(fid2, "G/H/I", H5P_DEFAULT) < 0) TEST_ERROR - + if(H5Fclose(fid2) < 0) TEST_ERROR /* Cleanup */ @@ -2192,7 +2192,7 @@ external_link_self(hid_t fapl, hbool_t new_format) if((fid=H5Fopen(filename2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) TEST_ERROR if((gid = H5Gopen2(fid, "ext_link/B/C/Y/Z/end", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - + /* Create object through external link */ if((gid2 = H5Gcreate2(gid, "newer_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -2209,7 +2209,7 @@ external_link_self(hid_t fapl, hbool_t new_format) /* Cleanup */ if(H5Gclose(gid) < 0) TEST_ERROR if(H5Fclose(fid) < 0) TEST_ERROR - + PASSED(); return 0; @@ -2587,15 +2587,15 @@ external_link_dangling(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_env: test 1 * - * Purpose: + * Purpose: * 1. target link: "extlinks1" * 2. main file: "extlinks0" * 3. target file: "tmp/extlinks1" * 4. The environment variable "HDF5_EXT_PREFIX" should be set to ".:tmp" - * Should be able to access the target file in tmp directory through searching + * Should be able to access the target file in tmp directory through searching * the pathnames set in HDF5_EXT_PREFIX. * This test will be skipped if HDF5_EXT_PREFIX is not set as expected. - * + * * * Return: Success: 0 * Failure: -1 @@ -2691,9 +2691,9 @@ external_link_env(hid_t fapl, hbool_t new_format) * 2. main file: "extlinks0" * 3. target file: "tmp/extlinks2" * 4. Set up external link prefix via H5Pset_elink_prefix() to be "tmp" - * Should be able to access the target file in tmp directory via the prefix set + * Should be able to access the target file in tmp directory via the prefix set * by H5Pset_elink_prefix() - * + * * * Return: Success: 0 * Failure: -1 @@ -2816,16 +2816,16 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format) /* set up name for external linked target file: "extlinks3" */ h5_fixname(FILENAME[18], fapl, filename2, sizeof filename2); /* set up name for target file: "tmp/extlinks3" */ - h5_fixname(FILENAME[19], fapl, filename3, sizeof filename3); + h5_fixname(FILENAME[19], fapl, filename3, sizeof filename3); /* create tmp directory and get current working directory path */ if ((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL)) TEST_ERROR - /* - * set up name for main file: + /* + * set up name for main file: * Linux: "/CWD/tmp/extlinks0" - * Window: "<cur drive>:/CWD/tmp/extlinks0" + * Window: "<cur drive>:/CWD/tmp/extlinks0" */ HDstrcpy(tmpname, cwdpath); HDstrcat(tmpname, "/"); @@ -2967,7 +2967,7 @@ external_link_rel_mainpath(hid_t fapl, hbool_t new_format) * 2. main file: Linux:"/CWD/tmp/extlinks0"; Window: "<cur drive>:/CWD/tmp/extlinks0" * 2. target file: "extlinks5" * Should be able to access the target file in the current working directory - * + * * * Return: Success: 0 * Failure: -1 @@ -3001,12 +3001,12 @@ external_link_cwd(hid_t fapl, hbool_t new_format) if ((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL)) TEST_ERROR - - /* - * set up name for main file: - * Linux: "/CWD/tmp/extlinks0" + + /* + * set up name for main file: + * Linux: "/CWD/tmp/extlinks0" * Windows: "<cur drive>:/CWD/tmp/extlinks0" - */ + */ HDstrcpy(tmpname, cwdpath); HDstrcat(tmpname, "/"); HDstrcat(tmpname, FILENAME[13]); @@ -3094,11 +3094,11 @@ external_link_abstar(hid_t fapl, hbool_t new_format) /* create tmp directory and get current working directory path */ if ((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL)) - TEST_ERROR - - /* - * set up name for external linked target file: - * Linux: "/CWD/tmp/extlinks6" + TEST_ERROR + + /* + * set up name for external linked target file: + * Linux: "/CWD/tmp/extlinks6" * Windows: "<cur drive>:/CWD/tmp/extlinks6" */ HDstrcpy(tmpname, cwdpath); @@ -3195,9 +3195,9 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format) if ((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL)) TEST_ERROR - /* - * set up name for external linked target file: - * Linux: "/CWD/tmp/extlinks7" + /* + * set up name for external linked target file: + * Linux: "/CWD/tmp/extlinks7" * Windows: "<cur drive>:/CWD/tmp/extlinks7" */ HDstrcpy(tmpname, cwdpath); @@ -3310,9 +3310,9 @@ external_link_reltar(hid_t fapl, hbool_t new_format) gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT); } H5E_END_TRY; - /* + /* * Should be able to find the target file from: - * main file's current working directory + pathname of external linked targetfile + * main file's current working directory + pathname of external linked targetfile */ if (gid < 0) { H5_FAILED(); @@ -3338,7 +3338,7 @@ external_link_reltar(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_chdir: test 9 * - * Purpose: + * Purpose: * 1. target link: "extlinks9" * 2. main file: "extlinks0" * 3. target file" "tmp/extlinks9" @@ -3405,8 +3405,8 @@ external_link_chdir(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (HDchdir("..") < 0) TEST_ERROR - - /* + + /* * Should be able to find the target file from: * main file's current working directory + pathname of external linked targetfile */ @@ -3438,7 +3438,7 @@ external_link_chdir(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_win1 * - * Purpose: + * Purpose: * 1. target link: "/CWD/tmp/extlinks10" * 2. main file: "extlinks0" * 3. target file: "extlinks10" @@ -3474,8 +3474,8 @@ external_link_win1(hid_t fapl, hbool_t new_format) h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1); if (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL) - TEST_ERROR - + TEST_ERROR + /* set up name for target link: "/CWD/tmp/extlinks10" */ HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */ HDstrcat(tmpname, "/"); @@ -3531,7 +3531,7 @@ external_link_win1(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_win2 * - * Purpose: + * Purpose: * 1. target link: "/CWD/tmp/extlinks11" * 2. main file: "extlinks0" * 3. target file: "tmp/extlinks11" @@ -3568,8 +3568,8 @@ external_link_win2(hid_t fapl, hbool_t new_format) /* create tmp directory and get current working directory path */ if ((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL)) - TEST_ERROR - + TEST_ERROR + /* set up name for target link: "/CWD/tmp/extlinks11" */ HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */ HDstrcat(tmpname, "/"); @@ -3625,7 +3625,7 @@ external_link_win2(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_win3 * - * Purpose: + * Purpose: * 1. target link: "<cur drive>:tmp/extlinks12" * 2. main file: "extlinks0" * 3. target file: "tmp/extlinks12" @@ -3717,7 +3717,7 @@ external_link_win3(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_win4 * - * Purpose: + * Purpose: * 1. target link: "<cur drive>:extlinks13" * 2. main file: "<cur-drive>:tmp/extlinks0" * 3. target file: tmp/extlinks13 @@ -3807,7 +3807,7 @@ external_link_win4(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_win5 * - * Purpose: + * Purpose: * 1. target link: "<cur drive+1>:tmp/extlinks14" * 2. main file: "/CWD/extlinks0" * 3. target file: "tmp/extlinks14" @@ -3841,7 +3841,7 @@ external_link_win5(hid_t fapl, hbool_t new_format) TESTING("external links via main file's rel drive/abs path (windows)") if (HDgetcwd(cwdpath, NAME_BUF_SIZE)==NULL) - TEST_ERROR + TEST_ERROR drive = HDgetdrive(); /* set up name for main file: "/CWD/extlinks0" */ @@ -3903,7 +3903,7 @@ external_link_win5(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- * Function: external_link_win6 * - * Purpose: + * Purpose: * 1. target link: "<cur drive+1>:tmp/extlinks15" * 2. main file: "extlinks0" * 3. target file: "tmp/extlinks15" @@ -4888,8 +4888,8 @@ external_link_closing(hid_t fapl, hbool_t new_format) /* Test that getting info works */ if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR /* Test move */ if(H5Lmove(fid1, "elink/elink/elink/group1", fid1, @@ -5654,7 +5654,7 @@ ud_link_reregister(hid_t fapl) if(H5Lunregister(UD_HARD_TYPE) < 0) FAIL_STACK_ERROR if(H5Lis_registered(UD_HARD_TYPE) != FALSE) FAIL_STACK_ERROR - + PASSED(); return 0; @@ -6573,9 +6573,9 @@ lapl_nlinks(hid_t fapl, hbool_t new_format) if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) TEST_ERROR nlinks = 20; - if(H5Pset_nlinks(gapl, nlinks) < 0) TEST_ERROR - if(H5Pset_nlinks(tapl, nlinks) < 0) TEST_ERROR - if(H5Pset_nlinks(dapl, nlinks) < 0) TEST_ERROR + if(H5Pset_nlinks(gapl, nlinks) < 0) TEST_ERROR + if(H5Pset_nlinks(tapl, nlinks) < 0) TEST_ERROR + if(H5Pset_nlinks(dapl, nlinks) < 0) TEST_ERROR /* We should now be able to use these property lists to open each kind * of object. @@ -6788,7 +6788,7 @@ build_visit_file(hid_t fapl) char *srcdir = getenv("srcdir"); /* where the src code is located */ h5_fixname(FILENAME[9], fapl, filename, sizeof filename); - + /* Create file for visiting */ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR @@ -9028,7 +9028,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr); op_data->ncalled++; /* Get the link information directly to compare */ - if(H5Lget_info(group_id, link_name, &my_info, H5P_DEFAULT) < 0) + if(H5Lget_info(group_id, link_name, &my_info, H5P_DEFAULT) < 0) return(H5_ITER_ERROR); /* Check more things for link iteration (vs. group iteration) */ @@ -9513,7 +9513,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr); op_data->ncalled++; /* Get the link information directly to compare */ - if(H5Lget_info(group_id, link_name, &my_info, H5P_DEFAULT) < 0) + if(H5Lget_info(group_id, link_name, &my_info, H5P_DEFAULT) < 0) return(H5_ITER_ERROR); /* Check more things for link iteration (vs. group iteration) */ @@ -11654,7 +11654,7 @@ main(void) const char *envval = NULL; envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { hid_t fapl, fapl2; /* File access property lists */ diff --git a/test/mount.c b/test/mount.c index c86c56b..4a9592f 100644 --- a/test/mount.c +++ b/test/mount.c @@ -4225,7 +4225,7 @@ main(void) const char *envval = NULL; envval = HDgetenv("HDF5_DRIVER"); - if (envval == NULL) + if (envval == NULL) envval = "nomatch"; if (HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) { h5_reset(); diff --git a/test/mtime.c b/test/mtime.c index 395b065..741f09a 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -85,7 +85,7 @@ main(void) if(H5Fclose(file) < 0) TEST_ERROR; /* - * Open the file and get the modification time. We'll test the + * Open the file and get the modification time. We'll test the * H5Oget_info() arguments too: being able to stat something without * knowing its name. */ diff --git a/test/ntypes.c b/test/ntypes.c index 4bbbf01..342aa5e 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -89,7 +89,7 @@ test_atomic_dtype(hid_t file) TESTING("atomic datatype"); envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) { /* Initialize the dataset */ @@ -1885,7 +1885,7 @@ test_refer_dtype(hid_t file) /* Output message about test being performed */ TESTING("reference datatype"); envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "multi")) { H5O_type_t obj_type; /* Object type */ diff --git a/test/objcopy.c b/test/objcopy.c index 6459519..653da96 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -126,7 +126,7 @@ static struct { /* Local function prototypes */ static int -compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, +compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, const void *buf1, const void *buf2, hid_t obj_owner); static int compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf); @@ -220,14 +220,14 @@ addr_reset(void) /*------------------------------------------------------------------------- - * Function: attach_ref_attr + * Function: attach_ref_attr * * Purpose: Create an attribute with object references * * Return: Non-negative on success/Negative on failure * * Programmer: Peter Cao - * Friday, August 4, 2006 + * Friday, August 4, 2006 * * Modifications: * @@ -281,7 +281,7 @@ error: /*------------------------------------------------------------------------- - * Function: attach_reg_ref_attr + * Function: attach_reg_ref_attr * * Purpose: Create an attribute with object references * @@ -358,14 +358,14 @@ error: /*------------------------------------------------------------------------- - * Function: create_reg_ref_dataset + * Function: create_reg_ref_dataset * * Purpose: Create a dataset with region references * * Return: Non-negative on success/Negative on failure * * Programmer: Peter Cao - * Friday, August 4, 2006 + * Friday, August 4, 2006 * * Modifications: * @@ -828,7 +828,7 @@ error: *------------------------------------------------------------------------- */ static int -compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, +compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, const void *buf1, const void *buf2, hid_t obj_owner) { size_t elmt_size; /* Size of an element */ @@ -1340,7 +1340,7 @@ HDassert(0 && "Unknown type of object"); if(linfo.u.val_size != linfo2.u.val_size) TEST_ERROR /* Compare link values */ - if(linfo.type == H5L_TYPE_SOFT || + if(linfo.type == H5L_TYPE_SOFT || (linfo.type >= H5L_TYPE_UD_MIN && linfo.type <= H5L_TYPE_MAX)) { char linkval[NAME_BUF_SIZE]; /* Link value */ char linkval2[NAME_BUF_SIZE]; /* Link value */ @@ -1361,7 +1361,7 @@ HDassert(0 && "Unknown type of link"); } /* end if */ /* Check if the attributes are equal */ - if(compare_std_attributes(gid, gid2, pid) != TRUE) TEST_ERROR + if(compare_std_attributes(gid, gid2, pid) != TRUE) TEST_ERROR /* Groups should be the same. :-) */ return TRUE; @@ -4369,7 +4369,7 @@ error: * Failure: number of errors * * Programmer: Peter Cao - * August 8, 2006 + * August 8, 2006 * * Modifications: * @@ -4520,7 +4520,7 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl) char objname[NAME_BUF_SIZE]; /* Sub-group & dataset name buffer */ char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; - + TESTING("H5Ocopy(): deep nested groups"); /* set initial data values */ @@ -7151,7 +7151,7 @@ int main(void) { const char *envval; - + /* Don't run this test using the core, split, or multi file drivers */ envval = HDgetenv("HDF5_DRIVER"); if(envval == NULL) @@ -7181,7 +7181,7 @@ main(void) /* Create an FCPL with sharing enabled */ if((fcpl_shared = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR if(H5Pset_shared_mesg_nindexes(fcpl_shared, 1) < 0) TEST_ERROR - if(H5Pset_shared_mesg_index(fcpl_shared, 0, H5O_SHMESG_ALL_FLAG, (size_t) 10) < 0) TEST_ERROR + if(H5Pset_shared_mesg_index(fcpl_shared, 0, H5O_SHMESG_ALL_FLAG, (size_t) 10) < 0) TEST_ERROR /* Test in all configurations */ for(configuration = 0; configuration <= MAX_CONFIGURATION; configuration++) { @@ -7254,10 +7254,10 @@ main(void) nerrors += test_copy_group_empty(fcpl_src, fcpl_dst, my_fapl); nerrors += test_copy_root_group(fcpl_src, fcpl_dst, my_fapl); nerrors += test_copy_group(fcpl_src, fcpl_dst, my_fapl); - if (ExpressMode > 1 && !HDstrcmp(envval, "direct")) { - /* This test case with Direct driver has a poor performance on - * NCSA copper, though it works. Skip it for now and worry - * about the performance later. + if (ExpressMode > 1 && !HDstrcmp(envval, "direct")) { + /* This test case with Direct driver has a poor performance on + * NCSA copper, though it works. Skip it for now and worry + * about the performance later. */ printf("***Express test mode on. test_copy_group_deep is skipped"); SKIPPED(); @@ -7274,19 +7274,19 @@ main(void) nerrors += test_copy_path(fcpl_src, fcpl_dst, my_fapl); nerrors += test_copy_same_file_named_datatype(fcpl_src, my_fapl); nerrors += test_copy_old_layout(fcpl_dst, my_fapl); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG, FALSE, "H5Ocopy(): without attributes"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, 0, TRUE, + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, 0, TRUE, "H5Ocopy(): with missing groups"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG, + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_SOFT_LINK_FLAG, FALSE, "H5Ocopy(): expand soft link"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG, + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Ocopy(): shallow group copy"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG, + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_EXPAND_REFERENCE_FLAG, FALSE, "H5Ocopy(): expand object reference"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_PRESERVE_NULL_FLAG, + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_PRESERVE_NULL_FLAG, FALSE, "H5Ocopy(): preserve NULL messages"); - nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG | + nerrors += test_copy_option(fcpl_src, fcpl_dst, my_fapl, H5O_COPY_WITHOUT_ATTR_FLAG | H5O_COPY_PRESERVE_NULL_FLAG, TRUE, "H5Ocopy(): preserve NULL messages"); /* TODO: not implemented diff --git a/test/ohdr.c b/test/ohdr.c index 0a25993..5d6542d 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -74,7 +74,7 @@ main(void) hbool_t b; /* Index for "new format" loop */ const char *envval = NULL; herr_t ret; /* Generic return value */ - + /* Reset library */ h5_reset(); fapl = h5_fileaccess(); @@ -175,7 +175,7 @@ main(void) */ TESTING("close & re-open object header"); envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "multi") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) { if(H5O_close(&oh_loc) < 0) @@ -260,7 +260,7 @@ main(void) /* Test reading datasets with undefined object header messages */ HDputs("Accessing objects with unknown header messages:"); envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) + if(envval == NULL) envval = "nomatch"; if(HDstrcmp(envval, "multi") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) { hid_t file2; /* File ID for 'bogus' object file */ diff --git a/test/reserved.c b/test/reserved.c index 583fd64..a6e8882 100755 --- a/test/reserved.c +++ b/test/reserved.c @@ -430,7 +430,7 @@ main(void) const char *envval = NULL; envval = HDgetenv("HDF5_DRIVER"); - if (envval == NULL) + if (envval == NULL) envval = "nomatch"; /* QAK: should be able to use the core driver? */ if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { diff --git a/test/tattr.c b/test/tattr.c index edaebf0..162c188 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -998,7 +998,7 @@ test_attr_scalar_read(hid_t fapl) if(!FLT_ABS_EQUAL(rdata, attr_data5)) printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n", "H5Aread", attr_data5, rdata, (int)__LINE__, __FILE__); - + /* Get the attribute's dataspace */ sid = H5Aget_space(attr); CHECK(sid, FAIL, "H5Aget_space"); @@ -1786,7 +1786,7 @@ test_attr_duplicate_ids(hid_t fapl) { hid_t fid1; /* HDF5 File IDs */ hid_t dataset; /* Dataset ID */ - hid_t gid1, gid2; /* Group ID */ + hid_t gid1, gid2; /* Group ID */ hid_t sid1,sid2; /* Dataspace ID */ hid_t attr, attr2; /* Attribute ID */ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; @@ -1811,7 +1811,7 @@ test_attr_duplicate_ids(hid_t fapl) CHECK(sid1, FAIL, "H5Screate_simple"); /* Create a dataset */ - dataset = H5Dcreate2(fid1, DSET1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, + dataset = H5Dcreate2(fid1, DSET1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(dataset, FAIL, "H5Dcreate2"); @@ -1824,7 +1824,7 @@ test_attr_duplicate_ids(hid_t fapl) CHECK(attr, FAIL, "H5Acreate2"); /* Open the attribute just created and get a second ID */ - attr2 = H5Aopen(dataset, ATTR1_NAME, H5P_DEFAULT); + attr2 = H5Aopen(dataset, ATTR1_NAME, H5P_DEFAULT); CHECK(attr2, FAIL, "H5Aopen"); /* Close attribute */ @@ -1844,7 +1844,7 @@ test_attr_duplicate_ids(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /*----------------------------------------------------------------------------------- - * Reopen the file and verify the fill value for attribute. Also write + * Reopen the file and verify the fill value for attribute. Also write * some real data. */ @@ -1951,7 +1951,7 @@ test_attr_duplicate_ids(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /*----------------------------------------------------------------------------------- - * Verify that the attribute being pointed to by different paths shares + * Verify that the attribute being pointed to by different paths shares * the same data. */ /* Open file */ @@ -1963,7 +1963,7 @@ test_attr_duplicate_ids(hid_t fapl) CHECK(gid1, FAIL, "H5Gcreate2"); /* Create hard link to the first group */ - ret = H5Lcreate_hard(gid1, GROUP1_NAME, H5L_SAME_LOC, GROUP2_NAME, H5P_DEFAULT, + ret = H5Lcreate_hard(gid1, GROUP1_NAME, H5L_SAME_LOC, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT); CHECK(ret, FAIL, "H5Lcreate_hard"); @@ -3003,7 +3003,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) { hid_t fid; /* HDF5 File ID */ hid_t dataset; /* Dataset ID */ - hid_t gid1, gid2; /* Group ID */ + hid_t gid1, gid2; /* Group ID */ hid_t sid, sid2; /* Dataspace ID */ hid_t attr, attr2, add_attr; /* Attribute ID */ hid_t dcpl; /* Dataset creation property list ID */ @@ -3096,7 +3096,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test"); /* Open the attribute just created and get a second ID */ - attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT); + attr2 = H5Aopen(dataset, attrname, H5P_DEFAULT); CHECK(attr2, FAIL, "H5Aopen"); /* Close attribute */ @@ -3105,7 +3105,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) ret = H5Aclose(attr2); CHECK(ret, FAIL, "H5Aclose"); - + /* Close Dataset */ ret = H5Dclose(dataset); CHECK(ret, FAIL, "H5Dclose"); @@ -3115,7 +3115,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /*----------------------------------------------------------------------------------- - * Reopen the file and verify the fill value for attribute. Also write + * Reopen the file and verify the fill value for attribute. Also write * some real data. */ /* Open file */ @@ -3141,7 +3141,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) /* Verify values read in */ for(i = 0; i < ATTR1_DIM1; i++) if(0 != read_data1[i]) - TestErrPrintf("%d: attribute data different: read_data1[%d]=%d\n", __LINE__, + TestErrPrintf("%d: attribute data different: read_data1[%d]=%d\n", __LINE__, i, read_data1[i]); /* Open attribute for the second time */ @@ -3230,7 +3230,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) /*----------------------------------------------------------------------------------- * Open the attribute by index. Verify the data is shared when the attribute - * is opened twice. + * is opened twice. */ /* Open file */ fid = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl); @@ -3245,12 +3245,12 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test"); /* Open first attribute for the dataset */ - attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, + attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Aopen"); /* Open attribute for the second time */ - attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, + attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)4, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Aopen"); @@ -3264,7 +3264,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) /* Verify values read in */ if(read_scalar != scalar_data) - TestErrPrintf("%d: attribute data different: read_scalar=%d, scalar_data=%d\n", + TestErrPrintf("%d: attribute data different: read_scalar=%d, scalar_data=%d\n", __LINE__, read_scalar, scalar_data); /* Close attribute */ @@ -3283,7 +3283,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /*----------------------------------------------------------------------------------- - * Open one attribute. As it remains open, delete some attributes. The + * Open one attribute. As it remains open, delete some attributes. The * attribute storage should switch from dense to compact. Then open the * same attribute for the second time and verify that the attribute data * is shared. @@ -3301,13 +3301,13 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test"); /* Open attribute of the dataset for the first time */ - attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, + attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Aopen"); /* Delete a few attributes until the storage switches to compact */ for(u = max_compact; u >= min_dense - 1; u--) { - ret = H5Adelete_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, + ret = H5Adelete_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, H5P_DEFAULT); CHECK(ret, FAIL, "H5Adelete_by_idx"); } @@ -3317,7 +3317,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test"); /* Open attribute for the second time */ - attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, + attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)2, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Aopen"); @@ -3331,7 +3331,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) /* Verify values read in */ if(read_scalar != scalar_data) - TestErrPrintf("%d: attribute data different: read_scalar=%d, scalar_data=%d\n", + TestErrPrintf("%d: attribute data different: read_scalar=%d, scalar_data=%d\n", __LINE__, read_scalar, scalar_data); /* Close attribute */ @@ -3350,7 +3350,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /*----------------------------------------------------------------------------------- - * Open one attribute. As it remains open, create some attributes. The + * Open one attribute. As it remains open, create some attributes. The * attribute storage should switch from compact to dense. Then open the * same attribute for the second time and verify that the attribute data * is shared. @@ -3368,7 +3368,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test"); /* Open attribute of the dataset for the first time */ - attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, + attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Aopen"); @@ -3393,7 +3393,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test"); /* Open attribute for the second time */ - attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, + attr2 = H5Aopen_by_idx(dataset, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)3, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr, FAIL, "H5Aopen"); @@ -3407,7 +3407,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) /* Verify values read in */ if(read_scalar != scalar_data) - TestErrPrintf("%d: attribute data different: read_scalar=%d, scalar_data=%d\n", + TestErrPrintf("%d: attribute data different: read_scalar=%d, scalar_data=%d\n", __LINE__, read_scalar, scalar_data); /* Close attribute */ @@ -3426,7 +3426,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /*----------------------------------------------------------------------------------- - * Verify that the attribute being pointed to by different paths shares + * Verify that the attribute being pointed to by different paths shares * the same data. */ /* Open file */ @@ -3438,7 +3438,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl) CHECK(gid1, FAIL, "H5Gcreate2"); /* Create hard link to the first group */ - ret = H5Lcreate_hard(gid1, GROUP1_NAME, H5L_SAME_LOC, GROUP2_NAME, H5P_DEFAULT, + ret = H5Lcreate_hard(gid1, GROUP1_NAME, H5L_SAME_LOC, GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT); CHECK(ret, FAIL, "H5Lcreate_hard"); @@ -9500,7 +9500,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl) ret = H5Gclose(gid); CHECK(ret, FAIL, "H5Gclose"); - + ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); @@ -9523,7 +9523,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl) /* Create attribute on first group */ aid = H5Acreate2(gid, ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid, FAIL, "H5Acreate2"); - + ret = H5Aclose(aid); CHECK(ret, FAIL, "H5Aclose"); @@ -9556,7 +9556,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl) /* Create another attribute on first group */ aid = H5Acreate2(gid, ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid, FAIL, "H5Acreate2"); - + ret = H5Aclose(aid); CHECK(ret, FAIL, "H5Aclose"); @@ -9582,7 +9582,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl) /* Re-create first attribute */ aid = H5Acreate2(gid, ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid, FAIL, "H5Acreate2"); - + ret = H5Aclose(aid); CHECK(ret, FAIL, "H5Aclose"); @@ -9593,7 +9593,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl) /* Re-create second attribute */ aid = H5Acreate2(gid, ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid, FAIL, "H5Acreate2"); - + ret = H5Aclose(aid); CHECK(ret, FAIL, "H5Aclose"); diff --git a/test/tcoords.c b/test/tcoords.c index 29b31c5..306c6b2 100644 --- a/test/tcoords.c +++ b/test/tcoords.c @@ -18,7 +18,7 @@ * Test program: tcoords * * Test the element coordinates for dataspace selection. For -* chunked dataset, when the hyperslab selection of some +* chunked dataset, when the hyperslab selection of some * dimensions is full, the library optimize it by "flattenning" * the fully selected dimensions. This program tests if the * coordinates of selected elements are correctly calculated. @@ -40,9 +40,9 @@ int da_buffer[2][3][6][2]; /*********************************************************** ** -** test_singleEnd_selElements(): Test element selection of only +** test_singleEnd_selElements(): Test element selection of only ** one block. -** +** *************************************************************/ static void test_singleEnd_selElements(hid_t file, hbool_t is_chunked) { @@ -53,7 +53,7 @@ static void test_singleEnd_selElements(hid_t file, hbool_t is_chunked) int i, j, k; hsize_t da_dims[4] = { 2, 3, 6, 2 }; hsize_t da_chunksize[4] = { 1, 3, 3, 2 }; - + /* For testing the full selection in the fastest-growing end */ int mem1_buffer[1][1][6][2]; hsize_t mem1_dims[4] = { 1, 1, 6, 2 }; @@ -139,7 +139,7 @@ static void test_singleEnd_selElements(hid_t file, hbool_t is_chunked) ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); - + /* ****** Case 1: ****** * Testing the full selection in the fastest-growing end */ did = H5Dopen2(file, dset_name, H5P_DEFAULT); @@ -251,7 +251,7 @@ static void test_singleEnd_selElements(hid_t file, hbool_t is_chunked) ** ** test_singleEnd_selHyperslab(): Test full hyperslab selection ** of only one block. -** +** *************************************************************/ static void test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked) { @@ -397,9 +397,9 @@ static void test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked) /*********************************************************** ** -** test_multiple_end(): Test full hyperslab selection of +** test_multiple_end(): Test full hyperslab selection of ** multiple blocks. -** +** *************************************************************/ static void test_multiple_ends(hid_t file, hbool_t is_chunked) { @@ -479,7 +479,7 @@ static void test_multiple_ends(hid_t file, hbool_t is_chunked) for(l=0; l<4; l++) for(m=0; m<2; m++) for(n=0; n<3; n++) - for(p=0; p<6; p++) { + for(p=0; p<6; p++) { data_buf[i][j][k][l][m][n][p][0] = i*1000000 + j*100000 + k*10000 + l*1000 + m*100 + n*10 + p; data_buf[i][j][k][l][m][n][p][1] = i*1000000 + j*100000 + k*10000 + l*1000 + m*100 + n*10 + p + 1; } @@ -620,7 +620,7 @@ static void test_multiple_ends(hid_t file, hbool_t is_chunked) /* ****** Case 5: ****** - * Testing the full selections in the fastest-growing end and the slowest-growing end, + * Testing the full selections in the fastest-growing end and the slowest-growing end, * and also in the middle dimensions */ did = H5Dopen2(file, dset_name, H5P_DEFAULT); CHECK(did, FAIL, "H5Dopen2"); diff --git a/test/th5o.c b/test/th5o.c index e6071e9..6091776 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -229,7 +229,7 @@ test_h5o_close(void) ret = H5Fclose(fid); CHECK(ret, FAIL, "H5Fclose"); } - + /**************************************************************** ** @@ -834,7 +834,7 @@ test_h5o_link(void) /* Read the data back */ ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); CHECK(ret, FAIL, "H5Dread"); - + /* Verify the data */ for(i = 0; i < TEST6_DIM1; i++) for(j = 0; j < TEST6_DIM2; j++) @@ -878,7 +878,7 @@ test_h5o_link(void) for(i = 0; i < TEST6_DIM1; i++) for(j = 0; j < TEST6_DIM2; j++) VERIFY(wdata[i][j], rdata[i][j], "H5Dread"); - + /* Close open IDs */ ret = H5Dclose(dset_id); CHECK(ret, FAIL, "H5Dclose"); diff --git a/test/tmisc.c b/test/tmisc.c index 7543ceb..746af5d 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -3989,7 +3989,7 @@ test_misc23(void) status = H5Tcommit2(group_id, "B13/C12/dtype", tmp_id, create_id, H5P_DEFAULT, access_id); CHECK(status, FAIL, "H5Tcommit2"); - + status = H5Tclose(tmp_id); CHECK(status, FAIL, "H5Tclose"); diff --git a/test/tsohm.c b/test/tsohm.c index e213d25..a586717 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -1072,7 +1072,7 @@ static void sohm_attr_helper(hid_t fcpl_id) attr_id = H5Acreate2(group_id, "attribute", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(attr_id, "H5Acreate2"); - + /* Open the attribute to get another handle */ attr_id2 = H5Aopen(group_id, "attribute", H5P_DEFAULT); CHECK_I(attr_id2, "H5Aopen"); @@ -1177,7 +1177,7 @@ static void test_sohm_attrs(void) sohm_attr_helper(fcpl_id); - + /* Run test with all three kinds of message shared */ 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"); @@ -1545,7 +1545,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size /* Get the file's size now */ if(x == 0) ret_sizes->first_dset = h5_get_file_size(FILENAME); - else + else ret_sizes->second_dset = h5_get_file_size(FILENAME); file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT); @@ -1978,7 +1978,7 @@ static void size2_verify(void) * function size2_helper. The test measures the size of the * file at various points. Once all of the files have been * generated, the test compares the measured sizes of the files. - * + * * * Programmer: James Laird * Friday, November 17, 2006 @@ -1998,7 +1998,7 @@ static void test_sohm_size2(int close_reopen) /* Sizes for files that don't share all kinds of messages */ size2_helper_struct share_some_med, share_some_btree; /* Sizes for files that share different sizes of messages */ - size2_helper_struct share_some_toobig_index, share_tiny_index, type_space_index; + size2_helper_struct share_some_toobig_index, share_tiny_index, type_space_index; herr_t ret; if(close_reopen == 0) @@ -2619,7 +2619,7 @@ static void delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id, CHECK_I(attr_id, "H5Acreate2"); /* Write to attribute */ - ret = H5Awrite(attr_id, H5T_NATIVE_CHAR, &wdata); + ret = H5Awrite(attr_id, H5T_NATIVE_CHAR, &wdata); CHECK_I(ret, "H5Awrite"); ret = H5Aclose(attr_id); @@ -3134,7 +3134,7 @@ static void test_sohm_extlink_helper(hid_t src_fcpl_id, hid_t dst_fcpl_id) dset_id = H5Dcreate2(src_file_id, "ext_link/dataset", H5T_NATIVE_FLOAT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(dset_id, "H5Dcreate2"); - /* Close the dataset and both files to make sure everything gets flushed + /* Close the dataset and both files to make sure everything gets flushed * out of memory */ ret = H5Dclose(dset_id); @@ -3785,7 +3785,7 @@ test_sohm_extend_dset(void) /**************************************************************** -** +** ** test_sohm(): Main Shared Object Header Message testing routine. ** ****************************************************************/ diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 7659a3e..b3d056f 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -169,10 +169,10 @@ void *tts_error_thread(void UNUSED *arg) int ret; /* preserve previous error stack handler */ - H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data); + H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data); /* set each thread's error stack handler */ - H5Eset_auto2(H5E_DEFAULT, error_callback, NULL); + H5Eset_auto2(H5E_DEFAULT, error_callback, NULL); /* define dataspace for dataset */ dimsf[0] = 1; @@ -198,7 +198,7 @@ void *tts_error_thread(void UNUSED *arg) assert(ret >= 0); /* turn our error stack handler off */ - H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data); + H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data); return NULL; } diff --git a/test/tvltypes.c b/test/tvltypes.c index 1ea0eaa..867d8d5 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -30,7 +30,7 @@ /* 1-D dataset with fixed dimensions */ #define SPACE1_RANK 1 -#define SPACE1_DIM1 4 +#define SPACE1_DIM1 4 /* 2-D dataset with fixed dimensions */ #define SPACE2_RANK 2 @@ -42,7 +42,7 @@ #define SPACE3_DIM1 128 #define L1_INCM 16 #define L2_INCM 8 -#define L3_INCM 3 +#define L3_INCM 3 /* 1-D dataset with fixed dimensions */ #define SPACE4_RANK 1 @@ -1159,7 +1159,7 @@ test_vltypes_compound_vlen_vlen(void) ** test_vltypes_compound_vlstr(): Test VL datatype code. ** Tests VL datatypes of compound datatypes with VL string. ** Dataset is extensible chunked, and data is rewritten with -** shorter VL data. +** shorter VL data. ** ****************************************************************/ static void @@ -2387,7 +2387,7 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void) /**************************************************************** ** -** test_vltypes_fill_value(): Test fill value for VL data. +** test_vltypes_fill_value(): Test fill value for VL data. ** One tests data space isn't allocated; another tests data ** space is allocated. ** @@ -2431,7 +2431,7 @@ test_vltypes_fill_value(void) hsize_t large_select_count[] = {SPACE4_DIM_LARGE / 2}; /* Count of large non-contiguous element selection */ hsize_t select_block[] = {1}; /* Block size of non-contiguous element selection */ hid_t dcpl_id, xfer_pid; - hid_t dset_id; + hid_t dset_id; hsize_t small_dims[] = {SPACE4_DIM_SMALL}; hsize_t large_dims[] = {SPACE4_DIM_LARGE}; size_t dset_elmts; /* Number of elements in a particular dataset */ @@ -156,7 +156,7 @@ test_direct(void) size_t fbsize; size_t cbsize; int *points, *check, *p1, *p2; - int wdata2[DSET2_DIM] = {11,12,13,14}; + int wdata2[DSET2_DIM] = {11,12,13,14}; int rdata2[DSET2_DIM]; int i, j, n; #endif /*H5_HAVE_DIRECT*/ @@ -183,7 +183,7 @@ test_direct(void) if(H5Pset_alignment(fapl, (hsize_t)THRESHOLD, (hsize_t)FBSIZE) < 0) TEST_ERROR; - + H5E_BEGIN_TRY { file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); } H5E_END_TRY; @@ -351,7 +351,7 @@ error: * Added test for H5Fget_filesize. * * Raymond Lu, 2006-11-30 - * Enabled the driver to read an existing file depending on + * Enabled the driver to read an existing file depending on * the setting of the backing_store and file open flags. *------------------------------------------------------------------------- */ @@ -408,7 +408,7 @@ test_core(void) TEST_ERROR; - /* Open the file with backing store off for read and write. + /* Open the file with backing store off for read and write. * Changes won't be saved in file. */ if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, FALSE) < 0) TEST_ERROR; @@ -468,7 +468,7 @@ test_core(void) if(H5Fclose(file) < 0) TEST_ERROR; - /* Open the file with backing store on for read and write. + /* Open the file with backing store on for read and write. * Changes will be saved in file. */ if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE) < 0) TEST_ERROR; @@ -943,7 +943,7 @@ test_multi(void) sprintf(sv[H5FD_MEM_BTREE], "%%s-%c.h5", 'b'); memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE]; memb_addr[H5FD_MEM_BTREE] = HADDR_MAX/4; - + sprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r'); memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW]; memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2; |