diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-02-28 05:23:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-02-28 05:23:44 (GMT) |
commit | e5fb4191de1129f58cc7b9b8ee67f4cec1488f39 (patch) | |
tree | c6151b0582ef769f95549bc1c231fb3609408733 /test/cache.c | |
parent | fd268dca96ea76ef0ec4425434502343ee2055d7 (diff) | |
download | hdf5-e5fb4191de1129f58cc7b9b8ee67f4cec1488f39.zip hdf5-e5fb4191de1129f58cc7b9b8ee67f4cec1488f39.tar.gz hdf5-e5fb4191de1129f58cc7b9b8ee67f4cec1488f39.tar.bz2 |
Revert "Fix some more signed -> unsigned value issues with cache data structures, also"
This reverts commit 4b5e05c084f93c35dae946c2c9e814d565a613b0.
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/test/cache.c b/test/cache.c index 1cfc0b1..d09a122 100644 --- a/test/cache.c +++ b/test/cache.c @@ -13697,7 +13697,7 @@ check_move_entry(void) { unsigned u; H5F_t * file_ptr = NULL; - struct move_entry_test_spec test_specs[4] = + struct move_entry_test_spec test_specs[8] = { { /* int entry_type = */ PICO_ENTRY_TYPE, @@ -16779,6 +16779,7 @@ check_expunge_entry_errs(void) * *------------------------------------------------------------------------- */ + static unsigned check_move_entry_errs(void) { @@ -16800,6 +16801,7 @@ check_move_entry_errs(void) */ if(pass) { + reset_entries(); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024)); @@ -16812,29 +16814,36 @@ check_move_entry_errs(void) entry_0_0_ptr = &((entries[0])[0]); entry_0_1_ptr = &((entries[0])[1]); entry_1_0_ptr = &((entries[1])[0]); - } /* end if */ + } if(pass) { - result = H5C_move_entry(cache_ptr, types[0], entry_0_0_ptr->addr, entry_0_1_ptr->addr); + + result = H5C_move_entry(cache_ptr, types[0], + entry_0_0_ptr->addr, entry_0_1_ptr->addr); if(result >= 0) { + pass = FALSE; failure_mssg = "move to addr of same type succeeded.\n"; - } /* end if */ - } /* end if */ + } + } if(pass) { - result = H5C_move_entry(cache_ptr, types[0], entry_0_0_ptr->addr, entry_1_0_ptr->addr); + + result = H5C_move_entry(cache_ptr, types[0], + entry_0_0_ptr->addr, entry_1_0_ptr->addr); if(result >= 0) { + pass = FALSE; failure_mssg = "move to addr of different type succeeded.\n"; - } /* end if */ - } /* end if */ + } + } if(pass) takedown_cache(file_ptr, FALSE, FALSE); + /* Allocate a cache, protect an entry R/O, and then call * H5C_move_entry() to move it -- this should fail. * @@ -16843,6 +16852,7 @@ check_move_entry_errs(void) */ if(pass) { + reset_entries(); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024)); @@ -16850,21 +16860,29 @@ check_move_entry_errs(void) cache_ptr = file_ptr->shared->cache; insert_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); + protect_entry_ro(file_ptr, 0, 0); entry_ptr = &((entries[0])[0]); - } /* end if */ + + } if(pass) { + result = H5C_move_entry(cache_ptr, types[0], entry_ptr->header.addr, entry_ptr->header.addr + 10); if(result >= 0) { + pass = FALSE; - failure_mssg = "Call to H5C_move_entry on a R/O protected entry succeeded.\n"; - } /* end if */ - else + failure_mssg = + "Call to H5C_move_entry on a R/O protected entry succeeded.\n"; + + } else { + unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); - } /* end if */ + + } + } if(pass) takedown_cache(file_ptr, FALSE, FALSE); @@ -16874,7 +16892,8 @@ check_move_entry_errs(void) else { H5_FAILED() - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", + FUNC, failure_mssg); } /* end else */ return (unsigned)!pass; |