Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
2.22.2
-
None
-
Jenkins, Mac OSx Big Sur, Docker Desktop
Description
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:
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
Suggest changing the ps to add a :1, or trimming the output.
$ /bin/ps -o etime:1= -p 165 19:05:49
Note - this also affects your master branch which now looks like this:
$ /bin/ps -o etime,pid -p 165 ELAPSED PID 20:42:20 165
Changing it to include :1 looks like this:
$ /bin/ps -o etime:1,pid:1 -p 165 ELAPSED PID 20:43:28 165
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.
Attachments
Issue Links
- is related to
-
SUREFIRE-1422 Forking fails on Linux if /bin/ps isn't available
- Closed
-
SUREFIRE-1941 Allow overriding PpidChecker OS command line in POM configuration
- Open