Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3279

Test suite segfaults in some failure cases

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 100.7.1
    • Affects Version/s: None
    • Component/s: All Tools
    • Labels:
      None

      Problem Statement/Rationale

      While testing TOOLS-3203 I noticed a segfault among several apparently-spurious test failures. These appear to arise from our use of t.Error/Errorf when we should be using Skip/Skipf or Fatal/Fatalf; i.e., the intent is apparently that the test stop execution because setup failed. The fact that the test keeps going causes a segfault due to nil pointer dereference.

      Steps to Reproduce

      On my laptop, at least, all that's needed is to run the tests.

      Expected Results

      Whatever failures happen shouldn't trigger segfaults. I should see the test suite complete, even if it doesn't pass.

      Actual Results

      I see a segfault, which seems to cause a premature exit of the test suite. (If nothing else, it makes the test output harder to read.)

            Assignee:
            felipe.gasper@mongodb.com Felipe Gasper
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Dave Rolsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: