From 67f3f3ed350bc547f256a0323b206604ab3e9ce7 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 6 May 2021 10:39:41 -0400 Subject: tests: Invoke ps in a way that does not truncate wide output. By default, 'ps' truncates its output to about 100 characters. The test-termination test depends on finding the socket file name in the output of the 'ps' command; it could fail depending on the file name length of the directory where the test was run. * tests/test-termination.c (get_daemon_pid) : Invoke with the -ww option to preserve all the output. --- tests/test-termination.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-termination.c b/tests/test-termination.c index 5f9f221..1562bfb 100644 --- a/tests/test-termination.c +++ b/tests/test-termination.c @@ -59,7 +59,7 @@ static void check(int line, const char *cond_str, int cond_value) static pid_t get_daemon_pid(void) { pid_t res = 0; - FILE *f = popen("ps -ef", "r"); + FILE *f = popen("ps -efww", "r"); check(f != NULL); char line[1024]; while (fgets(line, sizeof(line), f)) { -- cgit v1.2.3