diff options
Diffstat (limited to 'test/cache2.c')
-rw-r--r-- | test/cache2.c | 1214 |
1 files changed, 607 insertions, 607 deletions
diff --git a/test/cache2.c b/test/cache2.c index b3dd0b5..4865ce8 100644 --- a/test/cache2.c +++ b/test/cache2.c @@ -339,7 +339,7 @@ smoke_check_1(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -444,7 +444,7 @@ smoke_check_2(void) /* do_mult_ro_protects */ TRUE, /* dirty_destroys */ dirty_destroys, /* dirty_unprotects */ dirty_unprotects); - + if ( show_progress ) /* 4 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); @@ -560,7 +560,7 @@ smoke_check_2(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -780,7 +780,7 @@ smoke_check_3(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -997,11 +997,11 @@ smoke_check_4(void) HDfprintf(stdout, "%s(): failure_mssg2 = \"%s\".\n", fcn_name, failure_mssg2); - } + } if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -1259,7 +1259,7 @@ smoke_check_5(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -1517,7 +1517,7 @@ smoke_check_6(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -1776,7 +1776,7 @@ smoke_check_7(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -2035,7 +2035,7 @@ smoke_check_8(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -2051,9 +2051,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 @@ -2371,7 +2371,7 @@ smoke_check_9(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -2387,9 +2387,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 @@ -2702,7 +2702,7 @@ smoke_check_10(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -2921,7 +2921,7 @@ write_permitted_check(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -2992,12 +2992,12 @@ check_insert_entry(void) HDfprintf(stdout, "%s: point = %d\n", fcn_name, point++); /* 0 */ } - /* 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.) */ @@ -3018,10 +3018,10 @@ check_insert_entry(void) if ( pass2 ) { insert_entry2(file_ptr, entry_type, 0, TRUE, H5C2__NO_FLAGS_SET); - insert_entry2(file_ptr, entry_type, 1, TRUE, + insert_entry2(file_ptr, entry_type, 1, TRUE, H5C2__SET_FLUSH_MARKER_FLAG); insert_entry2(file_ptr, entry_type, 2, TRUE, H5C2__PIN_ENTRY_FLAG); - insert_entry2(file_ptr, entry_type, 3, TRUE, + insert_entry2(file_ptr, entry_type, 3, TRUE, (H5C2__SET_FLUSH_MARKER_FLAG | H5C2__PIN_ENTRY_FLAG)); } @@ -3042,16 +3042,16 @@ check_insert_entry(void) /* Start by checking everything we can via H5C2_get_entry_status() */ if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3062,14 +3062,14 @@ check_insert_entry(void) } if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } - if ( pass2 ) { + if ( pass2 ) { /* check the universals */ - if ( ( ! in_cache ) || ( ! is_dirty ) || ( is_protected ) || + if ( ( ! in_cache ) || ( ! is_dirty ) || ( is_protected ) || ( entry_size != entry_sizes2[entry_type] ) ) { pass2 = FALSE; @@ -3078,7 +3078,7 @@ check_insert_entry(void) } if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3105,7 +3105,7 @@ check_insert_entry(void) } if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3131,7 +3131,7 @@ check_insert_entry(void) } if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3143,7 +3143,7 @@ check_insert_entry(void) search_ptr = cache_ptr->pel_head_ptr; while ( ( search_ptr != NULL ) && - ( search_ptr != + ( search_ptr != (struct H5C2_cache_entry_t *)entry_ptr ) ) { search_ptr = search_ptr->next; @@ -3158,7 +3158,7 @@ check_insert_entry(void) } if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3170,7 +3170,7 @@ check_insert_entry(void) search_ptr = cache_ptr->LRU_head_ptr; while ( ( search_ptr != NULL ) && - ( search_ptr != + ( search_ptr != (struct H5C2_cache_entry_t *)entry_ptr ) ) { search_ptr = search_ptr->next; @@ -3185,7 +3185,7 @@ check_insert_entry(void) } if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3198,7 +3198,7 @@ check_insert_entry(void) search_ptr = cache_ptr->dLRU_head_ptr; while ( ( search_ptr != NULL ) && - ( search_ptr != + ( search_ptr != (struct H5C2_cache_entry_t *)entry_ptr ) ) { search_ptr = search_ptr->aux_next; @@ -3214,7 +3214,7 @@ check_insert_entry(void) #endif /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ if ( show_progress ) { - HDfprintf(stdout, "%s:%d point = %d.%d\n", + HDfprintf(stdout, "%s:%d point = %d.%d\n", fcn_name, i, point, subpoint++); } @@ -3227,8 +3227,8 @@ check_insert_entry(void) HDfprintf(stdout, "%s: point = %d\n", fcn_name, point++); } - /* 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. */ @@ -3321,7 +3321,7 @@ check_insert_entry(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -3445,7 +3445,7 @@ check_flush_cache(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -3497,7 +3497,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C2__NO_FLAGS_SET); if ( result < 0 ) { @@ -5432,7 +5432,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -5684,7 +5684,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -5821,9 +5821,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_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. * @@ -5860,7 +5860,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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; @@ -5870,9 +5870,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -5900,7 +5900,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 1, /* entry_type = */ 0, /* entry_index = */ 1, @@ -5968,8 +5968,8 @@ check_flush_cache__flush_ops(H5F_t * file_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 = H5C2__FLUSH_INVALIDATE_FLAG; @@ -5978,9 +5978,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6008,7 +6008,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 1, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -6083,9 +6083,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6162,9 +6162,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6229,16 +6229,16 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* test #5 & #6 */ { /* Single entry test verifying that the cache can handle the case in - * which the call back function first resizes and then renames the + * which the call back function first resizes and then 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. * - * 10/8/07 -- JRM - * Added a resize operation to this test to satisfy the new + * 10/8/07 -- JRM + * Added a resize operation to this test to satisfy the new * requiremnt that any resize of an entry on flush will always - * be accompanied by a resize. Note that as a result, this + * be accompanied by a resize. Note that as a result, this * test becomes redundant with later tests. */ int test_num = 5; /* and 6 */ @@ -6248,9 +6248,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE; 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, @@ -6311,15 +6311,15 @@ check_flush_cache__flush_ops(H5F_t * file_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 ( pass2 ) { @@ -6343,20 +6343,20 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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. * - * 10/8/07 -- JRM - * Added a resize operation to this test to satisfy the new + * 10/8/07 -- JRM + * Added a resize operation to this test to satisfy the new * requiremnt that any resize of an entry on flush will always - * be accompanied by a resize. Note that as a result, this + * be accompanied by a resize. Note that as a result, this * test becomes redundant with later tests. */ int test_num = 7; /* and 8 */ @@ -6366,9 +6366,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) size_t init_expected_index_size = VARIABLE_ENTRY_SIZE; 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, @@ -6429,15 +6429,15 @@ check_flush_cache__flush_ops(H5F_t * file_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. */ @@ -6467,11 +6467,11 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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 = H5C2__NO_FLAGS_SET; @@ -6480,9 +6480,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6543,15 +6543,15 @@ check_flush_cache__flush_ops(H5F_t * file_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 ( pass2 ) { @@ -6579,11 +6579,11 @@ check_flush_cache__flush_ops(H5F_t * file_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 = H5C2__NO_FLAGS_SET; @@ -6592,9 +6592,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6655,15 +6655,15 @@ check_flush_cache__flush_ops(H5F_t * file_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 ( pass2 ) { @@ -6692,9 +6692,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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 @@ -6707,9 +6707,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6790,9 +6790,9 @@ check_flush_cache__flush_ops(H5F_t * file_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 @@ -6805,9 +6805,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6886,8 +6886,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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 @@ -6902,9 +6902,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -6985,8 +6985,8 @@ check_flush_cache__flush_ops(H5F_t * file_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 @@ -6999,9 +6999,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -7080,8 +7080,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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 @@ -7096,9 +7096,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -7161,7 +7161,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_destroyed = */ FALSE } }; - + check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, @@ -7174,12 +7174,12 @@ check_flush_cache__flush_ops(H5F_t * file_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 ( pass2 ) { @@ -7209,8 +7209,8 @@ check_flush_cache__flush_ops(H5F_t * file_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 @@ -7225,9 +7225,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -7303,12 +7303,12 @@ check_flush_cache__flush_ops(H5F_t * file_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 ( pass2 ) { @@ -7345,14 +7345,14 @@ check_flush_cache__flush_ops(H5F_t * file_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 * H5C2__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. */ @@ -7366,9 +7366,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -7396,7 +7396,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 1, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 11, @@ -7424,7 +7424,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ FALSE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -7452,7 +7452,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -7564,9 +7564,9 @@ check_flush_cache__flush_ops(H5F_t * file_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. @@ -7581,9 +7581,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -7611,7 +7611,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 1, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 11, @@ -7639,7 +7639,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -7667,7 +7667,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -7695,7 +7695,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ FALSE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 4, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 10, @@ -7723,7 +7723,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ FALSE }, - { + { /* entry_num = */ 5, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 20, @@ -7837,9 +7837,9 @@ check_flush_cache__flush_ops(H5F_t * file_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. @@ -7851,9 +7851,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -7881,7 +7881,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 1, /* entry_type = */ VARIABLE_ENTRY_TYPE, /* entry_index = */ 11, @@ -7909,7 +7909,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 0, @@ -7937,7 +7937,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 1, @@ -7965,7 +7965,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ FALSE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 4, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 10, @@ -7993,7 +7993,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) /* expected_flushed = */ TRUE, /* expected_destroyed = */ TRUE }, - { + { /* entry_num = */ 5, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 20, @@ -8117,9 +8117,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -8251,9 +8251,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -8373,22 +8373,22 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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 @@ -8455,9 +8455,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -8808,24 +8808,24 @@ check_flush_cache__flush_ops(H5F_t * file_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 @@ -8892,9 +8892,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -9244,7 +9244,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr) if ( pass2 ) /* 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; @@ -9254,9 +9254,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -9437,7 +9437,7 @@ check_flush_cache__flush_ops(H5F_t * file_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; @@ -9447,9 +9447,9 @@ check_flush_cache__flush_ops(H5F_t * file_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, @@ -9636,7 +9636,7 @@ check_flush_cache__flush_ops(H5F_t * file_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 @@ -9674,7 +9674,7 @@ check_flush_cache__flush_op_test(H5F_t * file_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 ) { @@ -9734,23 +9734,23 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, ( check[i].entry_index < 0 ) || ( check[i].entry_index > max_indices2[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_deserialized != TRUE ) && + ( ( check[i].expected_deserialized != TRUE ) && ( check[i].expected_deserialized != FALSE ) ) || - ( ( check[i].expected_cleared != TRUE ) && + ( ( check[i].expected_cleared != TRUE ) && ( check[i].expected_cleared != FALSE ) ) || - ( ( check[i].expected_serialized != TRUE ) && + ( ( check[i].expected_serialized != TRUE ) && ( check[i].expected_serialized != FALSE ) ) || - ( ( check[i].expected_destroyed != TRUE ) && + ( ( check[i].expected_destroyed != TRUE ) && ( check[i].expected_destroyed != FALSE ) ) ) { pass2 = FALSE; @@ -9790,7 +9790,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, for ( j = 0; j < spec[i].num_flush_ops; j++ ) { - add_flush_op2(spec[i].entry_type, + add_flush_op2(spec[i].entry_type, spec[i].entry_index, spec[i].flush_ops[j].op_code, spec[i].flush_ops[j].type, @@ -9818,7 +9818,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -9888,7 +9888,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, i = 0; while ( ( pass2 ) && ( i < check_size ) ) { - if ( check[i].in_cache != entry_in_cache2(cache_ptr, + if ( check[i].in_cache != entry_in_cache2(cache_ptr, check[i].entry_type, check[i].entry_index) ) { @@ -9918,7 +9918,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, ( entry_ptr->header.is_protected != check[i].is_protected ) || ( entry_ptr->is_pinned != check[i].is_pinned ) || ( entry_ptr->header.is_pinned != check[i].is_pinned ) || - ( entry_ptr->deserialized != + ( entry_ptr->deserialized != check[i].expected_deserialized ) || ( entry_ptr->cleared != check[i].expected_cleared ) || ( entry_ptr->serialized != check[i].expected_serialized ) || @@ -9938,7 +9938,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, ( entry_ptr->header.is_protected != check[i].is_protected ) || ( entry_ptr->is_pinned != check[i].is_pinned ) || ( entry_ptr->header.is_pinned != check[i].is_pinned ) || - ( entry_ptr->deserialized != + ( entry_ptr->deserialized != check[i].expected_deserialized ) || ( entry_ptr->cleared ) || ( entry_ptr->serialized != check[i].expected_serialized ) || @@ -9956,7 +9956,7 @@ check_flush_cache__flush_op_test(H5F_t * file_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)); @@ -9998,9 +9998,9 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, (int)(entry_ptr->header.is_pinned), (int)(check[i].is_pinned)); } - if ( entry_ptr->deserialized != + if ( entry_ptr->deserialized != check[i].expected_deserialized ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->deserialized (expected) = %d (%d).\n", (int)(entry_ptr->deserialized), (int)(check[i].expected_deserialized)); @@ -10011,7 +10011,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, (int)(check[i].expected_cleared)); } if ( entry_ptr->serialized != check[i].expected_serialized ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->serialized (expected) = %d (%d).\n", (int)(entry_ptr->serialized), (int)(check[i].expected_serialized)); @@ -10138,12 +10138,12 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, * Modifications: * * JRM -- 10/9/07 - * Modified test to accomodate changes in the cache API. + * Modified test to accomodate changes in the cache API. * In particular, since the cache is now reading and writing * its own entries, the serialize callback is not called on - * entry eviction unless the entry is dirty. + * entry eviction unless the entry is dirty. * - * This fact broke some basic assumptions of the test, and + * This fact broke some basic assumptions of the test, and * necessitated a substantial re-write. * *------------------------------------------------------------------------- @@ -10163,9 +10163,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) test_entry_t * base_addr; struct expected_entry_status expected[10 + 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 */ @@ -10256,9 +10256,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass2 ) { /* 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 @@ -10276,54 +10276,54 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) */ protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 0); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 0, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 0, H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 4)); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 1); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 1, - H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 1, + H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 4)); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 2); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 2, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 2, H5C2__NO_FLAGS_SET, (size_t)0); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 3); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 3, - H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 3, + H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 4)); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 4); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 4, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 4, H5C2__NO_FLAGS_SET, (size_t)0); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 5); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 5, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 5, H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 4)); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 6); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 6, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 6, H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 7); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 7, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 7, H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG, (VARIABLE_ENTRY_SIZE / 2)); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 8); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 8, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 8, H5C2__NO_FLAGS_SET, (size_t)0); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 9); - unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 9, + unprotect_entry_with_size_change2(file_ptr, VARIABLE_ENTRY_TYPE, 9, H5C2__NO_FLAGS_SET, (size_t)0); if ( ( cache_ptr->index_len != 10 ) || ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 4)) + - (2 * (VARIABLE_ENTRY_SIZE / 2)) + + (2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * VARIABLE_ENTRY_SIZE) ) ) { pass2 = FALSE; @@ -10333,7 +10333,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass2 ) { - /* Now set up the pinning relationships: + /* Now set up the pinning relationships: * * Briefly, (VET, 0) is pinned by (VET, 1), (VET, 3), and (VET, 5) * (VET, 9) is pinned by (VET, 5), and (VET, 7) @@ -10366,51 +10366,51 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 9) dirties (VET, 8) */ - add_flush_op2(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, + add_flush_op2(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op2(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, - VARIABLE_ENTRY_TYPE, 0, FALSE, + add_flush_op2(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, + VARIABLE_ENTRY_TYPE, 0, FALSE, 3 * VARIABLE_ENTRY_SIZE / 4); - add_flush_op2(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, + add_flush_op2(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op2(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, + add_flush_op2(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE); - add_flush_op2(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RENAME, + add_flush_op2(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RENAME, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op2(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, + add_flush_op2(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); - add_flush_op2(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, + add_flush_op2(VARIABLE_ENTRY_TYPE, 5, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 5, FALSE, VARIABLE_ENTRY_SIZE / 2); - add_flush_op2(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, + add_flush_op2(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 9, FALSE, (size_t)0); - add_flush_op2(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, + add_flush_op2(VARIABLE_ENTRY_TYPE, 9, FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 8, FALSE, (size_t)0); } if ( pass2 ) { - /* 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 2.5 KB Y Y - - * - * (VET, 1) Y 2.5 KB Y N 0 dirty (VET, 0), + * (VET, 1) Y 2.5 KB Y N 0 dirty (VET, 0), * resize (VET, 0) to 7.5 KB - * + * * (VET, 2) Y 10 KB N N - - * * * (VET, 3) Y 2.5 KB N N 0 dirty (VET, 0) * resize (VET, 0) to 10 KB * rename (VET, 0) to its alternate address - * + * * (VET, 4) Y 10 KB N N - - * * @@ -10422,11 +10422,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) Y 5 KB Y N 9 dirty (VET, 9) * * (VET, 8) Y 10 KB N N - - - * + * * (VET, 9) Y 10 KB N N - dirty (VET, 8) * - * 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. */ @@ -10434,14 +10434,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < 31; i++ ) { protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 1; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -10461,9 +10461,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* verify the expected status of all entries we have loaded to date: */ num_large_entries = 1; - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 0, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } } @@ -10471,8 +10471,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass2 ) { - /* Now load a large entry. This should result in the eviction - * of (VET,2), and the increase in the size of (VET, 0) from .25 + /* Now load a large entry. This should result in the eviction + * of (VET,2), and the increase in the size of (VET, 0) from .25 * VARIABLE_ENTRY_SIZE to .75 VARIABLE_ENTRY_SIZE. * * The following table illustrates the intended state of affairs @@ -10480,7 +10480,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * in * entry: cache? size: dirty? pinned? pins: flush operations: - * + * * (VET, 0) Y 7.5 KB Y Y - - * * (VET, 1) Y 2.5 KB N N - - @@ -10501,7 +10501,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) Y 5 KB Y N 9 dirty (VET, 9) * * (VET, 8) Y 10 KB N N - - - * + * * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: @@ -10515,7 +10515,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 2; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 1, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 1, H5C2__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 42 ) || @@ -10534,25 +10534,25 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 1, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { - /* Now load another large entry. This should result in the eviction + /* Now load another large entry. This should result in the eviction * of (VET, 4), 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) Y 2.5 KB N N - - @@ -10571,7 +10571,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) Y 5 KB Y N 9 dirty (VET, 9) * * (VET, 8) Y 10 KB N N - - - * + * * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: @@ -10586,7 +10586,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 3; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 2, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 2, H5C2__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 42 ) || @@ -10597,7 +10597,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) ( cache_ptr->index_size != ((3 * VARIABLE_ENTRY_SIZE / 4) + (2 * VARIABLE_ENTRY_SIZE / 2) + (3 * VARIABLE_ENTRY_SIZE) + - (31 * MONSTER_ENTRY_SIZE) + + (31 * MONSTER_ENTRY_SIZE) + (3 * LARGE_ENTRY_SIZE)) ) ) { pass2 = FALSE; @@ -10605,9 +10605,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 2, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } @@ -10617,17 +10617,17 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * flushed, and increasing its size from 1/4 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, 6) and (VET, 7), * it should evict (VET, 8), yielding the needed memory and dirtying * (VET, 9). * - * 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) Y 2.5 KB N N - - @@ -10645,7 +10645,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) Y 5 KB N N 9 - * * (VET, 8) N 10 KB N N - - - * + * * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: @@ -10665,11 +10665,11 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 5; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 3, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 3, H5C2__DIRTIED_FLAG, (size_t)0); protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 4); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 4, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, 4, H5C2__DIRTIED_FLAG, (size_t)0); /* verify cache size */ @@ -10690,16 +10690,16 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 3, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { /* 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, 9) @@ -10708,14 +10708,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < 31; i++ ) { protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 5; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -10737,24 +10737,24 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 4, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { /* Now load three more large entries. This should result - * in the evictions of (VET, 1), (VET, 3), and (VET, 5), and the + * in the evictions of (VET, 1), (VET, 3), and (VET, 5), 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 2.5 KB N N - - @@ -10772,7 +10772,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) Y 5 KB N N 9 - * * (VET, 8) N 10 KB N N - - - * + * * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: @@ -10791,7 +10791,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 5; i < 8; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -10812,9 +10812,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 5, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } @@ -10822,12 +10822,12 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* load another large entry. (VET, 6) 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 2.5 KB N N - - @@ -10845,7 +10845,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) Y 5 KB N N 9 - * * (VET, 8) N 10 KB N N - - - * + * * (VET, 9) Y 10 KB N Y - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: @@ -10859,7 +10859,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 8; i < 9; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -10879,24 +10879,24 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 6, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { - /* Load another large entry. + /* Load another large entry. * - * (VET, 7) should be evicted, and (VET, 9) should be unpinned. + * (VET, 7) should be evicted, and (VET, 9) 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 2.5 KB N N - - @@ -10914,7 +10914,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) N 5 KB N N - - * * (VET, 8) N 10 KB N N - - - * + * * (VET, 9) Y 10 KB Y N - dirty (VET, 8) * * Start by updating the expected table for the expected changes in entry status: @@ -10929,7 +10929,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 9; i < 10; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -10947,16 +10947,16 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 7, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { /* 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 @@ -10965,14 +10965,14 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 0; i < 31; i++ ) { protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 10; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -10990,62 +10990,62 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 8, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { - /* load two more large entries. Things get a bit complicated here, + /* load two more large entries. Things get a bit complicated here, * so I'll go through the operation step by step. * - * Initially, the cache has 4 KB of empty space, so the first entry - * (LET, 10) is loaded via calls to H5C2_protect() H5C2_unprotect() + * Initially, the cache has 4 KB of empty space, so the first entry + * (LET, 10) is loaded via calls to H5C2_protect() H5C2_unprotect() * without causing any evictions. * - * However, this is not the case for the call of H5C2_protect() on + * However, this is not the case for the call of H5C2_protect() on * (LET, 11). * - * Before inserting (LET, 11), H5C2_protect(LET, 11) must try to - * free up at least 4 KB of space. To do this, it starts scanning + * Before inserting (LET, 11), H5C2_protect(LET, 11) must try to + * free up at least 4 KB of space. To do this, it starts scanning * up the LRU list to find entries to evict. * - * (VET, 0) is at the bottom of the LRU list, and thus is the first - * entry considered. However, it is dirty, so it is moved to the + * (VET, 0) is at the bottom of the LRU list, and thus is the first + * entry considered. However, it is dirty, so it is moved to the * top of the LRU list, flushed to disk, and marked clean. * - * (VET, 9) is the next entry on the bottom of the LRU list. It is - * dirty too, so the cache moves it to the top of the LRU list, - * and calls its serialize callback function to construct an on + * (VET, 9) is the next entry on the bottom of the LRU list. It is + * dirty too, so the cache moves it to the top of the LRU list, + * and calls its serialize callback function to construct an on * disk image of the entry. * - * However, this serialize function needs to modify (VET, 8), which - * is currently not in cache. Thus it calls H5C2_protect(VET, 8) - * to gain access to it. H5C2_protect(VET, 8) loads (VET, 8), and - * then attempts to evict entries to make space for it. (VET, 9) - * has already been moved to the head of the LRU list, so the next - * entries on the LRU are (MET, 0) thru (MET, 30) and (LET, 0) thru - * (LET, 10) -- all of which are dirty, and are therefore flushed + * However, this serialize function needs to modify (VET, 8), which + * is currently not in cache. Thus it calls H5C2_protect(VET, 8) + * to gain access to it. H5C2_protect(VET, 8) loads (VET, 8), and + * then attempts to evict entries to make space for it. (VET, 9) + * has already been moved to the head of the LRU list, so the next + * entries on the LRU are (MET, 0) thru (MET, 30) and (LET, 0) thru + * (LET, 10) -- all of which are dirty, and are therefore flushed * and moved to the head of the LRU list. * - * The next entry on the bottom of the LRU list is (VET, 0), which - * is clean, and is therefore evicted to make space for (VET, 8). - * This space is sufficient, so H5C2_protect(VET, 8) inserts - * (VET, 8) into the cache's index, marks it as protected, and + * The next entry on the bottom of the LRU list is (VET, 0), which + * is clean, and is therefore evicted to make space for (VET, 8). + * This space is sufficient, so H5C2_protect(VET, 8) inserts + * (VET, 8) into the cache's index, marks it as protected, and * returns to the serialize function for (VET, 9). * - * When the serialize function for (VET, 9) is done with (VET, 8), it - * calls H5C2_unprotect(VET, 8), which markes (VET, 8) as dirty and + * When the serialize function for (VET, 9) is done with (VET, 8), it + * calls H5C2_unprotect(VET, 8), which markes (VET, 8) as dirty and * unprotected, and places it at the head of the LRU. * - * The serialize function for (VET, 9) then returns, and (VET, 9) is - * is written to disk, and marked clean. - * - * At this point, the cache is still full (since (VET, 8) took the - * space created by the eviction of (VET, 0)). Thus - * H5C2_protect(LET, 11) continues to look for space. While + * The serialize function for (VET, 9) then returns, and (VET, 9) is + * is written to disk, and marked clean. + * + * At this point, the cache is still full (since (VET, 8) took the + * space created by the eviction of (VET, 0)). Thus + * H5C2_protect(LET, 11) continues to look for space. While * (MET, 0) was the next item on the LRU list when it called the * serialize function for (VET, 9), the function notices that the * LRU has been modified, and restarts its search for candidates @@ -11053,18 +11053,18 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * * (VET, 0) is now at the bottom of the LRU, and is clean. Thus * it is evicted. This makes sufficient space for (LET, 11), so - * H5C2_protect(LET, 11) inserts it into the cache, marks it as - * protected, and returns. + * H5C2_protect(LET, 11) inserts it into the cache, marks it as + * protected, and returns. * * H5C2_unprotect(VET, 11) marks (VET, 11) as unprotected, and then * returns as well. * - * 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 2.5 KB N N - - @@ -11082,13 +11082,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) N 5 KB N N - - * * (VET, 8) Y 10 KB Y N - - - * + * * (VET, 9) N 10 KB N N - - * - * Start by updating the expected table for the expected changes in + * Start by updating the expected table for the expected changes in * entry status: * - * Note that we reset the loaded, cleared, flushed, and destroyed + * Note that we reset the loaded, cleared, flushed, and destroyed * fields of (VET,8) so we can track what is happening. */ base_addr = entries2[VARIABLE_ENTRY_TYPE]; @@ -11114,10 +11114,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 12; - /* a newly loaded entry is not inserted in the cache until after + /* 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++ ) { @@ -11128,7 +11128,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 10; i < 12; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -11146,34 +11146,34 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 9, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { /* 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_entry2(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, MONSTER_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < num_large_entries; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__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++ ) { @@ -11194,28 +11194,28 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 10, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } if ( pass2 ) { - - /* Load two more large entries. + + /* Load two more large entries. * - * Since (VET, 8) is dirty, at first this will just cause (VET, 8) + * Since (VET, 8) is dirty, at first this will just cause (VET, 8) * to be flushed. * - * But all other entries in the cache are dirty, so the cache will + * But all other entries in the cache are dirty, so the cache will * flush them all, and then evict (VET, 8) 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 2.5 KB N N - - @@ -11233,10 +11233,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) * (VET, 7) N 5 KB N N - - * * (VET, 8) N 10 KB N N - - - * + * * (VET, 9) N 10 KB N N - - * - * Start by updating the expected table for the expected changes in + * Start by updating the expected table for the expected changes in * entry status: */ @@ -11247,10 +11247,10 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 14; - /* a newly loaded entry is not inserted in the cache until after + /* 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++ ) { @@ -11261,7 +11261,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) for ( i = 12; i < 14; i++ ) { protect_entry2(file_ptr, LARGE_ENTRY_TYPE, i); - unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, + unprotect_entry_with_size_change2(file_ptr, LARGE_ENTRY_TYPE, i, H5C2__DIRTIED_FLAG, (size_t)0); } @@ -11278,13 +11278,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } /* verify entry status */ - verify_entry_status2(cache_ptr, + verify_entry_status2(cache_ptr, 11, - (num_variable_entries + num_monster_entries + num_large_entries), + (num_variable_entries + num_monster_entries + num_large_entries), expected); } - /* at this point we have cycled all the variable size entries through + /* at this point we have cycled all the variable size entries through * the cache. * * flush the cache and end the test. @@ -11309,12 +11309,12 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) } } -#if H5C2_COLLECT_CACHE_STATS +#if H5C2_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. */ @@ -13158,7 +13158,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -13199,7 +13199,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, (int)expected_serialized, (int)(entry_ptr->destroyed), (int)expected_destroyed); -#endif +#endif pass2 = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.", @@ -13376,7 +13376,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -13416,7 +13416,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, (int)expected_serialized, (int)(entry_ptr->destroyed), (int)expected_destroyed); -#endif +#endif pass2 = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in pinned single entry test #%d.", @@ -13700,7 +13700,7 @@ check_get_entry_status(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -13767,7 +13767,7 @@ check_expunge_entry(void) */ result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13834,12 +13834,12 @@ 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. * * JRM -- 10/15/07 * With the advent of the new cache API, the old clear() callback has - * been replaced with the new clear_dirty_bits() callback. This + * been replaced with the new clear_dirty_bits() callback. This * callback is only called if the entry is dirty to begin with. * Thus, the entry will no longer be marked as cleared. */ @@ -13847,7 +13847,7 @@ check_expunge_entry(void) if ( pass2 ) { - /* 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. */ @@ -13882,7 +13882,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 = entries2[0]; entry_ptr = &(base_addr[1]); @@ -13893,7 +13893,7 @@ check_expunge_entry(void) */ result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13932,7 +13932,7 @@ check_expunge_entry(void) if ( pass2 ) { result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -13968,12 +13968,12 @@ check_expunge_entry(void) if ( pass2 ) { - /* 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 = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14031,7 +14031,7 @@ check_expunge_entry(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -14044,7 +14044,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 @@ -14105,7 +14105,7 @@ check_multiple_read_protect(void) entry_ptr = &((entries2[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 ) ) { @@ -14128,7 +14128,7 @@ check_multiple_read_protect(void) { protect_entry_ro2(file_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 ) ) { @@ -14151,7 +14151,7 @@ check_multiple_read_protect(void) { protect_entry_ro2(file_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 ) ) { @@ -14174,7 +14174,7 @@ check_multiple_read_protect(void) { unprotect_entry2(file_ptr, 0, 0, FALSE, H5C2__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 ) ) { @@ -14197,7 +14197,7 @@ check_multiple_read_protect(void) { protect_entry_ro2(file_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 ) ) { @@ -14220,7 +14220,7 @@ check_multiple_read_protect(void) { protect_entry_ro2(file_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 ) ) { @@ -14243,7 +14243,7 @@ check_multiple_read_protect(void) { unprotect_entry2(file_ptr, 0, 0, FALSE, H5C2__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 ) ) { @@ -14266,7 +14266,7 @@ check_multiple_read_protect(void) { unprotect_entry2(file_ptr, 0, 0, FALSE, H5C2__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 ) ) { @@ -14289,7 +14289,7 @@ check_multiple_read_protect(void) { unprotect_entry2(file_ptr, 0, 0, FALSE, H5C2__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 ) ) { @@ -14309,7 +14309,7 @@ check_multiple_read_protect(void) #endif /* H5C2_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. */ @@ -14317,7 +14317,7 @@ check_multiple_read_protect(void) { protect_entry2(file_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 ) ) { @@ -14340,7 +14340,7 @@ check_multiple_read_protect(void) { unprotect_entry2(file_ptr, 0, 0, FALSE, H5C2__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 ) ) { @@ -14360,7 +14360,7 @@ check_multiple_read_protect(void) #endif /* H5C2_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. * @@ -14463,7 +14463,7 @@ check_multiple_read_protect(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -14585,7 +14585,7 @@ check_rename_entry(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -14713,7 +14713,7 @@ check_rename_entry__run_test(H5F_t * file_ptr, } } - unpin_entry2(file_ptr, spec_ptr->entry_type, + unpin_entry2(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index); } else { @@ -14836,7 +14836,7 @@ check_pin_protected_entry(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -14887,7 +14887,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 @@ -14895,10 +14895,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 * H5C2_resize_entry to reduce its size. Verify that the entry * and cache have the expected sizes. * @@ -14910,7 +14910,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. */ @@ -14964,8 +14964,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -14997,7 +14997,7 @@ check_resize_entry(void) result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types2[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, H5C2__SIZE_CHANGED_FLAG | H5C2__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2)); @@ -15034,8 +15034,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15070,7 +15070,7 @@ check_resize_entry(void) result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types2[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, (H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE); @@ -15107,8 +15107,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15143,17 +15143,17 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_resize_pinned_entry((void *)entry_ptr, + result = H5C2_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4)); if ( result < 0 ) { pass2 = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C2_resize_pinned_entry() reports failure 1."); failure_mssg2 = msg; - } + } } if ( pass2 ) { @@ -15172,8 +15172,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15204,17 +15204,17 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_resize_pinned_entry((void *)entry_ptr, + result = H5C2_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE); if ( result < 0 ) { pass2 = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C2_resize_pinned_entry() reports failure 2."); failure_mssg2 = msg; - } + } } if ( pass2 ) { @@ -15233,8 +15233,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15265,13 +15265,13 @@ check_resize_entry(void) protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C2__UNPIN_ENTRY_FLAG | H5C2__DELETED_FLAG); if ( pass2 ) { result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15391,8 +15391,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15424,7 +15424,7 @@ check_resize_entry(void) result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types2[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, H5C2__SIZE_CHANGED_FLAG | H5C2__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2)); @@ -15448,10 +15448,10 @@ check_resize_entry(void) if ( pass2 ) { 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)) ) ) { pass2 = FALSE; @@ -15463,8 +15463,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15499,7 +15499,7 @@ check_resize_entry(void) result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types2[LARGE_ENTRY_TYPE]), entry_ptr->addr, - (void *)entry_ptr, + (void *)entry_ptr, (H5C2__DIRTIED_FLAG | H5C2__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE); @@ -15536,8 +15536,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15572,26 +15572,26 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_resize_pinned_entry((void *)entry_ptr, + result = H5C2_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4)); if ( result < 0 ) { pass2 = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C2_resize_pinned_entry() reports failure 3."); failure_mssg2 = msg; - } + } } if ( pass2 ) { 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)) ) ) { pass2 = FALSE; @@ -15603,8 +15603,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15635,17 +15635,17 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_resize_pinned_entry((void *)entry_ptr, + result = H5C2_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE); if ( result < 0 ) { pass2 = FALSE; - HDsnprintf(msg, (size_t)128, + HDsnprintf(msg, (size_t)128, "H5C2_resize_pinned_entry() reports failure 4."); failure_mssg2 = msg; - } + } } if ( pass2 ) { @@ -15664,8 +15664,8 @@ check_resize_entry(void) if ( pass2 ) { - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, - &reported_entry_size, &in_cache, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + &reported_entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15696,13 +15696,13 @@ check_resize_entry(void) protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C2__UNPIN_ENTRY_FLAG | H5C2__DELETED_FLAG); if ( pass2 ) { result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, + &in_cache, &is_dirty, &is_protected, &is_pinned); if ( result < 0 ) { @@ -15797,7 +15797,7 @@ check_resize_entry(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -15810,7 +15810,7 @@ check_resize_entry(void) /*------------------------------------------------------------------------- * Function: check_evictions_enabled() * - * Purpose: Verify that H5C2_get_evictions_enabled() and + * Purpose: Verify that H5C2_get_evictions_enabled() and * H5C2_set_evictions_enabled() functions perform as expected. * * Return: void @@ -15863,7 +15863,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 H5C2_set_evictions_enabled() to re-enable evictions. Verify @@ -15876,7 +15876,7 @@ check_evictions_enabled(void) * Protect an entry not in the cache. Verify that this causes * two evictions. * - * Used H5C2_set_evictions_enabled() to disable evictions again. + * Used H5C2_set_evictions_enabled() to disable evictions again. * Verify with a call to H5C2_get_evictions_enabled(). * * Now flush and discard the cache -- should succeed. @@ -15946,7 +15946,7 @@ check_evictions_enabled(void) for ( i = 0; i < 16 ; i++ ) { protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, i); - unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, i, + unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, i, FALSE, H5C2__NO_FLAGS_SET); } @@ -15977,7 +15977,7 @@ check_evictions_enabled(void) /* protect and unprotect another entry */ protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 16); - unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 16, + unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 16, FALSE, H5C2__NO_FLAGS_SET); if ( show_progress ) /* 7 */ @@ -16008,7 +16008,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[0]); - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -16071,7 +16071,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[1]); - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -16142,7 +16142,7 @@ check_evictions_enabled(void) /* protect and unprotect another entry */ protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 18); - unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 18, + unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 18, FALSE, H5C2__NO_FLAGS_SET); if ( show_progress ) /* 15 */ @@ -16215,7 +16215,7 @@ check_evictions_enabled(void) /* protect and unprotect an entry that is in the cache */ protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 19); - unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 19, + unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 19, FALSE, H5C2__NO_FLAGS_SET); if ( show_progress ) /* 20 */ @@ -16244,14 +16244,14 @@ check_evictions_enabled(void) /* protect and unprotect an entry that isn't in the cache */ protect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 20); - unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 20, + unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 20, FALSE, H5C2__NO_FLAGS_SET); if ( show_progress ) /* 22 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); - /* 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. */ @@ -16278,7 +16278,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[2]); - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -16314,7 +16314,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[3]); - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -16363,11 +16363,11 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); - /* 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_entry2(file_ptr, MONSTER_ENTRY_TYPE, 21); - unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 21, + unprotect_entry2(file_ptr, MONSTER_ENTRY_TYPE, 21, FALSE, H5C2__NO_FLAGS_SET); @@ -16443,7 +16443,7 @@ check_evictions_enabled(void) entry_ptr = &(base_addr[4]); - result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, + result = H5C2_get_entry_status(file_ptr, entry_ptr->addr, NULL, &in_cache, NULL, NULL, NULL); if ( result < 0 ) { @@ -16511,7 +16511,7 @@ check_evictions_enabled(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -16563,7 +16563,7 @@ check_flush_protected_err(void) protect_entry2(file_ptr, 0, 0); - if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C2__NO_FLAGS_SET) >= 0 ) { @@ -16574,7 +16574,7 @@ check_flush_protected_err(void) unprotect_entry2(file_ptr, 0, 0, TRUE, H5C2__NO_FLAGS_SET); - if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, + if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C2__NO_FLAGS_SET) < 0 ) { @@ -16598,7 +16598,7 @@ check_flush_protected_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -16675,7 +16675,7 @@ check_destroy_pinned_err(void) file_ptr->shared->cache2 = NULL; } } - + if ( saved_cache2 != NULL ) { file_ptr->shared->cache2 = saved_cache2; @@ -16701,7 +16701,7 @@ check_destroy_pinned_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -16756,7 +16756,7 @@ check_destroy_protected_err(void) if ( H5C2_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) >= 0 ) { pass2 = FALSE; - failure_mssg2 = + failure_mssg2 = "destroy succeeded on cache with protected entry.\n"; } else { @@ -16772,7 +16772,7 @@ check_destroy_protected_err(void) file_ptr->shared->cache2 = NULL; } } - + if ( saved_cache2 != NULL ) { file_ptr->shared->cache2 = saved_cache2; @@ -16797,7 +16797,7 @@ check_destroy_protected_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -16886,7 +16886,7 @@ check_duplicate_insert_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -16990,7 +16990,7 @@ check_rename_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17056,9 +17056,9 @@ check_double_pin_err(void) if ( pass2 ) { - result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, - (void *)entry_ptr, H5C2__PIN_ENTRY_FLAG, + result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, + (void *)entry_ptr, H5C2__PIN_ENTRY_FLAG, (size_t)0); if ( result > 0 ) { @@ -17088,7 +17088,7 @@ check_double_pin_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17152,9 +17152,9 @@ check_double_unpin_err(void) if ( pass2 ) { - result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, - (void *)entry_ptr, H5C2__UNPIN_ENTRY_FLAG, + result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, + (void *)entry_ptr, H5C2__UNPIN_ENTRY_FLAG, (size_t)0); if ( result > 0 ) { @@ -17197,7 +17197,7 @@ check_double_unpin_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17317,7 +17317,7 @@ check_pin_entry_errs(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17381,9 +17381,9 @@ check_double_protect_err(void) if ( pass2 ) { - cache_entry_ptr = H5C2_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, - entry_ptr->size, NULL, + cache_entry_ptr = H5C2_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, + entry_ptr->size, NULL, H5C2__NO_FLAGS_SET); if ( cache_entry_ptr != NULL ) { @@ -17413,7 +17413,7 @@ check_double_protect_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17482,9 +17482,9 @@ check_double_unprotect_err(void) if ( pass2 ) { - result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, - (void *)entry_ptr, H5C2__NO_FLAGS_SET, + result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, + (void *)entry_ptr, H5C2__NO_FLAGS_SET, (size_t)0); if ( result > 0 ) { @@ -17510,7 +17510,7 @@ check_double_unprotect_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17648,7 +17648,7 @@ check_mark_entry_dirty_errs(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17781,7 +17781,7 @@ check_expunge_entry_errs(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17823,11 +17823,11 @@ check_resize_entry_errs(void) pass2 = TRUE; - /* Allocate a cache, protect an entry, and then call + /* Allocate a cache, protect an entry, and then call * H5C2_resize_pinned_entry() to resize it -- this should fail. * * Unprotect the the entry with the pinned flag, and then call - * H5C2_resize_pinned_entry() again with new size of zero. + * H5C2_resize_pinned_entry() again with new size of zero. * This should fail too. * * Finally, unpin the entry and destroy the cache. @@ -17866,7 +17866,7 @@ check_resize_entry_errs(void) if ( pass2 ) { - result = H5C2_resize_pinned_entry((void *)entry_ptr, + result = H5C2_resize_pinned_entry((void *)entry_ptr, (size_t)0); if ( result > 0 ) { @@ -17897,7 +17897,7 @@ check_resize_entry_errs(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -17939,7 +17939,7 @@ check_unprotect_ro_dirty_err(void) pass2 = 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. */ @@ -17958,9 +17958,9 @@ check_unprotect_ro_dirty_err(void) if ( pass2 ) { - result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, - (void *)entry_ptr, H5C2__DIRTIED_FLAG, + result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, + (void *)entry_ptr, H5C2__DIRTIED_FLAG, (size_t)0); if ( result >= 0 ) { @@ -17982,8 +17982,8 @@ check_unprotect_ro_dirty_err(void) takedown_cache2(file_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. */ @@ -18003,9 +18003,9 @@ check_unprotect_ro_dirty_err(void) if ( pass2 ) { - result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, - (void *)entry_ptr, H5C2__DIRTIED_FLAG, + result = H5C2_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, + (void *)entry_ptr, H5C2__DIRTIED_FLAG, (size_t)0); if ( result > 0 ) { @@ -18038,7 +18038,7 @@ check_unprotect_ro_dirty_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -18080,9 +18080,9 @@ check_protect_ro_rw_err(void) pass2 = 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. */ @@ -18100,8 +18100,8 @@ check_protect_ro_rw_err(void) if ( pass2 ) { - thing_ptr = H5C2_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr, + thing_ptr = H5C2_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + &(types2[0]), entry_ptr->addr, entry_ptr->size, NULL, H5C2__NO_FLAGS_SET); if ( thing_ptr != NULL ) { @@ -18131,7 +18131,7 @@ check_protect_ro_rw_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -18144,7 +18144,7 @@ check_protect_ro_rw_err(void) /*------------------------------------------------------------------------- * Function: check_evictions_enabled_err() * - * Purpose: Verify that H5C2_get_evictions_enabled() and + * Purpose: Verify that H5C2_get_evictions_enabled() and * H5C2_set_evictions_enabled() generate errors as expected. * * Return: void @@ -18181,7 +18181,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 * H5C2_set_evictions_enabled() to disable evictions. Should fail. * * Unprotect the entry and destroy the cache -- should succeed. @@ -18279,7 +18279,7 @@ check_check_evictions_enabled_err(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -18307,7 +18307,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. - * + * *------------------------------------------------------------------------- */ @@ -21510,20 +21510,20 @@ 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 * code increases the cache size when and as expected. */ - /* Place the cache in a know state via a flush destroy on the cache - * to clear out all entries, and then a reset on all the entries. - * Then configure the cache for the flash cache size increase tests, - * and force the flash size increase code through all its operational + /* Place the cache in a know state via a flush destroy on the cache + * to clear out all entries, and then a reset on all the entries. + * Then configure the cache for the flash cache size increase tests, + * and force the flash size increase code through all its operational * modes. Verify that all perform as expected. */ @@ -21630,7 +21630,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 ( pass2 ) { @@ -21646,7 +21646,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 ) ) ) ) { @@ -21708,9 +21708,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 ( pass2 ) { expunge_entry2(file_ptr, MONSTER_ENTRY_TYPE, 1); @@ -21718,13 +21718,13 @@ check_auto_cache_resize(void) if ( pass2 ) { - result = H5C2_set_cache_auto_resize_config(cache_ptr, + result = H5C2_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass2 = FALSE; - failure_mssg2 = + pass2 = FALSE; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 13.\n"; } } @@ -21741,7 +21741,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. */ @@ -21776,7 +21776,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 ( pass2 ) { @@ -21788,7 +21788,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 ) ) ) ) { @@ -21803,14 +21803,14 @@ check_auto_cache_resize(void) */ if ( pass2 ) { - insert_entry2(file_ptr, MONSTER_ENTRY_TYPE, 5, TRUE, + insert_entry2(file_ptr, MONSTER_ENTRY_TYPE, 5, TRUE, H5C2__NO_FLAGS_SET); if ( ( pass2 ) && ( ( ( 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 ) ) ) ) { @@ -21845,11 +21845,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 ( pass2 ) { expunge_entry2(file_ptr, MONSTER_ENTRY_TYPE, 5); @@ -21877,13 +21877,13 @@ check_auto_cache_resize(void) if ( pass2 ) { auto_size_ctl.initial_size = 6 * 1024; - result = H5C2_set_cache_auto_resize_config(cache_ptr, + result = H5C2_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass2 = FALSE; - failure_mssg2 = + pass2 = FALSE; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 13.\n"; } } @@ -21906,11 +21906,11 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C2__NO_FLAGS_SET); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C2__NO_FLAGS_SET); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12); @@ -22033,7 +22033,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 ( pass2 ) { @@ -22051,13 +22051,13 @@ check_auto_cache_resize(void) if ( pass2 ) { auto_size_ctl.initial_size = 6 * 1024; - result = H5C2_set_cache_auto_resize_config(cache_ptr, + result = H5C2_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass2 = FALSE; - failure_mssg2 = + pass2 = FALSE; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 14.\n"; } } @@ -22081,7 +22081,7 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C2__PIN_ENTRY_FLAG); resize_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE); @@ -22120,7 +22120,7 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C2__PIN_ENTRY_FLAG); resize_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE); @@ -22141,7 +22141,7 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C2__PIN_ENTRY_FLAG); resize_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE); @@ -22165,15 +22165,15 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C2__UNPIN_ENTRY_FLAG); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C2__UNPIN_ENTRY_FLAG); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C2__UNPIN_ENTRY_FLAG); if ( ( pass2 ) && @@ -22191,7 +22191,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 ( pass2 ) { @@ -22209,13 +22209,13 @@ check_auto_cache_resize(void) if ( pass2 ) { auto_size_ctl.initial_size = 6 * 1024; - result = H5C2_set_cache_auto_resize_config(cache_ptr, + result = H5C2_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); if ( result != SUCCEED ) { - pass2 = FALSE; - failure_mssg2 = + pass2 = FALSE; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 15.\n"; } } @@ -22235,7 +22235,7 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C2__PIN_ENTRY_FLAG); resize_pinned_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024); @@ -22274,7 +22274,7 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C2__PIN_ENTRY_FLAG); resize_pinned_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024); @@ -22295,7 +22295,7 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C2__PIN_ENTRY_FLAG); resize_pinned_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024); @@ -22319,15 +22319,15 @@ check_auto_cache_resize(void) if ( pass2 ) { protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE, H5C2__UNPIN_ENTRY_FLAG); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE, H5C2__UNPIN_ENTRY_FLAG); protect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12); - unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, + unprotect_entry2(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE, H5C2__UNPIN_ENTRY_FLAG); if ( ( pass2 ) && @@ -22441,14 +22441,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 ( pass2 ) { rpt_fcn_called = FALSE; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, H5C2__NO_FLAGS_SET); if ( ( pass2 ) && @@ -22466,7 +22466,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). */ @@ -22475,7 +22475,7 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE, H5C2__NO_FLAGS_SET); if ( ( pass2 ) && @@ -22493,7 +22493,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 ( pass2 ) { @@ -22501,10 +22501,10 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE, H5C2__NO_FLAGS_SET); protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE, H5C2__NO_FLAGS_SET); if ( ( pass2 ) && @@ -22522,7 +22522,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 ( pass2 ) { @@ -22558,17 +22558,17 @@ check_auto_cache_resize(void) rpt_fcn_called = FALSE; protect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, + unprotect_entry2(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE, H5C2__NO_FLAGS_SET); if ( ( pass2 ) && ( ( ( 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 ) ) ) ) { pass2 = FALSE; @@ -22596,7 +22596,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 ) ) { pass2 = FALSE; @@ -22624,7 +22624,7 @@ check_auto_cache_resize(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -25204,27 +25204,27 @@ check_auto_cache_resize_disable(void) /* 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. @@ -25335,7 +25335,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 ( pass2 ) { @@ -25388,7 +25388,7 @@ check_auto_cache_resize_disable(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -26107,7 +26107,7 @@ check_auto_cache_resize_epoch_markers(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -27581,7 +27581,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 H5C2_cache_flash_incr_mode) -1; /* INVALID */ invalid_auto_size_ctl.flash_multiple = 2.0; invalid_auto_size_ctl.flash_threshold = 0.5; @@ -27657,7 +27657,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 = H5C2_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 0.09; /* INVALID */ invalid_auto_size_ctl.flash_threshold = 0.5; @@ -27731,7 +27731,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 = H5C2_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 10.01; /* INVALID */ invalid_auto_size_ctl.flash_threshold = 0.5; @@ -27807,7 +27807,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 = H5C2_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 1.0; invalid_auto_size_ctl.flash_threshold = 0.09; /* INVALID */ @@ -27881,7 +27881,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 = H5C2_flash_incr__add_space; invalid_auto_size_ctl.flash_multiple = 1.0; invalid_auto_size_ctl.flash_threshold = 1.001; /* INVALID */ @@ -28583,7 +28583,7 @@ check_auto_cache_resize_input_errs(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -28660,7 +28660,7 @@ check_auto_cache_resize_aux_fcns(void) /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, - + /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__off, /* double upper_hr_threshold = */ 0.995, @@ -29176,7 +29176,7 @@ check_auto_cache_resize_aux_fcns(void) if ( core_file_driver_failed ) { - HDfprintf(stdout, + HDfprintf(stdout, "%s(): Unable to open test file with core file driver.\n", fcn_name); } @@ -29234,7 +29234,7 @@ main(void) if ( envval != NULL ) { if ( HDstrcmp(envval, "core") == 0 ) { - + core_file_forced = TRUE; try_core_file_driver = TRUE; @@ -29252,7 +29252,7 @@ main(void) printf(" skip_long_tests = %d\n", (int)skip_long_tests2); printf(" regular_file_forced = %d\n", (int)regular_file_forced); printf(" core_file_forced = %d\n", (int)core_file_forced); - printf(" core_file_driver_recommended = %d\n", + printf(" core_file_driver_recommended = %d\n", (int)core_file_driver_recommended); printf(" try_core_file_driver = %d\n", (int)try_core_file_driver); printf("=========================================\n"); @@ -29262,7 +29262,7 @@ main(void) printf("\n"); printf("All the longer cache tests will attempt to use the core file\n"); printf("driver in an attempt to avoid disk I/O and thereby run the\n"); - printf("tests faster. If a test is unable to to do so, it will\n"); + printf("tests faster. If a test is unable to to do so, it will\n"); printf("attempt to run the test using a regular file, and will note\n"); printf("this fact at test completion.\n"); printf("\n"); @@ -29271,7 +29271,7 @@ main(void) printf("\n"); printf("In general, running the longer cache tests with the core\n"); printf("file driver should speed up the tests significantly.\n"); - printf("However, if the available physical ram is less than 2 GB,\n"); + printf("However, if the available physical ram is less than 2 GB,\n"); printf("it may slow the tests down instead.\n"); printf("\n"); } @@ -29292,7 +29292,7 @@ main(void) nerrs += write_permitted_check(); #endif /* for shorter tests, the overhead of using the core file driver doesn't - * seem to allow us to realize any significant time saveings. Thus + * seem to allow us to realize any significant time saveings. Thus * set try_core_file_driver to FALSE for the remaining tests. */ try_core_file_driver = FALSE; |