diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 20:11:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 20:11:52 (GMT) |
commit | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (patch) | |
tree | 30f007ff79b87a79c882d9149cdbfcb797be92e1 /test/ros3.c | |
parent | ae1379094b71c51342772397af5caca088862a61 (diff) | |
download | hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.zip hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.tar.gz hdf5-920869796031ed4ee9c1fbea8aaccda3592a88b3.tar.bz2 |
Convert hbool_t --> bool in test (#3494)
Diffstat (limited to 'test/ros3.c')
-rw-r--r-- | test/ros3.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/test/ros3.c b/test/ros3.c index 267aa0a..52470f2 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -349,12 +349,12 @@ jserr_str(const char *expected, const char *actual, const char *reason) #define S3_TEST_RESOURCE_H5_PUBLIC "GMODO-SVM01.h5" #define S3_TEST_RESOURCE_MISSING "missing.csv" -static char url_text_restricted[S3_TEST_MAX_URL_SIZE] = ""; -static char url_text_public[S3_TEST_MAX_URL_SIZE] = ""; -static char url_h5_public[S3_TEST_MAX_URL_SIZE] = ""; -static char url_missing[S3_TEST_MAX_URL_SIZE] = ""; -static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = ""; -static hbool_t s3_test_bucket_defined = FALSE; +static char url_text_restricted[S3_TEST_MAX_URL_SIZE] = ""; +static char url_text_public[S3_TEST_MAX_URL_SIZE] = ""; +static char url_h5_public[S3_TEST_MAX_URL_SIZE] = ""; +static char url_missing[S3_TEST_MAX_URL_SIZE] = ""; +static char s3_test_bucket_url[S3_TEST_MAX_URL_SIZE] = ""; +static bool s3_test_bucket_defined = false; /* Global variables for aws test profile. * An attempt is made to read ~/.aws/credentials and ~/.aws/config upon test @@ -367,12 +367,12 @@ static char s3_test_aws_access_key_id[64]; static char s3_test_aws_secret_access_key[128]; H5FD_ros3_fapl_t restricted_access_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, /* fapl version */ - TRUE, /* authenticate */ + true, /* authenticate */ "", /* aws region */ "", /* access key id */ ""}; /* secret access key */ -H5FD_ros3_fapl_t anonymous_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, FALSE, "", "", ""}; +H5FD_ros3_fapl_t anonymous_fa = {H5FD_CURR_ROS3_FAPL_T_VERSION, false, "", "", ""}; /*--------------------------------------------------------------------------- * @@ -427,7 +427,7 @@ test_fapl_config_validation(void) SUCCEED, { H5FD_CURR_ROS3_FAPL_T_VERSION, /* version */ - FALSE, /* authenticate */ + false, /* authenticate */ "", /* aws_region */ "", /* secret_id */ "", /* secret_key */ @@ -438,7 +438,7 @@ test_fapl_config_validation(void) FAIL, { H5FD_CURR_ROS3_FAPL_T_VERSION, - TRUE, + true, "", "", "", @@ -449,7 +449,7 @@ test_fapl_config_validation(void) SUCCEED, { H5FD_CURR_ROS3_FAPL_T_VERSION, - TRUE, + true, "region", "me", "", @@ -460,7 +460,7 @@ test_fapl_config_validation(void) FAIL, { H5FD_CURR_ROS3_FAPL_T_VERSION, - TRUE, + true, "", "me", "", @@ -471,7 +471,7 @@ test_fapl_config_validation(void) FAIL, { H5FD_CURR_ROS3_FAPL_T_VERSION, - TRUE, + true, "where", "", "", @@ -482,7 +482,7 @@ test_fapl_config_validation(void) SUCCEED, { H5FD_CURR_ROS3_FAPL_T_VERSION, - TRUE, + true, "where", "who", "thisIsA GREAT seeeecrit", @@ -493,7 +493,7 @@ test_fapl_config_validation(void) FAIL, { 12345, - FALSE, + false, "", "", "", @@ -505,7 +505,7 @@ test_fapl_config_validation(void) SUCCEED, { H5FD_CURR_ROS3_FAPL_T_VERSION, - FALSE, + false, "someregion", "someid", "somekey", @@ -519,7 +519,7 @@ test_fapl_config_validation(void) * TESTS * *********/ - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -625,7 +625,7 @@ test_ros3_fapl(void) unsigned long driver_flags = 0; /* VFD feature flags */ H5FD_ros3_fapl_t ros3_fa_0 = { H5FD_CURR_ROS3_FAPL_T_VERSION, /* version */ - FALSE, /* authenticate */ + false, /* authenticate */ "", /* aws_region */ "", /* secret_id */ "plugh", /* secret_key */ @@ -786,7 +786,7 @@ test_vfd_open(void) }, }; H5FD_t *fd = NULL; - hbool_t curl_ready = FALSE; + bool curl_ready = false; hid_t fapl_id = -1; hid_t fapl_file_access = -1; unsigned i = 0; @@ -794,7 +794,7 @@ test_vfd_open(void) TESTING("ROS3 VFD-level open"); - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -802,7 +802,7 @@ test_vfd_open(void) } FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) - curl_ready = TRUE; + curl_ready = true; fapl_file_access = H5Pcreate(H5P_FILE_ACCESS); FAIL_IF(fapl_file_access < 0) @@ -858,7 +858,7 @@ test_vfd_open(void) fapl_file_access = -1; curl_global_cleanup(); - curl_ready = FALSE; + curl_ready = false; PASSED(); return 0; @@ -885,7 +885,7 @@ error: } H5E_END_TRY } - if (curl_ready == TRUE) { + if (curl_ready == true) { curl_global_cleanup(); } @@ -929,7 +929,7 @@ test_eof_eoa(void) ************************/ H5FD_t *fd_shakespeare = NULL; - hbool_t curl_ready = FALSE; + bool curl_ready = false; hid_t fapl_id = -1; TESTING("ROS3 eof/eoa gets and sets"); @@ -941,7 +941,7 @@ test_eof_eoa(void) return 0; } - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -953,7 +953,7 @@ test_eof_eoa(void) *********/ FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) - curl_ready = TRUE; + curl_ready = true; fapl_id = H5Pcreate(H5P_FILE_ACCESS); FAIL_IF(0 > fapl_id) @@ -995,7 +995,7 @@ test_eof_eoa(void) fapl_id = -1; curl_global_cleanup(); - curl_ready = FALSE; + curl_ready = false; PASSED(); return 0; @@ -1007,7 +1007,7 @@ error: if (fd_shakespeare) (void)H5FDclose(fd_shakespeare); - if (TRUE == curl_ready) + if (true == curl_ready) curl_global_cleanup(); if (fapl_id >= 0) { H5E_BEGIN_TRY @@ -1049,7 +1049,7 @@ test_H5FDread_without_eoa_set_fails(void) return 0; } - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -1220,7 +1220,7 @@ test_read(void) return 0; } - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -1347,14 +1347,14 @@ test_noops_and_autofails(void) * test-local variables * ************************/ - hbool_t curl_ready = FALSE; + bool curl_ready = false; hid_t fapl_id = -1; H5FD_t *file = NULL; const char data[36] = "The Force shall be with you, always"; TESTING("ROS3 VFD always-fail and no-op routines"); - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -1366,7 +1366,7 @@ test_noops_and_autofails(void) *********/ FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) - curl_ready = TRUE; + curl_ready = true; /* create ROS3 fapl */ @@ -1388,10 +1388,10 @@ test_noops_and_autofails(void) H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data), "write must fail")} H5E_END_TRY - H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY + H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, false), "truncate must fail")} H5E_END_TRY H5E_BEGIN_TRY{ - JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY + JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, true), "truncate must fail (closing)")} H5E_END_TRY /************ * TEARDOWN * @@ -1404,7 +1404,7 @@ test_noops_and_autofails(void) fapl_id = -1; curl_global_cleanup(); - curl_ready = FALSE; + curl_ready = false; PASSED(); return 0; @@ -1424,7 +1424,7 @@ error: if (file) { (void)H5FDclose(file); } - if (curl_ready == TRUE) { + if (curl_ready == true) { curl_global_cleanup(); } @@ -1466,7 +1466,7 @@ test_cmp(void) H5FD_t *fd_raven = NULL; H5FD_t *fd_shakes = NULL; H5FD_t *fd_raven_2 = NULL; - hbool_t curl_ready = FALSE; + bool curl_ready = false; hid_t fapl_id = -1; TESTING("ROS3 cmp (comparison)"); @@ -1478,7 +1478,7 @@ test_cmp(void) return 0; } - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -1490,7 +1490,7 @@ test_cmp(void) *********/ FAIL_IF(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) - curl_ready = TRUE; + curl_ready = true; fapl_id = H5Pcreate(H5P_FILE_ACCESS); FAIL_IF(0 > fapl_id) @@ -1527,7 +1527,7 @@ test_cmp(void) fapl_id = -1; curl_global_cleanup(); - curl_ready = FALSE; + curl_ready = false; PASSED(); return 0; @@ -1543,7 +1543,7 @@ error: (void)H5FDclose(fd_raven_2); if (fd_shakes != NULL) (void)H5FDclose(fd_shakes); - if (TRUE == curl_ready) + if (true == curl_ready) curl_global_cleanup(); if (fapl_id >= 0) { H5E_BEGIN_TRY @@ -1599,7 +1599,7 @@ test_H5F_integration(void) return 0; } - if (FALSE == s3_test_bucket_defined) { + if (false == s3_test_bucket_defined) { SKIPPED(); HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); fflush(stdout); @@ -1702,7 +1702,7 @@ main(void) } else { HDstrncpy(s3_test_bucket_url, bucket_url_env, S3_TEST_MAX_URL_SIZE); - s3_test_bucket_defined = TRUE; + s3_test_bucket_defined = true; } if (S3_TEST_MAX_URL_SIZE < HDsnprintf(url_text_restricted, (size_t)S3_TEST_MAX_URL_SIZE, "%s/%s", |