[ https://issues.apache.org/jira/browse/SUREFIRE-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed SUREFIRE-1940. ------------------------------------ Resolution: Incomplete No reaction for more than a year. > 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 > Priority: Major > Labels: Docker, macOS > > 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.20.10#820010)