[Development] INTEGRITY help needed: IPC & QT_CONFIG weirdness

Thiago Macieira thiago.macieira at intel.com
Sun Nov 6 06:59:06 CET 2022


On Saturday, 5 November 2022 11:35:15 PDT Thiago Macieira wrote:
> TL;DR: Please propose a patch by end of week to fix the INTEGRITY error from
> https://testresults.qt.io/coin/integration/qt/qtbase/tasks/1679359812

Ok, now I need QNX help from build
https://testresults.qt.io/coin/integration/qt/qtbase/tasks/1679395790

In the build, the log says:
 -- Performing Test HAVE_sysv_shm
 -- Performing Test HAVE_sysv_shm - Failed
 -- Performing Test HAVE_sysv_sem
 -- Performing Test HAVE_sysv_sem - Failed
 -- Performing Test HAVE_posix_shm
 -- Performing Test HAVE_posix_shm - Success
 -- Performing Test HAVE_posix_sem
 -- Performing Test HAVE_posix_sem - Success

which is the expected condition. This should have triggered the macro 
QT_POSIX_IPC, given configure.cmake:

qt_feature("ipc_posix"
    LABEL "Using POSIX IPC"
    CONDITION TEST_posix_shm AND TEST_posix_sem AND (
        FEATURE_ipc_posix OR (APPLE AND QT_FEATURE_appstore_compliant)
        OR NOT (TEST_sysv_shm AND TEST_sysv_sem)
    )
)
qt_feature_definition("ipc_posix" "QT_POSIX_IPC")

And yet, when tst_qsharedmemory started, it printed the debug message:

QDEBUG : tst_QSharedMemory::initTestCase() Default key type is 
QNativeIpcKey::Type::SystemV and legacy key type is 
QNativeIpcKey::Type::SystemV

Both key types should have been POSIX, given:

    static constexpr Type DefaultTypeForOs =
#ifdef Q_OS_WIN
            Type::Windows
#elif !defined(QT_POSIX_IPC)
            Type::SystemV
#else
            Type::PosixRealtime
#endif
            ;

inline auto QNativeIpcKey::legacyDefaultTypeForOs() noexcept -> Type
{
#if defined(Q_OS_WIN)
    return Type::Windows;
#elif defined(QT_POSIX_IPC)
    return Type::PosixRealtime;
#elif defined(Q_OS_DARWIN)
    return defaultTypeForOs_internal();
#else
    return Type::SystemV;
#endif
}

But neither is, which tells me that QT_POSIX_IPC wasn't defined. What's 
happening?

Maybe it got defined but not added to qconfig.h? I changed the conditions for 
the feature, but not anything else, so it should have remained public (and I 
did make a local test stting FEATURE_ipc_posix).

This time, it can't be a missing #include. qtipccommon.h includes qglobal.h, 
which includes qtconfigmacros.h, which includes qconfig.h and qtcore-config.h.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering





More information about the Development mailing list