qt5base-lts/tests/auto/corelib
Tor Arne Vestbø 9661cde161 Apple: Use POSIX IPC instead of System V in sandboxed applications
System V semaphores are not supported in sandboxed applications,
so when Qt is configured with App Store compliance, or the user
requests POSIX IPC explicitly, we use that instead.

https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24

As the shared memory name limit on Apple platforms is very low,
we have to skip the existing logic for naming, and instead use
a truncated hash of the key. This should still be fine for
avoiding any collisions in practice.

An explicit check for the ENAMETOOLONG error has been added to
catch any cases where they key goes beyond the allowed length.

Sandboxed applications also have an extra requirement that the
key must include an application group identifier. This requirement
has been pushed up to the user and documented, as we don't have
enough information in Qt to know which identifier to use.

Both tst_QSystemSemaphore and tst_QSharedMemory work as before
with both sandboxed and non-sandboxed applications, after removing
some assumptions in tst_QSharedMemory about System V behavior.

Fixes: QTBUG-91130
Change-Id: Iaf1edb36a5d84d69e42ec31471a48d112faa8c6a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-06-16 15:53:23 +02:00
..
animation Avoid use after free in tst_qsequentialanimationgroup 2021-06-02 16:45:23 +02:00
global Prefer QFAIL("Informative message") over QVERIFY(false) 2021-06-14 15:57:16 +02:00
io QLoggingSettingsParser: port setContent() to QStringView 2021-06-16 13:22:18 +02:00
itemmodels QSortFilterProxyModel: create mappings on demand again 2021-06-03 00:53:08 +02:00
kernel Apple: Use POSIX IPC instead of System V in sandboxed applications 2021-06-16 15:53:23 +02:00
mimetypes Fix BASE argument of qt_add_resources 2021-05-18 16:02:52 +02:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin Fix BASE argument of qt_add_resources 2021-05-18 16:02:52 +02:00
serialization Prefer QFAIL("Informative message") over QVERIFY(false) 2021-06-14 15:57:16 +02:00
text Turn tst_QString::setRawData()'s QSKIP into QEXPECT_FAIL()s 2021-06-15 16:58:46 +02:00
thread QTestlib: Add formatting for QObject * in QCOMPARE 2021-05-26 11:02:48 +00:00
time Fix and clean up utterly confused (and confusing) transition tests 2021-06-15 16:58:46 +02:00
tools String API Symmetry: test for indexOf with large negative offset 2021-06-11 22:04:04 +00:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00