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

Fix issues related to inheritance in the cpp testing framework

    XMLWordPrintable

    Details

    • Type: Technical Debt
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.1, 5.0.4, 5.2.0, 5.1.0-rc1, 4.4.11
    • Component/s: None
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      Storage - Ra 2021-10-18

      Description

      Issue 1:

      Our tests inherit from the base class test. We should define the destructor of the test class as virtual. The current implementation is not safeĀ and may result in memory leaks and undefined behaviors. We should make sure each base class has a virtual destructor.

      Issue 2:

      The current code generates a warning on MacOS:

        CXX      tests/run.o
      In file included from ../../../test/cppsuite/tests/run.cxx:38:
      ../../../test/cppsuite/tests/example_test.cxx:40:5: warning: 'run' overrides a member function but
            is not marked 'override' [-Winconsistent-missing-override]
          run()
          ^
      ../../../test/cppsuite/test_harness/test.h:72:18: note: overridden virtual function is here
          virtual void run();
                       ^
      1 warning generated. 

      The keywords override final are missing in example_test.cxx.

      Definition of done:

      Address the issues described above, check all CPP tests are OK.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              monica.ng Monica Ng
              Reporter:
              etienne.petrel Etienne Petrel
              Collaborators:
              Etienne Petrel, Jeremy Thorp
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: