diff --git a/test/rte/ompi_session_dir.c b/test/rte/ompi_session_dir.c index 427357c2b7..d2f977efc4 100644 --- a/test/rte/ompi_session_dir.c +++ b/test/rte/ompi_session_dir.c @@ -14,8 +14,7 @@ #include "include/constants.h" #include "util/sys_info.h" #include "util/os_path.h" - -int ompi_session_dir_init(char *prefix); +#include "rte/universe/os_session_dir.h" static bool test1(void); /* given prefix, both one that works and one that fails */ static bool test2(void); /* no prefix given, LAM_PREFIX_ENV set, one good and one bad */ @@ -83,13 +82,13 @@ static bool test1(void) /* see if we can create a specified path */ prefix = ompi_os_path(false, "tmp", NULL); - if (LAM_ERROR == ompi_session_dir_init(prefix)) { + if (LAM_ERROR == ompi_session_dir_init(prefix, "test-universe")) { free(prefix); return(false); } /* see if it can access an existing path */ - if (LAM_ERROR == ompi_session_dir_init(prefix)) { + if (LAM_ERROR == ompi_session_dir_init(prefix, "test-universe")) { free(prefix); return(false); } @@ -103,7 +102,7 @@ static bool test1(void) /* check what happens when given prefix that won't allow access */ tmp2 = ompi_os_path(false, "test", NULL); /* assume we don't have root privileges */ - if (LAM_SUCCESS == ompi_session_dir_init(tmp2)) { + if (LAM_SUCCESS == ompi_session_dir_init(tmp2, "test-universe")) { printf("created temp directory in %s - shouldn't have been able to do so\n", tmp2); rmdir(ompi_system_info.session_dir); tmp = strdup(dirname(ompi_system_info.session_dir)); @@ -125,7 +124,7 @@ static bool test2(void) setenv("LAM_PREFIX_ENV", "/tmp/trythis", 1); - if (LAM_ERROR == ompi_session_dir_init(NULL)) { + if (LAM_ERROR == ompi_session_dir_init(NULL, "test-universe")) { unsetenv("LAM_PREFIX_ENV"); return(false); } @@ -149,7 +148,7 @@ static bool test3(void) setenv("TMPDIR", "/tmp/trythis", 1); - if (LAM_ERROR == ompi_session_dir_init(NULL)) { + if (LAM_ERROR == ompi_session_dir_init(NULL, "test-universe")) { unsetenv("TMPDIR"); return(false); } @@ -172,7 +171,7 @@ static bool test4(void) setenv("TMP", "/tmp/trythis", 1); - if (LAM_ERROR == ompi_session_dir_init(NULL)) { + if (LAM_ERROR == ompi_session_dir_init(NULL, "test-universe")) { unsetenv("TMP"); return(false); } @@ -195,7 +194,7 @@ static bool test5(void) setenv("HOME", "/tmp/trythis", 1); - if (LAM_ERROR == ompi_session_dir_init(NULL)) { + if (LAM_ERROR == ompi_session_dir_init(NULL, "test-universe")) { unsetenv("HOME"); return(false); } @@ -219,7 +218,7 @@ static bool test6(void) * Program should turn to default of /tmp (where "/" is whatever * top-level directory is appropriate for given system) */ - if (LAM_ERROR == ompi_session_dir_init(NULL)) { + if (LAM_ERROR == ompi_session_dir_init(NULL, "test-universe")) { return(false); }