Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35284

C++ "death test" unit tests should fork before constructing the test fixture, not after.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.3, 4.1.1
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0

      Description

      The C++ death test implementation on posix systems uses fork to produce a child process in which to run the test that is expected to terminate the process. The current implementation constructs the test fixture and then forks the process. However, this behavior is incorrect, because the test fixture constructor may create threads. The fixture should be constructed in the child process after the call to fork().

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: