From f889f900da402d90c19ed47de86861c21a393413 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Thu, 14 Mar 2024 15:46:38 -0500 Subject: [PATCH] ci: fix test failures --- .github/workflows/autotools.yml | 4 ---- .github/workflows/cmake.yml | 4 ---- .github/workflows/scorecard.yml | 2 +- src/H5FDros3.c | 20 ++++++++------------ test/dt_arith.c | 1 - test/filter_plugin.c | 1 - test/ros3.c | 5 +---- test/s3comms.c | 5 +---- test/th5_system.c | 4 ---- 9 files changed, 11 insertions(+), 35 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 08e21fd7bea..a13a1d22df6 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -71,10 +71,6 @@ jobs: with: build_mode: "production" - call-release-auto-cygwin: - name: "Autotools Cygwin Workflows" - uses: ./.github/workflows/cwin-auto.yml - call-release-auto-aocc: name: "Autotools aocc Workflows" uses: ./.github/workflows/aocc-auto.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e8526d1b725..2555570aa35 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -74,10 +74,6 @@ jobs: with: build_mode: "Release" - call-release-cmake-cygwin: - name: "CMake Cygwin Workflows" - uses: ./.github/workflows/cwin-cmake.yml - call-release-cmake-aocc: name: "CMake aocc Workflows" uses: ./.github/workflows/aocc-cmake.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 6b84feee719..3f072d0782a 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -59,7 +59,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@v4 with: name: SARIF file path: results.sarif diff --git a/src/H5FDros3.c b/src/H5FDros3.c index 65e82ca9b42..321a0a0d9bb 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -655,7 +655,7 @@ H5Pget_fapl_ros3_token(hid_t fapl_id, size_t size, char *token_dst /*out*/) *------------------------------------------------------------------------- */ static herr_t -H5FD__ros3_str_token_copy(const char H5_ATTR_UNUSED *name, size_t size, void *_value) +H5FD__ros3_str_token_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *_value) { char **value = (char **)_value; herr_t ret_value = SUCCEED; @@ -667,8 +667,8 @@ H5FD__ros3_str_token_copy(const char H5_ATTR_UNUSED *name, size_t size, void *_v #endif if (*value) - if (NULL == (*value = strndup(*value, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy string property token for %s", name); + if (NULL == (*value = strdup(*value))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy string property token"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -689,7 +689,7 @@ H5FD__ros3_str_token_copy(const char H5_ATTR_UNUSED *name, size_t size, void *_v *------------------------------------------------------------------------- */ static int -H5FD__ros3_str_token_cmp(const void *_value1, const void *_value2, size_t size) +H5FD__ros3_str_token_cmp(const void *_value1, const void *_value2, size_t H5_ATTR_UNUSED size) { char *const *value1 = (char *const *)_value1; char *const *value2 = (char *const *)_value2; @@ -699,7 +699,7 @@ H5FD__ros3_str_token_cmp(const void *_value1, const void *_value2, size_t size) if (*value1) { if (*value2) - ret_value = strncmp(*value1, *value2, size); + ret_value = strcmp(*value1, *value2); else ret_value = 1; } @@ -728,7 +728,7 @@ H5FD__ros3_str_token_cmp(const void *_value1, const void *_value2, size_t size) *------------------------------------------------------------------------- */ static herr_t -H5FD__ros3_str_token_close(const char *name, size_t size, void *_value) +H5FD__ros3_str_token_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *_value) { char **value = (char **)_value; herr_t ret_value = SUCCEED; @@ -737,8 +737,6 @@ H5FD__ros3_str_token_close(const char *name, size_t size, void *_value) if (*value) free(*value); - else - fprintf(stdout, "H5FD__ros3_str_token_close(%s, %zu) got NULL *value.\n", name, size); FUNC_LEAVE_NOAPI(ret_value) } /* H5FD__ros3_str_token_close */ @@ -759,8 +757,8 @@ H5FD__ros3_str_token_close(const char *name, size_t size, void *_value) *------------------------------------------------------------------------- */ static herr_t - -H5FD__ros3_str_token_delete(hid_t prop_id, const char *name, size_t size, void *_value) +H5FD__ros3_str_token_delete(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, + size_t H5_ATTR_UNUSED size, void *_value) { char **value = (char **)_value; herr_t ret_value = SUCCEED; @@ -769,8 +767,6 @@ H5FD__ros3_str_token_delete(hid_t prop_id, const char *name, size_t size, void * if (*value) free(*value); - else - fprintf(stdout, "H5FD__ros3_str_token_close(%lld, %s, %zu) got NULL *value.\n", prop_id, name, size); FUNC_LEAVE_NOAPI(ret_value) } /* H5FD__ros3_str_token_delete */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 50743bbf79e..9870ea1a556 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -3319,7 +3319,6 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL) return 1; return 1; - #endif } diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 7b00d27ee33..9207d9e847c 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -903,7 +903,6 @@ test_opening_groups_using_plugins(hid_t fid) /* Open all the sub-groups under the top-level group */ for (i = 0; i < N_SUBGROUPS; i++) { - snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX "%d", i); if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0) diff --git a/test/ros3.c b/test/ros3.c index 3989b4801d4..cc058fbc9b0 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -365,7 +365,6 @@ static int s3_test_credentials_loaded = 0; static char s3_test_aws_region[16]; static char s3_test_aws_access_key_id[64]; static char s3_test_aws_secret_access_key[128]; -static char s3_test_session_token[4096]; H5FD_ros3_fapl_t restricted_access_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, /* fapl version */ true, /* authenticate */ @@ -1739,14 +1738,12 @@ main(void) s3_test_aws_access_key_id[0] = '\0'; s3_test_aws_secret_access_key[0] = '\0'; s3_test_aws_region[0] = '\0'; - s3_test_session_token[0] = '\0'; /* attempt to load test credentials * if unable, certain tests will be skipped */ if (SUCCEED == H5FD_s3comms_load_aws_profile(S3_TEST_PROFILE_NAME, s3_test_aws_access_key_id, - s3_test_aws_secret_access_key, s3_test_aws_region, - s3_test_session_token)) { + s3_test_aws_secret_access_key, s3_test_aws_region)) { s3_test_credentials_loaded = 1; strncpy(restricted_access_fa.aws_region, (const char *)s3_test_aws_region, H5FD_ROS3_MAX_REGION_LEN); strncpy(restricted_access_fa.secret_id, (const char *)s3_test_aws_access_key_id, diff --git a/test/s3comms.c b/test/s3comms.c index 8aa5352a104..40f163e8ef2 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -1898,7 +1898,6 @@ test_s3r_open(void) /* authenticating */ - printf("s3_test_aws_security_token=%s\n", s3_test_aws_security_token); handle = H5FD_s3comms_s3r_open( url_shakespeare, (const char *)s3_test_aws_region, (const char *)s3_test_aws_access_key_id, (const unsigned char *)signing_key, (const char *)s3_test_aws_security_token); @@ -2508,7 +2507,6 @@ main(void) s3_test_aws_access_key_id[0] = '\0'; s3_test_aws_secret_access_key[0] = '\0'; s3_test_aws_region[0] = '\0'; - s3_test_aws_security_token[0] = '\0'; s3_test_bucket_url[0] = '\0'; /* TODO: unit/regression test for H5FD_s3comms_load_aws_profile() @@ -2518,8 +2516,7 @@ main(void) * if unable, certain tests will be skipped */ if (SUCCEED == H5FD_s3comms_load_aws_profile(S3_TEST_PROFILE_NAME, s3_test_aws_access_key_id, - s3_test_aws_secret_access_key, s3_test_aws_region, - s3_test_aws_security_token)) { + s3_test_aws_secret_access_key, s3_test_aws_region)) { s3_test_credentials_loaded = 1; } diff --git a/test/th5_system.c b/test/th5_system.c index e2d683010ab..eb6787f9fb8 100644 --- a/test/th5_system.c +++ b/test/th5_system.c @@ -10,10 +10,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifdef __CYGWIN__ -#define _GNU_SOURCE -#endif - #define H5_SYSTEM_TEST_PATH_MAX 4096 /***********************************************************