Details
-
Sub-task
-
Resolution: Done
-
P1: Critical
-
None
-
qtdeclarative b18974cb3d448696c985c7d3a965dcf9523a4e9e qtbase 4ef4f8f3e177e7e371232c49e614e6ebbf57e8b5 qtsvg 8bd0f4a9d6cff4a9dcb6b829208877f2ab798dad qtxmlpatterns 7137785c87497f8beb5bda20505466430c6b1521
Qt configured with -silent -no-pch -nokia-developer -no-qt3support -force-pkg-config -qpa -xcb
Running with QT_QPA_PLATFORM=xcb
Running with QML_NO_THREADED_RENDERER=1
Ubuntu 10.04 x86 32-bitqtdeclarative b18974cb3d448696c985c7d3a965dcf9523a4e9e qtbase 4ef4f8f3e177e7e371232c49e614e6ebbf57e8b5 qtsvg 8bd0f4a9d6cff4a9dcb6b829208877f2ab798dad qtxmlpatterns 7137785c87497f8beb5bda20505466430c6b1521 Qt configured with -silent -no-pch -nokia-developer -no-qt3support -force-pkg-config -qpa -xcb Running with QT_QPA_PLATFORM=xcb Running with QML_NO_THREADED_RENDERER=1 Ubuntu 10.04 x86 32-bit
Description
This autotest fails on some systems, but not others. Through tweaking configuration of various machines I was able to figure out that the DPI setting of the x server influences the result.
On my workstation, the test passes:
$ xdpyinfo | grep -i 'dots per inch' resolution: 90x87 dots per inch $ make check TESTARGS=cursorRectangle ./tst_qsgtextinput cursorRectangle Information of screen 346: width.........: 1920 height........: 1200 depth.........: 24 white pixel...: ffffff black pixel...: 0 Running window manager: compiz ********* Start testing of tst_qsgtextinput ********* Config: Using QTest library 5.0.0, Qt 5.0.0 created GL window: 100663298 created GL window: 100663302 PASS : tst_qsgtextinput::initTestCase() QWARN : tst_qsgtextinput::cursorRectangle() font "Helvetica,12,-1,5,50,0,0,0,0,0" QWARN : tst_qsgtextinput::cursorRectangle() width of "Hello" 33 PASS : tst_qsgtextinput::cursorRectangle() PASS : tst_qsgtextinput::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_qsgtextinput ********* Number of leaked items: 0
(note: the `font', `width' lines come from extra debugging I added to the test)
On a virtual machine with a different DPI, the test fails:
$ xdpyinfo | grep -i 'dots per inch' resolution: 96x96 dots per inch $ make check TESTARGS=cursorRectangle ./tst_qsgtextinput cursorRectangle Information of screen 258: width.........: 800 height........: 600 depth.........: 24 white pixel...: ffffff black pixel...: 0 Running window manager: KWin ********* Start testing of tst_qsgtextinput ********* Config: Using QTest library 5.0.0, Qt 5.0.0 created GL window: 54525954 created GL window: 54525957 PASS : tst_qsgtextinput::initTestCase() QWARN : tst_qsgtextinput::cursorRectangle() font "Helvetica,12,-1,5,50,0,0,0,0,0" QWARN : tst_qsgtextinput::cursorRectangle() width of "Hello" 38 FAIL! : tst_qsgtextinput::cursorRectangle() 'r.right() > textWidth - error' returned FALSE. () Loc: [tst_qsgtextinput.cpp(1839)] PASS : tst_qsgtextinput::cleanupTestCase() Totals: 2 passed, 1 failed, 0 skipped ********* Finished testing of tst_qsgtextinput ********* Number of leaked items: 0 make: *** [check] Error 1
If I restart the X server on the VM with -dpi 90, the test passes.
Ideally either (1) the test makes some attempt to be agnostic to the DPI setting, (2) the test checks the DPI setting and skips if it doesn't match the required value, (3) the required DPI setting is documented.