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

Fix issues related to inheritance in the cpp testing framework

    XMLWordPrintable

Details

    • Technical Debt
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • WT10.0.1, 5.0.4, 5.2.0, 5.1.0-rc1, 4.4.11
    • None
    • None
    • 5
    • 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

        1. diff.rtf
          15 kB
          Etienne Petrel

        Issue Links

          Activity

            People

              monica.ng@mongodb.com Monica Ng
              etienne.petrel@mongodb.com Etienne Petrel
              Etienne Petrel, Jeremy Thorp
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: