Fix checking of HDF5_VOL_CONNECTOR env. var. in some tests (#6073)

This commit is contained in:
jhendersonHDF
2025-12-01 11:21:19 -06:00
committed by GitHub
parent 5f9d12601c
commit bd9e443e82
3 changed files with 8 additions and 4 deletions
+3 -1
View File
@@ -208,7 +208,9 @@ main(int argc, char **argv)
snprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, TEST_FILE_NAME);
if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) {
vol_connector_string = getenv(HDF5_VOL_CONNECTOR);
if (!vol_connector_string || *vol_connector_string == '\0') {
printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";
vol_connector_info = NULL;
+2 -2
View File
@@ -2047,7 +2047,7 @@ test_async_vol_props(void)
/* Override possible environment variable & re-initialize default VOL connector */
conn_env_str = getenv(HDF5_VOL_CONNECTOR);
if (conn_env_str) {
if (conn_env_str && *conn_env_str) {
if (NULL == (conn_env_str = strdup(conn_env_str)))
TEST_ERROR;
if (HDunsetenv(HDF5_VOL_CONNECTOR) < 0)
@@ -2292,7 +2292,7 @@ test_get_vol_name(void)
TESTING("getting connector name");
conn_env_str = getenv(HDF5_VOL_CONNECTOR);
if (NULL == (conn_env_str = getenv("HDF5_VOL_CONNECTOR")))
if (!conn_env_str || *conn_env_str == '\0')
conn_env_str = "native";
/* Skip the connectors other than the native and pass_through connector */
+3 -1
View File
@@ -296,7 +296,9 @@ main(int argc, char **argv)
snprintf(H5_api_test_parallel_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix,
PARALLEL_TEST_FILE_NAME);
if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) {
vol_connector_string = getenv(HDF5_VOL_CONNECTOR);
if (!vol_connector_string || *vol_connector_string == '\0') {
if (MAINPROCESS)
printf("No VOL connector selected; using native VOL connector\n");
vol_connector_name = "native";