Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-13583

Investigate making asserts testable inside catch2 framework

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Block Manager
    • None
    • Storage Engines
    • StorEng - Defined Pipeline

      In the current state having both HAVE_DIAGNOSTIC and WT_ASSERT would immediately crash inside a function. This is expected behaviour as usually the logic in the system has gotten seriously wrong. However when creating a unit test for a function, this is not ideal because it becomes hard to unit tests functions that have asserts. Ideally we should be testing all edges cases in a function including ones that would trigger an assert.
      The ticket is to investigate the best possible way for catch2 framework and WT_ASSERT work jointly.

      An option here is to convert all WT_ASSERT calls into return WT_PANIC calls, which will at least give some feedback to the unit testing function that something is not correct.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: