summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-01-28 04:35:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-01-28 04:35:14 (GMT)
commit349f41d9740d1e4a1e86704b3c8a30c700d1de78 (patch)
tree6ea58aae0fe8e829edc666131da7f15fe299eb49 /test
parenteb8ada95645d8d17a51653007025c1547c752a8a (diff)
downloadhdf5-349f41d9740d1e4a1e86704b3c8a30c700d1de78.zip
hdf5-349f41d9740d1e4a1e86704b3c8a30c700d1de78.tar.gz
hdf5-349f41d9740d1e4a1e86704b3c8a30c700d1de78.tar.bz2
Switch list lengths to unsigned integers (to align better w/cache image merge)
Diffstat (limited to 'test')
-rw-r--r--test/cache.c308
-rw-r--r--test/cache_common.c2
-rw-r--r--test/earray.c246
-rw-r--r--test/evict_on_close.c16
4 files changed, 163 insertions, 409 deletions
diff --git a/test/cache.c b/test/cache.c
index 2209d8f..4f097e9 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -118,12 +118,12 @@ static void check_flush_cache__multi_entry(H5F_t * file_ptr);
static void check_flush_cache__multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
- int spec_size,
+ unsigned int spec_size,
struct flush_cache_test_spec spec[]);
static void check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
- int spec_size,
+ unsigned int spec_size,
struct pe_flush_cache_test_spec spec[]);
static void check_flush_cache__single_entry(H5F_t * file_ptr);
static void check_flush_cache__single_entry_test(H5F_t * file_ptr,
@@ -155,9 +155,9 @@ static void check_flush_cache__flush_op_test(H5F_t * file_ptr,
unsigned int flush_flags,
int spec_size,
const struct fo_flush_cache_test_spec spec[],
- int init_expected_index_len,
+ unsigned init_expected_index_len,
size_t init_expected_index_size,
- int expected_index_len,
+ unsigned expected_index_len,
size_t expected_index_size,
int check_size,
struct fo_flush_entry_check check[]);
@@ -3312,7 +3312,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
int test_num = 1;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3406,7 +3406,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
int test_num = 2;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3500,7 +3500,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
int test_num = 3;
unsigned int flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3594,7 +3594,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
int test_num = 4;
unsigned int flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3689,7 +3689,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
int test_num = 5;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3784,7 +3784,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
int test_num = 6;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3879,7 +3879,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
int test_num = 7;
unsigned int flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -3975,7 +3975,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -4073,7 +4073,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
~(H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG);
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct flush_cache_test_spec spec[8] =
{
{
@@ -4172,7 +4172,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
int test_num = 1;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct pe_flush_cache_test_spec spec[8] =
{
{
@@ -4318,7 +4318,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
int test_num = 2;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct pe_flush_cache_test_spec spec[8] =
{
{
@@ -4448,7 +4448,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
int test_num = 3;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct pe_flush_cache_test_spec spec[8] =
{
{
@@ -4570,7 +4570,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
int test_num = 4;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct pe_flush_cache_test_spec spec[8] =
{
{
@@ -4701,7 +4701,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG;
- int spec_size = 8;
+ unsigned int spec_size = 8;
struct pe_flush_cache_test_spec spec[8] =
{
{
@@ -4845,13 +4845,13 @@ static void
check_flush_cache__multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
- int spec_size,
+ unsigned int spec_size,
struct flush_cache_test_spec spec[])
{
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
- int i;
+ unsigned u;
size_t total_entry_size = 0;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -4890,43 +4890,43 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- if((spec[i].entry_num != i) ||
- (spec[i].entry_type < 0) ||
- (spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
- (spec[i].entry_index < 0) ||
- (spec[i].entry_index > max_indices[spec[i].entry_type])) {
+ if(((unsigned)spec[u].entry_num != u) ||
+ (spec[u].entry_type < 0) ||
+ (spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (spec[u].entry_index < 0) ||
+ (spec[u].entry_index > max_indices[spec[u].entry_type])) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "bad data in spec[%d] on entry to multi entry test #%d.",
- i, test_num);
+ "bad data in spec[%u] on entry to multi entry test #%d.",
+ u, test_num);
failure_mssg = msg;
}
- i++;
+ u++;
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- if(spec[i].insert_flag) {
+ if(spec[u].insert_flag) {
- insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
- spec[i].flags);
+ insert_entry(file_ptr, spec[u].entry_type, spec[u].entry_index,
+ spec[u].flags);
} else {
- protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[u].entry_type, spec[u].entry_index);
- unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
- spec[i].flags);
+ unprotect_entry(file_ptr, spec[u].entry_type, spec[u].entry_index,
+ spec[u].flags);
}
- total_entry_size += entry_sizes[spec[i].entry_type];
+ total_entry_size += entry_sizes[spec[u].entry_type];
- i++;
+ u++;
}
if(pass) {
@@ -4943,36 +4943,36 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- base_addr = entries[spec[i].entry_type];
- entry_ptr = &(base_addr[spec[i].entry_index]);
+ base_addr = entries[spec[u].entry_type];
+ entry_ptr = &(base_addr[spec[u].entry_index]);
- if((entry_ptr->deserialized != spec[i].expected_deserialized) ||
- (entry_ptr->serialized != spec[i].expected_serialized) ||
- (entry_ptr->destroyed != spec[i].expected_destroyed)) {
+ if((entry_ptr->deserialized != spec[u].expected_deserialized) ||
+ (entry_ptr->serialized != spec[u].expected_serialized) ||
+ (entry_ptr->destroyed != spec[u].expected_destroyed)) {
#if 0 /* This is useful debugging code. Lets keep it around. */
HDfprintf(stdout,
"deslzd = %d(%d), slzd = %d(%d), dest = %d(%d)\n",
(int)(entry_ptr->deserialized),
- (int)(spec[i].expected_deserialized),
+ (int)(spec[u].expected_deserialized),
(int)(entry_ptr->serialized),
- (int)(spec[i].expected_serialized),
+ (int)(spec[u].expected_serialized),
(int)(entry_ptr->destroyed),
- (int)(spec[i].expected_destroyed));
+ (int)(spec[u].expected_destroyed));
#endif
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "Bad status on entry %d after flush in multi entry test #%d.",
- i, test_num);
+ "Bad status on entry %u after flush in multi entry test #%d.",
+ u, test_num);
failure_mssg = msg;
}
- i++;
+ u++;
}
if(pass) {
@@ -5027,17 +5027,17 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- base_addr = entries[spec[i].entry_type];
- entry_ptr = &(base_addr[spec[i].entry_index]);
+ base_addr = entries[spec[u].entry_type];
+ entry_ptr = &(base_addr[spec[u].entry_index]);
entry_ptr->deserialized = FALSE;
entry_ptr->serialized = FALSE;
entry_ptr->destroyed = FALSE;
- i++;
+ u++;
}
return;
@@ -5064,13 +5064,13 @@ static void
check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
- int spec_size,
+ unsigned int spec_size,
struct pe_flush_cache_test_spec spec[])
{
H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
- int i;
+ unsigned u;
int j;
size_t total_entry_size = 0;
test_entry_t * base_addr;
@@ -5110,54 +5110,54 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- if((spec[i].entry_num != i) ||
- (spec[i].entry_type < 0) ||
- (spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
- (spec[i].entry_index < 0) ||
- (spec[i].entry_index > max_indices[spec[i].entry_type]) ||
- (spec[i].num_pins < 0) ||
- (spec[i].num_pins > MAX_PINS)) {
+ if(((unsigned)spec[u].entry_num != u) ||
+ (spec[u].entry_type < 0) ||
+ (spec[u].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (spec[u].entry_index < 0) ||
+ (spec[u].entry_index > max_indices[spec[u].entry_type]) ||
+ (spec[u].num_pins < 0) ||
+ (spec[u].num_pins > MAX_PINS)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "bad data in spec[%d] on entry to pe multi entry test #%d.",
- i, test_num);
+ "bad data in spec[%u] on entry to pe multi entry test #%d.",
+ u, test_num);
failure_mssg = msg;
}
- i++;
+ u++;
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- if(spec[i].insert_flag) {
+ if(spec[u].insert_flag) {
- insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
- spec[i].flags);
+ insert_entry(file_ptr, spec[u].entry_type, spec[u].entry_index,
+ spec[u].flags);
} else {
- protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[u].entry_type, spec[u].entry_index);
- unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
- spec[i].flags);
+ unprotect_entry(file_ptr, spec[u].entry_type, spec[u].entry_index,
+ spec[u].flags);
}
- total_entry_size += entry_sizes[spec[i].entry_type];
+ total_entry_size += entry_sizes[spec[u].entry_type];
- for (j = 0; j < spec[i].num_pins; j++)
+ for (j = 0; j < spec[u].num_pins; j++)
{
create_pinned_entry_dependency(file_ptr,
- spec[i].entry_type,
- spec[i].entry_index,
- spec[i].pin_type[j],
- spec[i].pin_idx[j]);
+ spec[u].entry_type,
+ spec[u].entry_index,
+ spec[u].pin_type[j],
+ spec[u].pin_idx[j]);
}
- i++;
+ u++;
}
if(pass) {
@@ -5174,36 +5174,36 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- base_addr = entries[spec[i].entry_type];
- entry_ptr = &(base_addr[spec[i].entry_index]);
+ base_addr = entries[spec[u].entry_type];
+ entry_ptr = &(base_addr[spec[u].entry_index]);
- if((entry_ptr->deserialized != spec[i].expected_deserialized) ||
- (entry_ptr->serialized != spec[i].expected_serialized) ||
- (entry_ptr->destroyed != spec[i].expected_destroyed)) {
+ if((entry_ptr->deserialized != spec[u].expected_deserialized) ||
+ (entry_ptr->serialized != spec[u].expected_serialized) ||
+ (entry_ptr->destroyed != spec[u].expected_destroyed)) {
#if 0 /* This is useful debugging code. Lets keep it around. */
HDfprintf(stdout,
"desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n",
(int)(entry_ptr->deserialized),
- (int)(spec[i].expected_deserialized),
+ (int)(spec[u].expected_deserialized),
(int)(entry_ptr->serialized),
- (int)(spec[i].expected_serialized),
+ (int)(spec[u].expected_serialized),
(int)(entry_ptr->destroyed),
- (int)(spec[i].expected_destroyed));
+ (int)(spec[u].expected_destroyed));
#endif
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "Bad status on entry %d after flush in pe multi entry test #%d.",
- i, test_num);
+ "Bad status on entry %u after flush in pe multi entry test #%d.",
+ u, test_num);
failure_mssg = msg;
}
- i++;
+ u++;
}
if(pass) {
@@ -5258,17 +5258,17 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
}
- i = 0;
- while(pass && (i < spec_size))
+ u = 0;
+ while(pass && (u < spec_size))
{
- base_addr = entries[spec[i].entry_type];
- entry_ptr = &(base_addr[spec[i].entry_index]);
+ base_addr = entries[spec[u].entry_type];
+ entry_ptr = &(base_addr[spec[u].entry_index]);
entry_ptr->deserialized = FALSE;
entry_ptr->serialized = FALSE;
entry_ptr->destroyed = FALSE;
- i++;
+ u++;
}
return;
@@ -5323,9 +5323,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 1;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 2;
- int init_expected_index_len = 2;
+ unsigned init_expected_index_len = 2;
size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE;
- int expected_index_len = 2;
+ unsigned expected_index_len = 2;
size_t expected_index_size = 2 * PICO_ENTRY_SIZE;
struct fo_flush_cache_test_spec spec[2] =
{
@@ -5430,9 +5430,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 2;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 2;
- int init_expected_index_len = 2;
+ unsigned init_expected_index_len = 2;
size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = 0;
struct fo_flush_cache_test_spec spec[2] =
{
@@ -5534,9 +5534,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 3;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- int expected_index_len = 1;
+ unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -5612,9 +5612,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 4;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = 0;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -5697,9 +5697,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 5; /* and 6 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = VARIABLE_ENTRY_SIZE;
- int expected_index_len = 1;
+ unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -5814,9 +5814,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 7; /* and 8 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = VARIABLE_ENTRY_SIZE;
- int expected_index_len = 1;
+ unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -5927,9 +5927,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 9; /* and 10 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- int expected_index_len = 1;
+ unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -6038,9 +6038,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 11; /* and 12 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- int expected_index_len = 1;
+ unsigned expected_index_len = 1;
size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -6152,9 +6152,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 13;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE;
- int expected_index_len = 3;
+ unsigned expected_index_len = 3;
size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -6248,9 +6248,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 14;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -6341,9 +6341,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 15;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 3;
+ unsigned expected_index_len = 3;
size_t expected_index_size = VARIABLE_ENTRY_SIZE +
(VARIABLE_ENTRY_SIZE / 4) +
(VARIABLE_ENTRY_SIZE / 2);
@@ -6438,9 +6438,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 16;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
struct fo_flush_cache_test_spec spec[1] =
{
@@ -6531,9 +6531,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 17; /* and 18 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 3;
+ unsigned expected_index_len = 3;
size_t expected_index_size = VARIABLE_ENTRY_SIZE +
(VARIABLE_ENTRY_SIZE / 4) +
(VARIABLE_ENTRY_SIZE / 2);
@@ -6658,9 +6658,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 19; /* and 20 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
- int init_expected_index_len = 1;
+ unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 3;
+ unsigned expected_index_len = 3;
size_t expected_index_size = VARIABLE_ENTRY_SIZE +
(VARIABLE_ENTRY_SIZE / 4) +
(VARIABLE_ENTRY_SIZE / 2);
@@ -6796,9 +6796,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 21;
unsigned int flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG;
int spec_size = 4;
- int init_expected_index_len = 4;
+ unsigned init_expected_index_len = 4;
size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (2 * PICO_ENTRY_SIZE);
- int expected_index_len = 6;
+ unsigned expected_index_len = 6;
size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) +
(VARIABLE_ENTRY_SIZE / 4) +
(VARIABLE_ENTRY_SIZE / 2) +
@@ -7007,9 +7007,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 22;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 6;
- int init_expected_index_len = 6;
+ unsigned init_expected_index_len = 6;
size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (4 * PICO_ENTRY_SIZE);
- int expected_index_len = 10;
+ unsigned expected_index_len = 10;
size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) +
(2 * (VARIABLE_ENTRY_SIZE / 4)) +
(2 * (VARIABLE_ENTRY_SIZE / 2)) +
@@ -7276,9 +7276,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 23;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 6;
- int init_expected_index_len = 6;
+ unsigned init_expected_index_len = 6;
size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (4 * PICO_ENTRY_SIZE);
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = 0;
struct fo_flush_cache_test_spec spec[6] =
{
@@ -7538,9 +7538,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 24;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 3;
- int init_expected_index_len = 3;
+ unsigned init_expected_index_len = 3;
size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE;
- int expected_index_len = 3;
+ unsigned expected_index_len = 3;
size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
struct fo_flush_cache_test_spec spec[3] =
{
@@ -7671,9 +7671,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 25;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 3;
- int init_expected_index_len = 3;
+ unsigned init_expected_index_len = 3;
size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
struct fo_flush_cache_test_spec spec[3] =
{
@@ -7874,9 +7874,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 26;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 10;
- int init_expected_index_len = 10;
+ unsigned init_expected_index_len = 10;
size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 13;
+ unsigned expected_index_len = 13;
size_t expected_index_size = 9 * VARIABLE_ENTRY_SIZE;
struct fo_flush_cache_test_spec spec[10] =
{
@@ -8308,9 +8308,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 27;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 10;
- int init_expected_index_len = 10;
+ unsigned init_expected_index_len = 10;
size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = (size_t)0;
struct fo_flush_cache_test_spec spec[10] =
{
@@ -8667,9 +8667,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 28;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 5;
- int init_expected_index_len = 5;
+ unsigned init_expected_index_len = 5;
size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 5;
+ unsigned expected_index_len = 5;
size_t expected_index_size = 4 * VARIABLE_ENTRY_SIZE;
struct fo_flush_cache_test_spec spec[5] =
{
@@ -8859,9 +8859,9 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
int test_num = 29;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
int spec_size = 5;
- int init_expected_index_len = 5;
+ unsigned init_expected_index_len = 5;
size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE;
- int expected_index_len = 0;
+ unsigned expected_index_len = 0;
size_t expected_index_size = 0;
struct fo_flush_cache_test_spec spec[5] =
{
@@ -9070,9 +9070,9 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
unsigned int flush_flags,
int spec_size,
const struct fo_flush_cache_test_spec spec[],
- int init_expected_index_len,
+ unsigned init_expected_index_len,
size_t init_expected_index_size,
- int expected_index_len,
+ unsigned expected_index_len,
size_t expected_index_size,
int check_size,
struct fo_flush_entry_check check[])
@@ -27433,7 +27433,7 @@ check_auto_cache_resize_aux_fcns(void)
size_t max_size;
size_t min_clean_size;
size_t cur_size;
- int32_t cur_num_entries;
+ uint32_t cur_num_entries;
H5C_auto_size_ctl_t auto_size_ctl =
{
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
diff --git a/test/cache_common.c b/test/cache_common.c
index 5151d65..1321968 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -6128,7 +6128,7 @@ check_and_validate_cache_size(hid_t file_id,
size_t min_clean_size;
size_t expected_cur_size;
size_t cur_size;
- int32_t expected_cur_num_entries;
+ uint32_t expected_cur_num_entries;
int cur_num_entries;
H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
diff --git a/test/earray.c b/test/earray.c
index 07acbb5..c6f5986 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -159,15 +159,6 @@ typedef struct earray_test_t {
/* Local prototypes */
-/* Metadata cache (H5AC) callbacks */
-static herr_t earray_cache_test_get_initial_load_size(void *udata, size_t *image_len);
-static void *earray_cache_test_deserialize(const void *image_ptr, size_t len,
- void *udata_ptr, hbool_t *dirty_ptr);
-static herr_t earray_cache_test_image_len(const void *thing, size_t *image_len_ptr);
-static herr_t earray_cache_test_serialize(const H5F_t *f, void *image_ptr,
- size_t len, void *thing);
-static herr_t earray_cache_test_free_icr(void *thing);
-
/* Local variables */
const char *FILENAME[] = {
@@ -182,24 +173,6 @@ char filename_g[EARRAY_FILENAME_LEN];
/* Empty file size */
h5_stat_size_t empty_size_g;
-/* H5EA test object inherits cache-like properties from H5AC */
-const H5AC_class_t H5AC_EARRAY_TEST[1] = {{
- /* id */ H5AC_TEST_ID,
- /* name */ "earray test",
- /* mem_type */ H5FD_MEM_DEFAULT,
- /* flags */ H5AC__CLASS_SKIP_READS | H5AC__CLASS_SKIP_WRITES,
- /* get_initial_load_size */ earray_cache_test_get_initial_load_size,
- /* get_final_load_size */ NULL,
- /* verify_chksum */ NULL,
- /* deserialize */ earray_cache_test_deserialize,
- /* image_len */ earray_cache_test_image_len,
- /* pre_serialize */ NULL,
- /* serialize */ earray_cache_test_serialize,
- /* notify */ NULL,
- /* free_icr */ earray_cache_test_free_icr,
- /* fsf_size */ NULL,
-}};
-
/*-------------------------------------------------------------------------
* Function: init_cparam
@@ -619,225 +592,6 @@ error:
/*-------------------------------------------------------------------------
- * Function: earray_cache_test_get_initial_load_size()
- *
- * Purpose: place holder function -- should never be called
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_get_initial_load_size( void *udata, size_t *image_len)
-{
- HDassert(udata);
- HDassert(image_len);
-
- /* Should never be called */
- HDassert(0 && "Can't be called!");
-
- *image_len = 0;
-
- return(SUCCEED);
-} /* end earray_cache_test_get_initial_load_size() */
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_deserialize
- *
- * Purpose: place holder function -- should never be called.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- * Return: Success: Pointer to in core representation
- * Failure: NULL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static void *
-earray_cache_test_deserialize(const void *image_ptr,
- size_t len,
- void *udata_ptr,
- hbool_t *dirty_ptr)
-{
- HDassert(image_ptr);
- HDassert(len > 0 );
- HDassert(udata_ptr);
- HDassert(dirty_ptr);
-
- /* Should never be called */
- HDassert(0 && "Can't be called!");
-
- return(NULL);
-} /* end earray_cache_test_deserialize() */
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_image_len
- *
- * Purpose: test code place holder function -- just set *image_len_ptr to
- * one.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_image_len(const void *thing, size_t *image_len_ptr)
-{
- HDassert(thing);
- HDassert(image_len_ptr);
-
- /* Set size value */
- /* (hard-code to 1) */
- *image_len_ptr = 1;
-
- return(SUCCEED);
-} /* end earray_cache_test_image_len() */
-
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_serialize
- *
- * Purpose: Validate the contents of the instance of earray_test_t.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_serialize(const H5F_t *f,
- void *image_ptr,
- H5_ATTR_UNUSED size_t len,
- void *thing)
-{
- earray_test_t *test;
-
- HDassert(f);
- HDassert(image_ptr);
- HDassert(thing);
- test = (earray_test_t *)thing;
- HDassert(test);
- HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((const H5AC_class_t *)(test->cache_info.type) ==
- &(H5AC_EARRAY_TEST[0]));
-
- /* Check for out of order flush */
- if(test->fd_info->base_obj)
- TEST_ERROR
-
- /* Check which index this entry corresponds to */
- if((uint64_t)0 == test->idx) {
- /* Check for out of order flush */
- if(test->fd_info->idx0_obj || test->fd_info->idx0_elem)
- TEST_ERROR
-
- /* Set flag for object flush */
- test->fd_info->idx0_obj = TRUE;
- } /* end if */
- else if((uint64_t)1 == test->idx) {
- /* Check for out of order flush */
- if(test->fd_info->idx1_obj || test->fd_info->idx1_elem)
- TEST_ERROR
-
- /* Set flag for object flush */
- test->fd_info->idx1_obj = TRUE;
- } /* end if */
- else if((uint64_t)10000 == test->idx) {
- /* Check for out of order flush */
- if(test->fd_info->idx10000_obj || test->fd_info->idx10000_elem)
- TEST_ERROR
-
- /* Set flag for object flush */
- test->fd_info->idx10000_obj = TRUE;
- } /* end if */
- else if((uint64_t)-1 == test->idx) {
- /* Set flag for object flush */
- test->fd_info->base_obj = TRUE;
- } /* end if */
-
- return(SUCCEED);
-
-error:
- return(FAIL);
-} /* end earray_cache_test_serialize() */
-
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_free_icr
- *
- * Purpose: Destroy an extensible array test object in memory.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_free_icr(void *thing)
-{
- earray_test_t *test;
-
- HDassert(thing);
- test = (earray_test_t *)thing;
- HDassert(test);
-
- /* the metadata cache sets cache_info.magic to
- * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling the
- * free_icr routine. Hence the following assert:
- */
-
- HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert((const H5AC_class_t *)(test->cache_info.type) ==
- &(H5AC_EARRAY_TEST[0]));
-
- /* Free the shared info itself */
- HDfree(test);
-
- return(SUCCEED);
-} /* end earray_cache_test_free_icr() */
-
-
-/*-------------------------------------------------------------------------
* Function: test_create
*
* Purpose: Test creating extensible array
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index e0a7a73..3986d5a 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -600,7 +600,7 @@ check_group_layout(hid_t fid, const char *group_name)
hid_t gid1 = -1, gid2 = -1; /* group IDs */
H5G_t *grp_ptr = NULL; /* ptr to internal group struct */
haddr_t tag1, tag2; /* MD cache tags for groups */
- int32_t before, during, after; /* cache sizes */
+ uint32_t before, during, after; /* cache sizes */
int i; /* iterator */
/* NOTE: The TESTING() macro is called in main() */
@@ -616,7 +616,7 @@ check_group_layout(hid_t fid, const char *group_name)
HDprintf("\nCACHE BEFORE GROUP OPEN:\n");
if(H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %d\n", before);
+ HDprintf("NUMBER OF CACHE ENTRIES: %u\n", before);
#endif
/* Open the main group and get its tag */
@@ -658,7 +658,7 @@ check_group_layout(hid_t fid, const char *group_name)
if(H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
HDprintf("MAIN GROUP TAG: %#X\n", tag1);
- HDprintf("NUMBER OF CACHE ENTRIES: %d\n", during);
+ HDprintf("NUMBER OF CACHE ENTRIES: %u\n", during);
#endif
/* Close the main group */
@@ -672,7 +672,7 @@ check_group_layout(hid_t fid, const char *group_name)
HDprintf("\nCACHE AFTER CLOSING GROUPS:\n");
if(H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %d\n", after);
+ HDprintf("NUMBER OF CACHE ENTRIES: %u\n", after);
#endif
/* Ensure that the cache does not contain entries with the tag */
@@ -718,7 +718,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
H5D_t *dset_ptr = NULL; /* ptr to internal dset struct */
haddr_t tag; /* MD cache tag for dataset */
int *data = NULL; /* buffer for fake data */
- int32_t before, during, after; /* cache sizes */
+ uint32_t before, during, after; /* cache sizes */
/* NOTE: The TESTING() macro is called in main() */
@@ -737,7 +737,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
HDprintf("\nCACHE BEFORE DATASET OPEN:\n");
if(H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %d\n", before);
+ HDprintf("NUMBER OF CACHE ENTRIES: %u\n", before);
#endif
/* Open dataset and get the metadata tag */
@@ -761,7 +761,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
if(H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
HDprintf("TAG: %#X\n", tag);
- HDprintf("NUMBER OF CACHE ENTRIES: %d\n", during);
+ HDprintf("NUMBER OF CACHE ENTRIES: %u\n", during);
#endif
/* Close the dataset */
@@ -775,7 +775,7 @@ check_dset_scheme(hid_t fid, const char *dset_name)
HDprintf("\nCACHE AFTER DATASET CLOSE:\n");
if(H5AC_dump_cache(file_ptr) < 0)
TEST_ERROR;
- HDprintf("NUMBER OF CACHE ENTRIES: %d\n", after);
+ HDprintf("NUMBER OF CACHE ENTRIES: %u\n", after);
#endif
/* Ensure that the cache does not contain entries with the tag */