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

FAIL! : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() Compared values are not the same

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.9
    • Positioning
    • None
    • 928ddf32a (dev)

    Description

      The actual bug here is that PositioningMethod comes without an explicit underlying type. Therefore the compiler is free to interpret the given bit patterns as either signed or unsigned integer. However, the Q_DECLARE_FLAGS nails the flags down to signed. This only works because the QML engine has no clue what underlying type the compiler has chosen for the enum, then just assumes signed, and casts accordingly. Obviously this is a really brittle affair.

      Unfortunately this is a public header. Can we change the underlying type of a public enum? I guess that breaks compatibility in some way or other.

      The original symptom was that the tests started failing when QFlags briefly picked up the underlying type the compiler had chosen for the enum:

      ********* Start testing of declarative_positioning_core *********
      Config: Using QtTest library 6.9.0, Qt 6.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.3.0 20190222 (lookup) [qnx710 1535#57]), qnx unknown
      INFO   : declarative_positioning_core::PositionSource::initTestCase() entering
      PASS   : declarative_positioning_core::PositionSource::initTestCase()
      INFO   : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() entering
      INFO   : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() QCOMPARE(, )
         Loc: [/home/qt/work/qt/qtpositioning/tests/auto/declarative_positioning_core/tst_positionsource.qml(330)]
      INFO   : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() QCOMPARE(, )
         Loc: [/home/qt/work/qt/qtpositioning/tests/auto/declarative_positioning_core/tst_positionsource.qml(331)]
      INFO   : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() QCOMPARE(, )
         Loc: [/home/qt/work/qt/qtpositioning/tests/auto/declarative_positioning_core/tst_positionsource.qml(332)]
      INFO   : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() QCOMPARE(, )
         Loc: [/home/qt/work/qt/qtpositioning/tests/auto/declarative_positioning_core/tst_positionsource.qml(333)]
      FAIL!  : declarative_positioning_core::PositionSource::test_bindPositionSourceProperties() Compared values are not the same
         Actual   (): 4294967040
         Expected (): -256
         Loc: [/home/qt/work/qt/qtpositioning/tests/auto/declarative_positioning_core/tst_positionsource.qml(333)]
      INFO   : declarative_positioning_core::PositionSource::cleanupTestCase() entering
      PASS   : declarative_positioning_core::PositionSource::cleanupTestCase()
      Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 6ms
      ********* Finished testing of declarative_positioning_core *********
      qt-testrunner.py     INFO: Test process exited with code: 1
      qt-testrunner.py     INFO: Test has FAILed despite all repetitions! re-runs:5 failures:5
      CMake Error at tst_declarative_positioning_coreWrapperRelWithDebInfo.cmake:18 (message):
        /home/qt/work/install/libexec/qt-testrunner.py --
        /home/qt/work/qt/qtpositioning/coin_qnx_qemu_runner.sh
        /home/qt/work/qt/qtpositioning_standalone_tests/tests/auto/declarative_positioning_core/tst_declarative_positioning_core
        execution failed with exit code 2.
      
      
      31/34 Test #31: tst_declarative_positioning_core ...............***Failed   11.30 sec
      97% tests passed, 1 tests failed out of 31
      

      Build log: https://testresults.qt.io/logs/qt/qtpositioning/5363c133d8d629e6170154ddff7252643097abb4/LinuxUbuntu_22_04x86_64QNXQNX_710x86_64GCCqtci-linux-Ubuntu-22.04-x86_64-51-21765cGenerateSBOM_UseConfigure_VerifySBOM/dfff50c64afcd029e518d1a525a973c6239a7cc4/test_1723680015/log.txt.gz

      Details: https://testresults.qt.io/coin/integration/qt/qtpositioning/tasks/1723679988

      Tested changes (refs/builds/qtci/dev/1723673437):
      https://codereview.qt-project.org/c/qt/qtpositioning/+/583168/2 Update dependencies on 'dev' in qt/qtpositioning

      Attachments

        Issue Links

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

          Activity

            People

              ablasche Alex Blasche
              janihe Jani Heikkinen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes