Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-24240

testlib: executing a test with an invalid data label doesn't count as a failure and doesn't return a non-zero exit code

    XMLWordPrintable

Details

    • d23dcc0542 (qt/qtbase/dev) d23dcc0542 (qt/tqtc-qtbase/dev) 2b1be235e0 (qt/qtbase/6.4) 2b1be235e0 (qt/tqtc-qtbase/6.4) dd480c35ce (qt/qtbase/6.3) dd480c35ce (qt/tqtc-qtbase/6.3) e9dcfb729b (qt/tqtc-qtbase/6.2)

    Description

      Attempting to execute a non-existent test function causes testlib to exit with a non-zero return code, but attempting to execute a non-existent data row for a data-driven test returns zero and does not report a failure for the test function that the data was supposed to belong to, e.g.:

      user@host:~/build/qt5/qtbase/tests/auto/testlib/selftests$ counting/counting testPassPass:foobar
      ********* Start testing of tst_Counting *********
      Config: Using QTest library 5.0.0, Qt 5.0.0
      PASS   : tst_Counting::initTestCase()
      Unknown testdata for function testPassPass(): 'foobar'
      Available testdata:
      row 1
      row 2
      PASS   : tst_Counting::cleanupTestCase()
      Totals: 2 passed, 0 failed, 0 skipped
      ********* Finished testing of tst_Counting *********
      user@host:~/build/qt5/qtbase/tests/auto/testlib/selftests$ echo $?
      0
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jimis Dimitrios Apostolou
              jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: