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

Death Test invoked via PATH fails to exec itself

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2022-10-31, Service Arch 2022-11-14

      I have added build/install/bin/ to my PATH:

      ~/mongo$ echo $PATH | tr : '\n'| grep install
      /home/ubuntu/mongo/build/install/bin
      

      While this appears to work for mongod, mongo, and most unit tests, it makes death tests fail:

      ~/mongo$ base_test --suite ErrorExtraInfo --filter InvariantAllRegistered
      ...
      {"t":{"$date":"2022-10-19T18:58:16.958Z"},"s":"I",  "c":"TEST",     "id":23068,   "ctx":"main","msg":"FAILURE","attr":{"failedTestsCount":1,"failedSuitesCount":1,"failedTests":["ErrorExtraInfo/InvariantAllRegistered"]}}
      

      The child process prints this error:

      {"t":{"$date":"2022-10-19T18:59:51.851Z"},"s":"I",  "c":"TEST",     "id":4680101, "ctx":"main","msg":"Result","attr":{"suite":{"name":"ErrorExtraInfo","tests":1,"fails":1,"asserts":0,"time":{"durationMillis":1},"failures":[{"test":"InvariantAllRegistered","type":"std::exception","error":"execv(avp.front(), avp.data()) failed: No such file or directory @src/mongo/unittest/death_test.cpp:247"}]}}}
      

      When I use an explicit path, the test passes:

      ~/mongo$ build/install/bin/base_test --suite ErrorExtraInfo --filter InvariantAllRegistered
      ...
      {"t":{"$date":"2022-10-19T18:58:51.490Z"},"s":"I",  "c":"TEST",     "id":23069,   "ctx":"main","msg":"SUCCESS - All tests in all suites passed"}
      

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: