mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Fix checking of HDF5_VOL_CONNECTOR env. var. in some tests (#6073)
This commit is contained in:
@@ -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
@@ -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 */
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user