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

Fix insignificant qprinter test

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.3.0 RC1
    • Component/s: GUI: Printing
    • Labels:
      None
    • Technical Risk:
      Normal
    • Commits:
      2c175d3748dc60469c65ba005001f43a6d3b6243

      Description

      qtbase/tests/auto/printsupport/kernel/qprinter/qprinter.pro is marked as an insignificant_test, meaning that test resultss are discarded and do not help the CI system to block regressions.

      Recent test runs seem to show the test passing on linux, being skipped on Windows and failing in several different ways on Mac.

      example of failure on mac
      4/13/12 10:27:19 AM EST: Testing tst_QPrinter
      4/13/12 10:27:19 AM EST: FAIL!  : tst_QPrinter::valuePreservation() Compared values are not the same
      4/13/12 10:27:19 AM EST:    Actual   (printer.collateCopies()): 0
      4/13/12 10:27:19 AM EST:    Expected (!status): 1
      4/13/12 10:27:19 AM EST:    Loc: [tst_qprinter.cpp(656)]
      4/13/12 10:27:21 AM EST: FAIL!  : tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles() 'file1.open(QIODevice::ReadOnly)' returned FALSE. ()
      4/13/12 10:27:21 AM EST:    Loc: [tst_qprinter.cpp(980)]
      4/13/12 10:27:21 AM EST: Totals: 57 passed, 2 failed, 6 skipped
      4/13/12 10:27:21 AM EST: QtQA::App::TestRunner: test failed, running again to see if it is flaky...
      4/13/12 10:27:21 AM EST: Testing tst_QPrinter
      4/13/12 10:27:21 AM EST: tst_qprinter(79336,0x7fff7857b960) malloc: *** error for object 0x1015230c0: incorrect checksum for freed object - object was probably modified after being freed.
      4/13/12 10:27:21 AM EST: *** set a breakpoint in malloc_error_break to debug
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Process exited due to signal 6
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: ============================= crash report follows: ============================
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Process:         tst_qprinter [79336]
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Path:            /Users/USER/*/tst_qprinter.app/Contents/MacOS/tst_qprinter
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Identifier:      com.yourcompany.tst_qprinter
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Version:         ??? (???)
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Code Type:       X86-64 (Native)
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Parent Process:  perl5.12 [79326]
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: 
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Date/Time:       2012-04-13 10:27:22.702 +1000
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: OS Version:      Mac OS X 10.7.3 (11D50b)
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Report Version:  9
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: 
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Crashed Thread:  0  Dispatch queue: com.apple.main-thread
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: 
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Exception Type:  EXC_CRASH (SIGABRT)
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Exception Codes: 0x0000000000000000, 0x0000000000000000
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: 
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: Application Specific Information:
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: objc[79336]: garbage collection is OFF
      4/13/12 10:27:23 AM EST: QtQA::App::TestRunner: *** error for object 0x1015230c0: incorrect checksum for freed object - object was probably modified after being freed.
      

      In addition to the above failures, it is not clear to me whether the CI system is properly setup for this tests – I doubt that any of the CI machines have any printers configured, which might cause portions of the test to be skipped, and I have seen at least one code path in QPrinter that failed only if there was at least one printer configured.

      It may be worth investigating whether some kind of virtual printer device can be used to make this test more reliable and more useful for CI, particularly if the test was able to control how many printers are available so that tests couldbe rerun with 0, 1, 2, and many printers.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              johnlayt John Layt
              Reporter:
              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:

                  Gerrit Reviews

                  There are no open Gerrit changes