diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c index b33e15aef0..1602aa6393 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -491,6 +491,7 @@ static void test_u64log2(void) { static void test_get_process_comm(void) { struct stat st; _cleanup_free_ char *a = NULL, *c = NULL, *d = NULL, *f = NULL, *i = NULL, *cwd = NULL, *root = NULL; + _cleanup_free_ char *env = NULL; unsigned long long b; pid_t e; uid_t u; @@ -543,6 +544,10 @@ static void test_get_process_comm(void) { assert_se(r >= 0 || r == -EACCES); log_info("pid1 root: '%s'", root); + r = get_process_environ(me, &env); + assert_se(r >= 0 || r == -EACCES); + log_info("self strlen(environ): '%zd'", strlen(env)); + assert_se(get_ctty_devnr(1, &h) == -ENOENT); getenv_for_pid(1, "PATH", &i); |