Skip to content

Commit

Permalink
ci: fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Mar 14, 2024
1 parent 808b493 commit f889f90
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 35 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 8 additions & 12 deletions src/H5FDros3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand All @@ -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;
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
Expand All @@ -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 */
Expand All @@ -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;
Expand All @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion test/dt_arith.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion test/filter_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions test/ros3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions test/s3comms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()
Expand All @@ -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;
}

Expand Down
4 changes: 0 additions & 4 deletions test/th5_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifdef __CYGWIN__
#define _GNU_SOURCE
#endif

#define H5_SYSTEM_TEST_PATH_MAX 4096

/***********************************************************
Expand Down

0 comments on commit f889f90

Please sign in to comment.