summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <quincey@koziol.cc>2023-04-11 16:30:02 (GMT)
committerGitHub <noreply@github.com>2023-04-11 16:30:02 (GMT)
commit3290889de3d792b5d6224c39430f937b79dfe65d (patch)
treedfe1ecb2843cdbfdaeca48610e210f014d27a7d1 /test
parent49a71463a064a80aec7f67d6de008d892954febf (diff)
downloadhdf5-3290889de3d792b5d6224c39430f937b79dfe65d.zip
hdf5-3290889de3d792b5d6224c39430f937b79dfe65d.tar.gz
hdf5-3290889de3d792b5d6224c39430f937b79dfe65d.tar.bz2
Dead code removal (#2690)
* Correct concurrency bugs when running tests, along with a bugfix & small warning cleanup. * Committing clang-format changes * Allow spaces (and tabs) in VOL connector info string from environment variable. * Parse connector name from HDF5_PLUGIN_PATH environment variable better * Correct H5VLquery_optional to use H5VL routine instead of H5I. Also add an error message to the failure return value from not finding a plugin. * Play nice with existing plugin paths * Use API routine to determine if native connector is terminal. * Committing clang-format changes * Make string size larger, to allow for connectors with longer names. * Be more flexible about testing external pass through connectors, especially if they have registered new optional operations. * Dead code removal * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: AWS ParallelCluster user <ec2-user@ip-10-0-0-65.us-east-2.compute.internal> Co-authored-by: Koziol <qkoziol@88665a374c70.ant.amazon.com>
Diffstat (limited to 'test')
-rw-r--r--test/cache.c217
-rw-r--r--test/cache_api.c42
2 files changed, 5 insertions, 254 deletions
diff --git a/test/cache.c b/test/cache.c
index 3c107f2..517c0b5 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -1052,11 +1052,7 @@ smoke_check_5(int express_test, unsigned paged)
H5C_t *cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
-#if 1
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
-#else
- /* H5C_auto_resize_report_fcn rpt_fcn = */ H5C_def_auto_resize_rpt_fcn,
-#endif
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (2 * 1024 * 1024),
@@ -1093,8 +1089,7 @@ smoke_check_5(int express_test, unsigned paged)
/* int32_t epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.5
- };
+ /* double empty_reserve = */ 0.5};
if (paged)
TESTING("smoke check #5P -- all clean, ins, prot, unprot, AR cache 1");
@@ -1284,11 +1279,7 @@ smoke_check_6(int express_test, unsigned paged)
H5C_t *cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
-#if 1
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
-#else
- /* H5C_auto_resize_report_fcn rpt_fcn = */ H5C_def_auto_resize_rpt_fcn,
-#endif
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (2 * 1024 * 1024),
@@ -1325,8 +1316,7 @@ smoke_check_6(int express_test, unsigned paged)
/* int32_t epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05
- };
+ /* double empty_reserve = */ 0.05};
if (paged)
TESTING("smoke check #6P -- ~1/2 dirty, ins, prot, unprot, AR cache 1");
@@ -1516,11 +1506,7 @@ smoke_check_7(int express_test, unsigned paged)
H5C_t *cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
-#if 1
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
-#else
- /* H5C_auto_resize_report_fcn rpt_fcn = */ H5C_def_auto_resize_rpt_fcn,
-#endif
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (2 * 1024 * 1024),
@@ -1558,8 +1544,7 @@ smoke_check_7(int express_test, unsigned paged)
/* int32_t epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1
- };
+ /* double empty_reserve = */ 0.1};
if (paged)
TESTING("smoke check #7P -- all clean, ins, prot, unprot, AR cache 2");
@@ -1749,11 +1734,7 @@ smoke_check_8(int express_test, unsigned paged)
H5C_t *cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
-#if 1
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
-#else
- /* H5C_auto_resize_report_fcn rpt_fcn = */ H5C_def_auto_resize_rpt_fcn,
-#endif
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (2 * 1024 * 1024),
@@ -1791,8 +1772,7 @@ smoke_check_8(int express_test, unsigned paged)
/* int32_t epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1
- };
+ /* double empty_reserve = */ 0.1};
if (paged)
TESTING("smoke check #8P -- ~1/2 dirty, ins, prot, unprot, AR cache 2");
@@ -4435,13 +4415,6 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
test_entry_t *base_addr;
test_entry_t *entry_ptr;
-#if 0 /* JRM */
- /* This gets used a lot, so lets leave it in. */
-
- HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n",
- test_num);
-#endif /* JRM */
-
if (cache_ptr == NULL) {
pass = FALSE;
@@ -4517,19 +4490,6 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int
(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[u].expected_deserialized),
- (int)(entry_ptr->serialized),
- (int)(spec[u].expected_serialized),
- (int)(entry_ptr->destroyed),
- (int)(spec[u].expected_destroyed));
-
-#endif
-
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in multi entry test #%d.", u,
test_num);
@@ -4613,13 +4573,6 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
test_entry_t *base_addr;
test_entry_t *entry_ptr;
-#if 0 /* JRM */
- /* This is useful debugging code. Leave it in for now. */
-
- HDfprintf(stdout, "check_flush_cache__pe_multi_entry_test: test %d\n",
- test_num);
-#endif /* JRM */
-
if (cache_ptr == NULL) {
pass = FALSE;
@@ -4702,19 +4655,6 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
(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[u].expected_deserialized),
- (int)(entry_ptr->serialized),
- (int)(spec[u].expected_serialized),
- (int)(entry_ptr->destroyed),
- (int)(spec[u].expected_destroyed));
-
-#endif
-
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Bad status on entry %u after flush in pe multi entry test #%d.", u,
test_num);
@@ -8170,11 +8110,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
test_entry_t *base_addr;
test_entry_t *entry_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
-
if (cache_ptr == NULL) {
pass = FALSE;
@@ -8293,21 +8228,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->serialized != spec[i].expected_serialized) ||
(entry_ptr->destroyed != spec[i].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)(entry_ptr->serialized),
- (int)(spec[i].expected_serialized),
- (int)(entry_ptr->destroyed),
- (int)(spec[i].expected_destroyed));
-
- HDfprintf(stdout, "entry_ptr->header.is_dirty = %d\n",
- (int)(entry_ptr->header.is_dirty));
-#endif
-
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Bad status on entry %d after flush op test #%d.", i, test_num);
failure_mssg = msg;
@@ -8345,107 +8265,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
(entry_ptr->serialized != check[i].expected_serialized) ||
(entry_ptr->destroyed != check[i].expected_destroyed)) {
-#if 0 /* This is useful debugging code. Lets keep it around for a while. */
-
- if ( entry_ptr->size != check[i].expected_size ) {
-
- HDfprintf(stdout, "entry_ptr->size (expected) = %d (%d).\n",
- (int)(entry_ptr->size),
- (int)(check[i].expected_size));
- }
-
- if ( ( ! entry_ptr->header.destroy_in_progress ) &&
- ( check[i].in_cache ) &&
- ( entry_ptr->header.size != check[i].expected_size ) ) {
-
- HDfprintf(stdout,
- "(!destroy in progress and in cache and size (expected) = %d (%d).\n",
- (int)(entry_ptr->header.size),
- (int)(check[i].expected_size));
- }
-
- if ( entry_ptr->at_main_addr != check[i].at_main_addr ) {
-
- HDfprintf(stdout,
- "(%d,%d) at main addr (expected) = %d (%d).\n",
- (int)(check[i].entry_type),
- (int)(check[i].entry_index),
- (int)(entry_ptr->at_main_addr),
- (int)(check[i].at_main_addr));
- }
-
- if ( entry_ptr->is_dirty != check[i].is_dirty ) {
-
- HDfprintf(stdout,
- "entry_ptr->is_dirty (expected) = %d (%d).\n",
- (int)(entry_ptr->is_dirty),
- (int)(check[i].is_dirty));
- }
-
- if ( entry_ptr->header.is_dirty != check[i].is_dirty ) {
-
- HDfprintf(stdout,
- "entry_ptr->header.is_dirty (expected) = %d (%d).\n",
- (int)(entry_ptr->header.is_dirty),
- (int)(check[i].is_dirty));
- }
-
- if ( entry_ptr->is_protected != check[i].is_protected ) {
-
- HDfprintf(stdout,
- "entry_ptr->is_protected (expected) = %d (%d).\n",
- (int)(entry_ptr->is_protected),
- (int)(check[i].is_protected));
- }
-
- if ( entry_ptr->header.is_protected != check[i].is_protected ) {
-
- HDfprintf(stdout,
- "entry_ptr->header.is_protected (expected) = %d (%d).\n",
- (int)(entry_ptr->is_protected),
- (int)(check[i].is_protected));
- }
-
- if ( entry_ptr->is_pinned != check[i].is_pinned ) {
-
- HDfprintf(stdout,
- "entry_ptr->is_pinned (expected) = %d (%d).\n",
- (int)(entry_ptr->is_pinned),
- (int)(check[i].is_pinned));
- }
-
- if ( entry_ptr->header.is_pinned != check[i].is_pinned ) {
-
- HDfprintf(stdout,
- "entry_ptr->header.is_pinned (expected) = %d (%d).\n",
- (int)(entry_ptr->header.is_pinned),
- (int)(check[i].is_pinned));
- }
-
- if ( entry_ptr->deserialized != check[i].expected_deserialized ) {
-
- HDfprintf(stdout,
- "entry_ptr->deserialized (expected) = %d (%d).\n",
- (int)(entry_ptr->deserialized),
- (int)(check[i].expected_deserialized));
- }
-
- if ( entry_ptr->serialized != check[i].expected_serialized ) {
-
- HDfprintf(stdout,
- "entry_ptr->serialized (expected) = %d (%d).\n",
- (int)(entry_ptr->serialized),
- (int)(check[i].expected_serialized));
- }
-
- if ( entry_ptr->destroyed != check[i].expected_destroyed ) {
-
- HDfprintf(stdout, \
- "entry_ptr->destroyed (expected) = %d (%d).\n",
- (int)(entry_ptr->destroyed),
- (int)(check[i].expected_destroyed));
- }
-#endif
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Check2 failed on entry %d after flush op test #%d.", i,
test_num);
@@ -11034,17 +10853,6 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
-#if 0 /* This is useful debugging code -- lets keep it for a while */
-
- HDfprintf(stdout,
- "desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n",
- (int)(entry_ptr->deserialized),
- (int)expected_deserialized,
- (int)(entry_ptr->serialized),
- (int)expected_serialized,
- (int)(entry_ptr->destroyed),
- (int)expected_destroyed);
-#endif
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in single entry test #%d.",
test_num);
@@ -11178,16 +10986,6 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e
(entry_ptr->serialized != expected_serialized) ||
(entry_ptr->destroyed != expected_destroyed)) {
-#if 0 /* this is useful debugging code -- keep it around */
- HDfprintf(stdout,
- "desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n",
- (int)(entry_ptr->deserialized),
- (int)expected_deserialized,
- (int)(entry_ptr->serialized),
- (int)expected_serialized,
- (int)(entry_ptr->destroyed),
- (int)expected_destroyed);
-#endif
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"Unexpected entry status after flush in pinned single entry test #%d.", test_num);
@@ -25071,11 +24869,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
uint32_t cur_num_entries;
H5C_auto_size_ctl_t auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
-#if 1
/* H5C_auto_resize_report_fcn rpt_fcn = */ NULL,
-#else
- /* H5C_auto_resize_report_fcn rpt_fcn = */ H5C_def_auto_resize_rpt_fcn,
-#endif
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
@@ -25112,8 +24906,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
/* int32_t epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.5
- };
+ /* double empty_reserve = */ 0.5};
if (paged)
TESTING("automatic cache resize auxiliary functions (paged aggregation)");
diff --git a/test/cache_api.c b/test/cache_api.c
index e325069..a34a6ca 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -759,14 +759,6 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fget_mdc_hit_rate() returned unexpected hit rate.\n";
}
-#if 0 /* this may be useful now and then -- keep it around */
- else {
-
- HDfprintf(stdout,
- "H5Fget_mdc_hit_rate() reports hit_rate = %lf:\n",
- hit_rate);
- }
-#endif
}
if (pass) {
@@ -782,16 +774,6 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).\n";
}
-#if 0 /* this may be useful now and then -- keep it around */
- else {
-
- HDfprintf(stdout, "H5Fget_mdc_size() reports:\n");
- HDfprintf(stdout, " max_size: %ld, min_clean_size: %ld\n",
- (long)max_size, (long)min_clean_size);
- HDfprintf(stdout, " cur_size: %ld, cur_num_entries: %d\n",
- (long)cur_size, cur_num_entries);
- }
-#endif
}
/* close the file and delete it */
@@ -1254,27 +1236,13 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
if (data_chunk[k][l] != ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)) {
valid_chunk = FALSE;
-#if 0 /* this will be useful from time to time -- lets keep it*/
- HDfprintf(stdout,
- "data_chunk[%0d][%0d] = %0d, expect %0d.\n",
- k, l, data_chunk[k][l],
- ((DSET_SIZE * DSET_SIZE * m) +
- (DSET_SIZE * (i + k)) + j + l));
- HDfprintf(stdout,
- "m = %d, i = %d, j = %d, k = %d, l = %d\n",
- m, i, j, k, l);
-#endif
}
}
}
if (!valid_chunk) {
-#if 1
pass = FALSE;
failure_mssg = "slab validation failed.";
-#else /* as above */
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m);
-#endif
}
}
@@ -1366,12 +1334,6 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
valid_chunk = FALSE;
}
-#if 0 /* this will be useful from time to time -- lets keep it */
- HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n",
- k, l, data_chunk[k][l],
- ((DSET_SIZE * DSET_SIZE * m) +
- (DSET_SIZE * (i + k)) + j + l));
-#endif
}
}
@@ -1379,10 +1341,6 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "slab validation failed.";
-#if 0 /* as above */
- HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
- i, j, m);
-#endif
}
}