Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-15975

Improper Popen.wait() return code handling in dev/run-tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.5.3, 1.6.2, 2.0.0
    • Project Infra
    • None

    Description

      In dev/run-tests.py there's a line where we effectively do

      retcode = some_popen_instance.wait()
      if retcode > 0:
        err
      # else do nothing
      

      but this code is subtlety wrong because Popen's return code will be negative if the child process was terminated by a signal: https://docs.python.org/2/library/subprocess.html#subprocess.Popen.returncode

      We should change this to retcode != 0 so that we properly error out and exit due to termination by signal.

      Attachments

        Activity

          People

            joshrosen Josh Rosen
            joshrosen Josh Rosen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: