Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1940

PpidChecker doesn't work with MacOS Docker Desktop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 2.22.2
    • None
    • Maven Surefire Plugin
    • 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

          Activity

            People

              Unassigned Unassigned
              mbatchelor Marc Batchelor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: