Skip to content

Commit

Permalink
Fix link iteration test counting skip as a failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Feb 23, 2024
1 parent c48019b commit a902fa5
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 27 deletions.
8 changes: 4 additions & 4 deletions test/API/H5_api_dataset_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,10 +1275,10 @@ test_create_dataset_predefined_types(void)
hid_t fspace_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
hid_t predefined_type_test_table[] = {H5T_STD_U8LE, H5T_STD_U8BE, H5T_STD_I8LE, H5T_STD_I8BE,
H5T_STD_U16LE, H5T_STD_U16BE, H5T_STD_I16LE, H5T_STD_I16BE,
H5T_STD_U32LE, H5T_STD_U32BE, H5T_STD_I32LE, H5T_STD_I32BE,
H5T_STD_U64LE, H5T_STD_U64BE, H5T_STD_I64LE, H5T_STD_I64BE,
H5T_IEEE_F32LE, H5T_IEEE_F32BE, H5T_IEEE_F64LE, H5T_IEEE_F64BE};
H5T_STD_U16LE, H5T_STD_U16BE, H5T_STD_I16LE, H5T_STD_I16BE,
H5T_STD_U32LE, H5T_STD_U32BE, H5T_STD_I32LE, H5T_STD_I32BE,
H5T_STD_U64LE, H5T_STD_U64BE, H5T_STD_I64LE, H5T_STD_I64BE,
H5T_IEEE_F32LE, H5T_IEEE_F32BE, H5T_IEEE_F64LE, H5T_IEEE_F64BE};

TESTING("dataset creation with predefined datatypes");

Expand Down
117 changes: 94 additions & 23 deletions test/API/H5_api_link_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -19679,6 +19679,14 @@ test_link_iterate_hard_links(void)
{
TESTING_2("H5Literate2 by link name in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" API functions for external or user-defined link aren't supported with this "
"connector\n");
PART_EMPTY(H5Literate_link_name_increasing);
}

i = 0;

/* Test basic link iteration capability using both index types and both index orders */
Expand Down Expand Up @@ -20401,6 +20409,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate2 by link name in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_name_increasing);
}

i = 0;

/* Test basic link iteration capability using both index types and both index orders */
Expand All @@ -20425,6 +20439,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate2 by link name in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_name_decreasing);
}

/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;

Expand All @@ -20449,9 +20469,9 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate2 by creation order in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_increasing);
}

Expand Down Expand Up @@ -20479,9 +20499,9 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate2 by creation order in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_decreasing);
}

Expand Down Expand Up @@ -20509,6 +20529,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate_by_name2 by link name in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_link_name_increasing);
}

/* Reset the counter to the appropriate value for the next test */
i = 0;

Expand All @@ -20534,6 +20560,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}

/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;

Expand All @@ -20559,9 +20591,9 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate_by_name2 by creation order in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking or the external link API aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_increasing);
}

Expand Down Expand Up @@ -20591,9 +20623,9 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate_by_name2 by creation order in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking or the external link API are not supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}

Expand Down Expand Up @@ -20838,6 +20870,13 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 by link name in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) ) {
SKIPPED();
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_name_increasing);
}

i = 0;

/* Test basic link iteration capability using both index types and both index orders */
Expand All @@ -20861,6 +20900,13 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 by link name in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) ) {
SKIPPED();
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_name_decreasing);
}

/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;

Expand All @@ -20884,9 +20930,11 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 by creation order in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_increasing);
}

Expand Down Expand Up @@ -20914,9 +20962,11 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 by creation order in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_link_creation_decreasing);
}

Expand Down Expand Up @@ -20944,6 +20994,14 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate_by_name2 by link name in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) ) {
SKIPPED();
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_link_name_increasing);
}

i = 0;

if (H5Literate_by_name2(
Expand All @@ -20968,6 +21026,14 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) ) {
SKIPPED();
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_link_name_decreasing);
}

/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;

Expand All @@ -20993,9 +21059,11 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate_by_name2 by creation order in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) ) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_increasing);
}

Expand Down Expand Up @@ -21024,9 +21092,11 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate_by_name2 by creation order in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_by_name_creation_decreasing);
}

Expand Down Expand Up @@ -21055,9 +21125,11 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 index-saving capabilities in increasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_index_saving_increasing);
}

Expand Down Expand Up @@ -21093,9 +21165,11 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 index-saving capabilities in decreasing order");

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" creation order tracking isn't supported with this VOL connector\n");
printf(" creation order tracking, external links, or user-defined links aren't supported with this VOL connector\n");
PART_EMPTY(H5Literate_index_saving_decreasing);
}

Expand Down Expand Up @@ -25935,7 +26009,6 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
herr_t ret_val = H5_ITER_CONT;

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
printf(" API functions for external links aren't supported with this "
"connector\n");
return 1;
Expand Down Expand Up @@ -26000,7 +26073,6 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
herr_t ret_val = 0;

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" API functions for external or user-defined link aren't supported with this "
"connector\n");
return 1;
Expand Down Expand Up @@ -26089,7 +26161,6 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
int *broken = (int *)op_data;

if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
printf(" API functions for external or user-defined link aren't supported with this "
"connector\n");
return 1;
Expand Down

0 comments on commit a902fa5

Please sign in to comment.