Skip to content

Commit

Permalink
Add new -testexpress option to testframe testing framework
Browse files Browse the repository at this point in the history
Adds new -testexpress command-line option to the testframe testing
framework to allow setting or overriding of the TestExpress level
at runtime

Adds macros for the different currently defined TestExpress levels
  • Loading branch information
jhendersonHDF committed Jan 30, 2025
1 parent 55bfec8 commit a66a7f1
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 111 deletions.
12 changes: 6 additions & 6 deletions test/btree2.c
Original file line number Diff line number Diff line change
Expand Up @@ -9928,10 +9928,10 @@ main(void)
localTestExpress = h5_get_testexpress();

/* For the Direct I/O driver, skip intensive tests due to poor performance */
if (localTestExpress < 2 && !strcmp(driver_name, "direct"))
localTestExpress = 2;
if (localTestExpress < H5_TEST_EXPRESS_QUICK && !strcmp(driver_name, "direct"))
localTestExpress = H5_TEST_EXPRESS_QUICK;

if (localTestExpress > 0)
if (localTestExpress > H5_TEST_EXPRESS_EXHAUSTIVE)
printf("***Express test mode %d. Some tests may be skipped\n", localTestExpress);

/* Initialize v2 B-tree creation parameters */
Expand Down Expand Up @@ -9968,7 +9968,7 @@ main(void)
nerrors += test_insert_level2_2internal_split(fapl, &cparam, &tparam);
nerrors += test_insert_level2_3internal_redistrib(fapl, &cparam, &tparam);
nerrors += test_insert_level2_3internal_split(fapl, &cparam, &tparam);
if (localTestExpress > 1)
if (localTestExpress > H5_TEST_EXPRESS_FULL)
printf("***Express test mode on. test_insert_lots skipped\n");
else
nerrors += test_insert_lots(fapl, &cparam, &tparam);
Expand All @@ -9982,7 +9982,7 @@ main(void)
nerrors += test_update_level1_3leaf_redistrib(fapl, &cparam2, &tparam);
nerrors += test_update_level1_middle_split(fapl, &cparam2, &tparam);
nerrors += test_update_make_level2(fapl, &cparam2, &tparam);
if (localTestExpress > 1)
if (localTestExpress > H5_TEST_EXPRESS_FULL)
printf("***Express test mode on. test_update_lots skipped\n");
else
nerrors += test_update_lots(fapl, &cparam2, &tparam);
Expand All @@ -10009,7 +10009,7 @@ main(void)
nerrors += test_remove_level2_2internal_merge_right(fapl, &cparam, &tparam);
nerrors += test_remove_level2_3internal_merge(fapl, &cparam, &tparam);
nerrors += test_remove_level2_collapse_right(fapl, &cparam, &tparam);
if (localTestExpress > 1)
if (localTestExpress > H5_TEST_EXPRESS_FULL)
printf("***Express test mode on. test_remove_lots skipped\n");
else
nerrors += test_remove_lots(driver_name, fapl, &cparam);
Expand Down
88 changes: 44 additions & 44 deletions test/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,22 @@ smoke_check_1(int express_test, unsigned paged)
else
TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -457,22 +457,22 @@ smoke_check_2(int express_test, unsigned paged)
else
TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -651,22 +651,22 @@ smoke_check_3(int express_test, unsigned paged)
else
TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -846,22 +846,22 @@ smoke_check_4(int express_test, unsigned paged)
else
TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -1081,22 +1081,22 @@ smoke_check_5(int express_test, unsigned paged)
else
TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -1305,7 +1305,7 @@ smoke_check_6(int express_test, unsigned paged)
else
TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
Expand All @@ -1314,15 +1314,15 @@ smoke_check_6(int express_test, unsigned paged)
pass = true;

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -1530,22 +1530,22 @@ smoke_check_7(int express_test, unsigned paged)
else
TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -1755,22 +1755,22 @@ smoke_check_8(int express_test, unsigned paged)
else
TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -1945,22 +1945,22 @@ smoke_check_9(int express_test, unsigned paged)
else
TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -2249,22 +2249,22 @@ smoke_check_10(int express_test, unsigned paged)
else
TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked");

if (paged && (express_test > 0)) {
if (paged && (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)) {

SKIPPED();
return (0);
}

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -2554,15 +2554,15 @@ write_permitted_check(int
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS

switch (express_test) {
case 0:
case H5_TEST_EXPRESS_EXHAUSTIVE:
max_index = (10 * 1024) - 1;
break;

case 1:
case H5_TEST_EXPRESS_FULL:
max_index = (1 * 1024) - 1;
break;

case 2:
case H5_TEST_EXPRESS_QUICK:
max_index = (512) - 1;
break;

Expand Down Expand Up @@ -32427,7 +32427,7 @@ main(void)

fprintf(stdout, "\n\nRe-running tests with paged aggregation:\n");

if (express_test > 0)
if (express_test > H5_TEST_EXPRESS_EXHAUSTIVE)
fprintf(stdout, " Skipping smoke checks.\n");

fprintf(stdout, "\n");
Expand Down
2 changes: 1 addition & 1 deletion test/cache_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)

pass = true;

if (express_test > 0) {
if (express_test > H5_TEST_EXPRESS_EXHAUSTIVE) {

SKIPPED();

Expand Down
12 changes: 6 additions & 6 deletions test/fheap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15985,9 +15985,9 @@ main(void)
* in the future for parallel build.
*/
test_express = h5_get_testexpress();
if (test_express > 0)
if (test_express > H5_TEST_EXPRESS_EXHAUSTIVE)
printf("***Express test mode %d. Some tests may be skipped\n", test_express);
else if (test_express == 0) {
else if (test_express == H5_TEST_EXPRESS_EXHAUSTIVE) {
#ifdef H5_HAVE_PARALLEL
num_pb_fs = NUM_PB_FS - 2;
#else
Expand Down Expand Up @@ -16203,7 +16203,7 @@ main(void)
/* If this test fails, uncomment the tests above, which build up to this
* level of complexity gradually. -QAK
*/
if (test_express > 1)
if (test_express > H5_TEST_EXPRESS_FULL)
printf(
"***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n");
else
Expand Down Expand Up @@ -16251,7 +16251,7 @@ main(void)
nerrors += test_man_remove_first_row(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_first_two_rows(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_first_four_rows(fapl, &small_cparam, &tparam);
if (test_express > 1)
if (test_express > H5_TEST_EXPRESS_FULL)
printf("***Express test mode on. Some tests skipped\n");
else {
nerrors += test_man_remove_all_root_direct(fapl, &small_cparam, &tparam);
Expand Down Expand Up @@ -16301,7 +16301,7 @@ main(void)
nerrors +=
test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(
fapl, &small_cparam, &tparam);
if (test_express > 1)
if (test_express > H5_TEST_EXPRESS_FULL)
printf("***Express test mode on. Some tests skipped\n");
else {
nerrors +=
Expand Down Expand Up @@ -16431,7 +16431,7 @@ main(void)
} /* end block */

/* Random object insertion & deletion */
if (test_express > 1)
if (test_express > H5_TEST_EXPRESS_FULL)
printf("***Express test mode on. Some tests skipped\n");
else {
/* Random tests using "small" heap creation parameters */
Expand Down
Loading

0 comments on commit a66a7f1

Please sign in to comment.