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

Investigate setting warn_unused_result on WiredTiger API functions in testing

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: APIs
    • Storage Engines
    • 5
    • StorEng - Defined Pipeline

      This is motivated by WT-13880 where a session->truncate wasn't wrapped in testutil_check so the invalid API call failed silently.

      WiredTiger adds WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)) too all of its internal functions to prevent issues like this, but we don't set it on the public API functions of session/connection/cursor.

      This is reasonable as we don't want to overly constrain external users, but it would be good to have a flag that enforces this for our testing.

      The scope of this ticket is a timeboxed investigation of enabling warn_unused_result - or an alternate flag that does the same thing - for our csuite and cppsuite testing.
      We need to make sure this flag is only enabled when explicitly requested by a user. i.e. this flag should not be enabled by setting HAVE_DIAGNOSTIC.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: