You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marc Batchelor (Jira)" <ji...@apache.org> on 2021/08/27 13:10:00 UTC
[jira] [Created] (SUREFIRE-1940) PpidChecker doesn't work with
MacOS Docker Desktop
Marc Batchelor created SUREFIRE-1940:
----------------------------------------
Summary: PpidChecker doesn't work with MacOS Docker Desktop
Key: SUREFIRE-1940
URL: https://issues.apache.org/jira/browse/SUREFIRE-1940
Project: Maven Surefire
Issue Type: Bug
Components: Maven Surefire Plugin
Affects Versions: 2.22.2
Environment: Jenkins, Mac OSx Big Sur, Docker Desktop
Reporter: Marc Batchelor
Executing surefire in Jenkins OceanBlue pipeline in a docker container on MacOSX, PpidChecker executes /bin/ps -o etime= -p <pid>
The result has leading spaces which the matcher fails to account for:
{noformat}
macthebuilder:platform_main@tmp jenkins$ docker exec -it 171938c2fca2 /bin/sh
$ ps -ef
UID PID PPID C STIME TTY TIME CMD
502 1 0 0 Aug26 pts/0 00:00:00 cat
502 165 0 0 Aug26 pts/1 00:00:00 /bin/bash
502 1133 0 0 11:23 pts/2 00:00:00 /bin/sh
502 1140 1133 0 11:23 pts/2 00:00:00 ps -ef
$ /bin/ps -o etime= -p 165
19:03:02{noformat}
Suggest changing the ps to add a :1, or trimming the output.
{noformat}
$ /bin/ps -o etime:1= -p 165
19:05:49 {noformat}
Note - this also affects your master branch which now looks like this:
{noformat}
$ /bin/ps -o etime,pid -p 165
ELAPSED PID
20:42:20 165 {noformat}
Changing it to include :1 looks like this:
{noformat}
$ /bin/ps -o etime:1,pid:1 -p 165
ELAPSED PID
20:43:28 165
{noformat}
Of course, you could trim leading spaces before you apply the matcher, or add 0 or more spaces at the beginning of the pattern(s).
One other thing - it would be mighty helpful to have some kind of configuration work-around for this in the future. I wish I could just supply the ps statement that works in our environment in the surefire configuration in the POM. Right now, it looks like I'll have to disable forking in our surefire configuration.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)