diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-05-06 10:39:41 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-05-06 10:45:27 -0400 |
commit | 67f3f3ed350bc547f256a0323b206604ab3e9ce7 (patch) | |
tree | b5816316b3df73cceb3f11af017d5d366d4a75de | |
parent | 8348ef3c6121247e2b8be0641bbf3df3d55d9bff (diff) |
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) <ps>: Invoke with the -ww
option to preserve all the output.
-rw-r--r-- | tests/test-termination.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)) { |