[qt/qt/qtbase]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/qt/qtbase Pushed by mirror-service into branch '6.12'. Changed from 9a2bd5ae09b64b669e794dd54e0c90d7cfaab63f to 7173492037bace63ab5ea59454b205f0f6798cab Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit fdb81f69b38b3732d7a042071ae138f3d053b07f by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: switch QSystemSemaphore to QLockFile QSystemSemaphore left the named semaphore decremented forever on an abrupt exit (SIGKILL, OOM-kill, crash), blocking the next run. The signal-mask dance around release was fragile, and the constant key forced runs against different devices to serialise needlessly. Switch to QLockFile keyed by the device serial and prefixed with the current user so multiple users sharing the same TempLocation (typically /tmp on Linux) don't collide on the lock file. The kernel releases the flock on FD close so abrupt exits self-heal, and the PID check reclaims a stale lock left by a previous holder. Runs on different devices acquire different files and proceed in parallel. Contended runs on the same serial now queue and wait for their turn instead of failing: lock() blocks until the holder releases, and setStaleLockTime(0) disables the age-based timeout so a long run never trips it. A crashed holder is still reclaimed via the PID check, so the queue can't deadlock. The lock is held until main returns so cleanup runs without a peer racing in. Task-number: QTBUG-146960 Change-Id: I2b5fc60c4c6ec015ce8baca16d783ffabb80bdca Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 15f490ff28141b9556598f3988c62692649ac8fa) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/fdb81f69b38b3732d7a042071ae138f3d053b07f Git commit 3bb1616d63633e5414f867cc3e90aeaf1ab4f95a by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: pass -W to am start to wait for start am start without -W returns once the activity manager has accepted the intent, before the test process is actually up. waitForStarted() then polls adb shell ps every 100ms until the pid appears, typically spending 200-700ms on sleeps and adb roundtrips. With -W, am start blocks until the activity is launched, so the first getPid() poll succeeds and the loop exits without sleeping. Saves a few hundred ms of pre-test padding per test run. Task-number: QTBUG-146960 Change-Id: Ia769a99bb352fa7b9a9b27a364acedfdb4df6ce4 Reviewed-by: Dimitrios Apostolou <[email protected]> (cherry picked from commit 2bbbeef53f0e1850f07ad0b9c6f60e3206882564) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/3bb1616d63633e5414f867cc3e90aeaf1ab4f95a Git commit 96e18f789e0a65faeda3c0aecf3a0f65e4d73ded by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: tighten waitForFinished() poll cadence waitForFinished() polls isRunning() with a fixed sleep between checks. When the test process exits mid-sleep, the runner stays idle for the rest of the interval before the next adb pidof call confirms the exit, so on average the sleep adds about half its length to end-detection latency. Drop the sleep from 250ms to 100ms, cutting that average sleep-induced wait from ~125ms to ~50ms. The extra adb traffic while the test runs is negligible next to the test's own runtime. Task-number: QTBUG-146960 Change-Id: I41957a13e4ccdba884ad7fab207470e1a13dee1e Reviewed-by: Dimitrios Apostolou <[email protected]> (cherry picked from commit 5cbdf62b59e2759fbb2753fe4254123c6f36d930) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/96e18f789e0a65faeda3c0aecf3a0f65e4d73ded Git commit 8fae5f849763a5612393c73921942406b6c2b350 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: tighten waitForLoggingStarted() poll Drop the poll interval from 100ms to 25ms to cut the happy-path wait. Task-number: QTBUG-146960 Change-Id: Ic5304d4aa391277dcc9a42e09f3fd0cb563c3400 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit bc9e170c3e40f4c217624bb21b5748056c04dbc6) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/8fae5f849763a5612393c73921942406b6c2b350 Git commit dc4a494c1ca8f8630077801005d61c7017819b4f by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: don't abort on stdout logger setup failure Returning EXIT_ERROR when setupStdoutLogger() failed bailed out before waitForFinished, pullResults and uninstallTestPackage, which left the test process running and the package installed on the device. Demote the failure to a warning so the rest of the cleanup path still runs; pullResults still retrieves the result files even without live streaming. Task-number: QTBUG-146960 Change-Id: I4806d370461741e237b72837927f6fe1ad3ff13d Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 9ea664f64ca848dcd0f6973c8006d4e71f8a1081) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/dc4a494c1ca8f8630077801005d61c7017819b4f Git commit 7eb4efd60e54b3e1fe6612a230a3d779ec1a9b23 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: preserve test exit code on uninstall failure uninstallTestPackage() is the last step before main returns the test's exit code, but a failure there overrode the real exit code with EXIT_ERROR. A leftover package on the device is a janitor issue, not a reason to make a passing run look failed (or a failing run look like a runner error). Warn instead and return the test result. Task-number: QTBUG-146960 Change-Id: Ieba206922e1b11aa906a9013a88d3cc1632bcc2b Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 068eb04ba71ebf096c9326ebebfdbd9b452136c4) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/7eb4efd60e54b3e1fe6612a230a3d779ec1a9b23 Git commit 91aace74354b36b00d19b3ff11e5642ed4c2f22f by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: return -1 from getPid on adb/parse failure Three early-exit branches in getPid() returned the 'false', which implicitly converts to int 0. Callers happened to check '> 0' or '< 1' so 0 and -1 were treated the same, but the sentinel-vs-real-pid contract is clearer with -1 everywhere. Task-number: QTBUG-146960 Change-Id: I9511947c8d64e40454dc9f167807d82795472af4 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 46c87f6b65b4eb2460c2aa69610e316624f89170) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/91aace74354b36b00d19b3ff11e5642ed4c2f22f Git commit 33ddcb9801ecc5e29a326e3e8512ce83f833364e by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: extract pollUntil() for the wait loops waitForStarted(), waitForFinished() and waitForLoggingStarted() all ran the same do-while loop: deadline timer, sleep interval, interrupt check, exit on predicate success. Extract a pollUntil template that takes the predicate, deadline, and interval, and rewrite the three callers to use it. In waitForStarted, snapshot getPid() into a local and only publish g_testInfo.pid once it is positive, so the shared field never carries an interim -1 from the polling loop. Task-number: QTBUG-146960 Change-Id: I1b5d05bb8df108a884fddc0282eb20e944b63076 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit d961c33f881c18ead3118a1510080235a0b5c948) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/33ddcb9801ecc5e29a326e3e8512ce83f833364e Git commit 9531fa295f07c49d3f27c4cc34f141818a010972 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: extract adbReadAppFile() for file reads pullResults() and testExitCode() both ran the same pattern of build a "cat files/X 2> /dev/null" command, wrap it in run-as, execute via adb, treat empty output as failure. pullResults() retried with backoff. testExitCode() didn't, even though both can race the test process's final flush. Extract adbReadAppFile(fileName, output, retries, backoff) and call it from both. testExitCode() now gets the same retry and backoff handling as pullResults() so a too-fast read no longer drops the exit code. Task-number: QTBUG-146960 Change-Id: I79e955b66ab0ddddfb43f55c1c29ab07bd058a58 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 74c727468d77fe88f4bb2948bfa86c7c02c0cfa7) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/9531fa295f07c49d3f27c4cc34f141818a010972 Git commit 3c5324c44dd3ca6d36f5b5ac81b123acb3736245 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: terminate the adb-tail subprocess on signal sigHandler() re-armed SIG_DFL on first entry, so a second SIGINT/SIGTERM killed the runner without running QProcess destructors and left "adb shell tail -F files/stdout.txt" orphaned on the host adb session. Track the logger pid in an atomic and ::kill() it directly from the handler so the first signal already reaps it, regardless of whether the main loop gets to run stopStdoutLogger(). Capture the pid right after QProcess::start() returns, before waitForStarted(), and clear it on setup or stop failures so the handler covers the whole startup window without targeting a stale or already-reaped process. Task-number: QTBUG-146960 Change-Id: I27d671ac172272a0bb7f918e1aa7176055325200 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 621b6d594d1cb4686a676a69fe808e0b0d6adc3f) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/3c5324c44dd3ca6d36f5b5ac81b123acb3736245 Git commit 15ea9bdfc0157f0a8c2f1143243d2159d2ac107a by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: don't pull stdout.<fmt> to host's CWD When --output is "-" or empty, setOutputFile synthesises a "stdout.<fmt>" name for tail -F to follow on the device. pullResults then wrote a host copy of every outFiles entry, so "-o -,txt" left a stdout.txt next to the runner even though the caller asked for stdout. Use an empty value in outFiles to mean "stream-only, don't pull"; pullResults skips it. A deviceOutputFileName helper returns the basename of the host path or "stdout.<format>", so the testapp -o arg and the tail -F target are derived from one source of truth. Task-number: QTBUG-146960 Change-Id: Ifb20a60bfc20b99cbcebcb582a0a7d8ddf68dc2a Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit d84606439c8807d6a3e8ab0ca9ec8eb548d0e553) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/15ea9bdfc0157f0a8c2f1143243d2159d2ac107a Git commit 999ee3ab79a382720bd4fe0316af55b94aa1d0e9 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: accept --output as alias for -o QTest accepts both -o and --output for the output file. The runner only handled the short form, so test args using the long form never reached the device. Task-number: QTBUG-146960 Change-Id: Id8ee607bcf5bb7496a1fa5a656d59d66d192aae9 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 97e160b6d45a51b717353ca8031bc38f32f8039e) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/999ee3ab79a382720bd4fe0316af55b94aa1d0e9 Git commit b2900917c10722a1500fe9d945a9f9082ccc4de1 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: abort when --apk and --aab are both given Previously the conflict was reported via qCritical() but execution continued with whichever package path landed first, silently dropping the second. Propagate the failure out of parseOptions() so the runner exits with EXIT_ERROR instead of running an unintended package. While in this area, set g_testInfo.isPackageInstalled only after the install succeeds, so a SIGINT mid-install exits immediately instead of attempting to clean up a package that was never installed. Task-number: QTBUG-146960 Change-Id: I0fe17bf0d29c1daba978beea572fe537b0fa6223 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 23b7c259b6baa3f6a846efbb89cfe38f3e3c6275) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/b2900917c10722a1500fe9d945a9f9082ccc4de1 Git commit 14f3998b02f05b74c509f29d72e6383433c14383 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: scope the INSTALL_ROOT suffix properly The runner appended " INSTALL_ROOT=<path> install" to --make unconditionally (modulo --skip-install-root), with two side effects: * with --make unset, makeCommand became the bare suffix and the "--make is required" error never fired; * the suffix is GNU-make-only, so cmake, ninja and friends choked on it and every caller had to pass --skip-install-root. Skip the append on empty --make; otherwise restrict it to the GNU-make family (make, gmake, nmake, mingw32-make, jom) by program basename. Drop --skip-install-root from the cmake glue, the qdoc example and the qt-testrunner fixture. Task-number: QTBUG-146960 Change-Id: Id43600ed12fc4490ef2881d45c88800bdca5b0ad Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 6147c54c7e0332422f43a76f247154c66e63d99b) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/14f3998b02f05b74c509f29d72e6383433c14383 Git commit 871a918b88060a0030dbc5b3372184e1d29fa084 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: fix getAbiLibsPath to keep the device ABI The host-arch fallback block ran unconditionally, clobbering the ABI that adb getprop or the libs/ subdirectory had just provided. Reuse that lookup result and reach for the host architecture only when both adb and the local libs/ directory yielded nothing. While there, replace the bogus "arm64-x86_64" string with the proper "x86_64" Android ABI. Task-number: QTBUG-146960 Change-Id: I88fc717c61da61c4437e0f72760e8887b898c9be Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 68325c48a541e08683fb1e752e47b4e5ba26565c) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/871a918b88060a0030dbc5b3372184e1d29fa084 Git commit efb19085ce50e6cfa21865609b38ed9e71a44cda by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: locate native libs also under app/ getAbiLibsPath hard-coded <build>/libs/<abi>, which was where the legacy androiddeployqt layout staged native libs. The modern bundle layout puts them under <build>/app/libs/<abi> instead, so ndk-stack -sym was being handed a non-existent directory and silently returned unresolved frames. Fall back to <build>/app/libs/ when the legacy <build>/libs/ path is absent so modern bundle deployments resolve symbols too. Task-number: QTBUG-146960 Change-Id: I1c0157c4238a2e581d6c2e2578a9d9b93bb7aed4 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 4d8d76b43a34c9ada552c5c6fcc10ffb7c33a5e8) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/efb19085ce50e6cfa21865609b38ed9e71a44cda Git commit e5fcc1e3323d14acd5682782e0a57fdc70d97c70 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: log main, system and crash buffers Default logcat buffers vary across Android versions and on recent ones drop debuggerd's "*** *** ***" banner and ActivityManager's "ANR in" line. Pin -b main,system,crash so analyseLogcat sees all three. Task-number: QTBUG-146960 Change-Id: Iffa00eb1d06bf0def1daaff9f075616cf4bb8039 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 20cd90387db60bee6bc0f03dbbeb8d98644b1dad) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/e5fcc1e3323d14acd5682782e0a57fdc70d97c70 Git commit 659d136b1cb9f7df373b42cbf001022fd2d574c6 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: drain ndk-stack to completion waitForReadyRead plus terminate killed ndk-stack mid-stream and truncated the dump. Wait for it to finish, then read once. Kill on timeout to avoid leaking the process. Task-number: QTBUG-146960 Change-Id: I88dc56f9e8e1b263446063fb65fdb5e1469d3fa8 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 3baa9566b761cc8e6d0146cc157075baad278bbc) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/659d136b1cb9f7df373b42cbf001022fd2d574c6 Git commit 8fbb0d672f9c0d15a53f46671d49dd4a609b8062 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: always print the crash dump The previous guard skipped printing whenever the dump began with "********** Crash dump", which is exactly the prefix ndk-stack emits on success - silently dropping the symbolicated output. Print unconditionally; the BEGIN/END wrappers only kick in when ndk-stack did not supply its own header. Also drop the early return when ndk-stack itself fails to start; the unsymbolicated dump is still worth printing so the caller can read frames manually. Task-number: QTBUG-146960 Change-Id: I26ff6d9e6e8e3685ef4d101b9bd9a1efe0c30956 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 51ed6c6e669b1fbd75babb3773b30a805950bbf3) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/8fbb0d672f9c0d15a53f46671d49dd4a609b8062 Git commit f6b8096e553d3e631318858367e523e554b21579 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: poll for the debuggerd crash banner debuggerd flushes the "*** *** ***" banner several seconds after the process dies; analyseLogcat fetched logcat once on death and saw an empty crash section. On abnormal exits, poll logcat for the banner with a 15s deadline at 250ms cadence. Task-number: QTBUG-146960 Change-Id: I761c1a1d6e6efeeb675ead9d343196bd9d9a0c85 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 2e3519e3f97adea6c922aaf4fa91b08a78ac5ea5) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/f6b8096e553d3e631318858367e523e554b21579 Git commit 8c614d3c9fa2446cbd71f74d681fd460d2b2d230 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: extract logcat helpers from analyseLogcat analyseLogcat had grown to ~100 lines mixing fetch, crash-dump extraction, ANR detection, PID filtering and printing. Split it into fetchLogcat, takeCrashDump and filterTestLogcat so the top-level function reads fetch -> split crash dump -> detect ANR -> filter -> print. Also widen the color-code class from [0-9]+ to [0-9;]* so multi-parameter SGR sequences (e.g. 1;31m) match, and mark the source group non-greedy so the pid capture binds to the first parenthesised token rather than the last. Task-number: QTBUG-146960 Change-Id: I9a2104d4244726f2fbed77969edaa0f824c1846c Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 357327953d65bbe73f12cbb919c029b56bc9f1be) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/8c614d3c9fa2446cbd71f74d681fd460d2b2d230 Git commit fd34e8f0bba8adc20c8d3f0fbb7eb1b4cd5789bb by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: improve crash and ANR logcat diagnostics Unify the debuggerd banner marker into a single named constant and shorten it from 16 to 8 groups so emulator and OEM builds that wrap or truncate the line still slice cleanly. Take an initial logcat snapshot up front, then poll only when an abnormal exit needs diagnostics that haven't landed yet, so the caller always has the most recent snapshot available even when the debuggerd banner or the ActivityManager 'ANR in <pkg>' notice never arrives. Warn when the deadline expires so a truncated logcat isn't silently misread as nothing happened. Skip the getPid("system_server") lookup when no ANR was observed; its result was only used by the system_server filter branch in filterTestLogcat, which now takes the pid directly. Finally, honour --show-logcat on a clean pass too: it was documented as 'Print logcat output' but previously stayed silent unless the test crashed. Task-number: QTBUG-146960 Change-Id: I43135acf666d7bc59c6c67d5b3e6d08e2f8e6d08 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 3c67c7e47fc2513bd1474571b3e94fc427f37e68) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/fd34e8f0bba8adc20c8d3f0fbb7eb1b4cd5789bb Git commit e4637d0325144431c3525a49a7a3be2cd149e575 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: detect device disconnect during the test Three consecutive 'adb shell ps' failures in isRunning() used to look like a normal test exit, so the runner tried to pull result files from a device that may already be gone and ended up with EXIT_NOEXITCODE. After the retries, verify the device is still listed; if not, set a sticky flag and return EXIT_DEVICE_GONE (250) right after waitForFinished(), skipping the result-transfer and uninstall steps (both would hang or fail noisily). Task-number: QTBUG-146960 Change-Id: I2f52345712fd47966f0485b3d308ac5927764305 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit da9689ffa0743551e4f52069f40241ea394999fb) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/e4637d0325144431c3525a49a7a3be2cd149e575 Git commit 776d40e83621f87bc7e0ce6065503012fc5399e8 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: use pidof in getPid and isRunning ps | grep ' <package>' substring-matches and the shell pipe compounds quoting and regex pitfalls. pidof gives the same answer in one call and is consistent across getPid (waitForStarted) and isRunning (waitForFinished). isRunning now reports whether any process of the package is alive rather than matching a captured pid, so finish detection still works when waitForStarted never caught one. It keeps the deviceGone short-circuit so later polls skip the devices check once a disconnect is known. Task-number: QTBUG-146960 Change-Id: I3265fba2eafbcdbb9909621cfd60c6a4e62c5266 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 39f5125c8a8a033359923582c17f28e216bb6cc3) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/776d40e83621f87bc7e0ce6065503012fc5399e8 Git commit 2920e0fd1427ed1a873d0869d4010b10cfe79487 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: use QProcess default timeout for host tools execCommand used to multiplex two timeouts via a basename check: the QProcess default (~30s) for adb and the user-supplied --timeout for everything else. That makes --timeout do double duty: bound the test runtime AND bound every spawned process, so a user setting --timeout 60 for a quick test made gradlew, bundletool and ndk-stack impatient. Take a per-call timeout instead. -1 means "use QProcess default", so every host tool falls back to the same 30s default with no special case. Only two callers opt out: - the build (--make) passes g_options.timeoutSecs * 1000; - the test runtime is bounded by waitForFinished's own pollUntil deadline (also g_options.timeoutSecs). On timeout, kill the spawned process and reap it so we don't leak running children when the runner exits. Task-number: QTBUG-146960 Change-Id: I0cea8dd56986ff4f8f8023a736777ae3c6a2d778 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 58bf7878a8b5e17e935ced947d18d973a74cf50a) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/2920e0fd1427ed1a873d0869d4010b10cfe79487 Git commit 09f09b786cf627bbfb09d5daf7e18373c472d35d by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: fix permission parsing and grant nits Drop the unused capture group around the hex address in the queryDangerousPermissions regex, fix the typo'd local dangerousPermisisons at the call site in main(), and align the const-static declaration's indentation with the rest of the function body. Pass --user with the current user ID to pm grant so the permission lands on the same user the package was installed into; without --user, pm grant defaults to user 0 and a non-zero foreground user would silently miss the grant. Task-number: QTBUG-146960 Change-Id: I3349c000c40d284e53eb17c58a243cb4833246be Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit d057f33fb2d80afb7f973eb704b0d4a97386219e) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/09f09b786cf627bbfb09d5daf7e18373c472d35d Git commit 1224f4ce6c31a8ddec52ba64bab91ffbc188b7fc by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: surface gradlew failures with a warning The Gradle property lookup silently swallowed timeouts and non-zero exits, leaving the runner to fail later with a confusing 'Unable to get package name'. Kill the process on timeout to avoid orphans, and log both timeout and exit-code failures with the requested property and gradlew's stderr. Task-number: QTBUG-146960 Change-Id: Ia278606c4b2b0d07052d6570fdb3f3e1e1302dc3 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 4f78ae663f5e8ef59399b303ce2e082d0bc7f79c) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/1224f4ce6c31a8ddec52ba64bab91ffbc188b7fc Git commit 13fd3b7cb939115c86b32a6a947c218351ca3db3 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: assert sig-handler atomics are lock-free sigHandler reads and updates these atomics from arbitrary signal contexts, where only lock-free operations are async-signal-safe. The compile-time check fails loudly on any platform where the implementation could ever take a lock. Task-number: QTBUG-146960 Change-Id: I3365819e586a674868d715f90aac19bed2ef057b Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit bc539648daf63e3f1f0647aa9bf55da1a585852e) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/13fd3b7cb939115c86b32a6a947c218351ca3db3 Git commit 124cc76f1a4307b1050c4e8b39b4cfbe9c485d28 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: separate adb failures in obtainSdkVersion Distinguish adb failure (no output) from a parse failure so debugging can tell them apart instead of seeing the same generic warning. Task-number: QTBUG-146960 Change-Id: I3ff2024a123b48c0caf701ba4f622431b6a4fd88 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 36cfab38c3e6eea805b9435930f2d065d49ee67b) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/124cc76f1a4307b1050c4e8b39b4cfbe9c485d28 Git commit 9db1500360d610e131d96669c4bf91763a124891 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: print stderr from spawned commands on failure Spawned commands only captured stdout, so adb or bundletool failures showed a generic error and dropped the real one. Read stderr too and print it when the command exits non-zero. Task-number: QTBUG-146960 Change-Id: Ic53e709dd69cf98cebbc1b57d216b3a90f624e05 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 0b49375ae07697a73b23cf638d83f7d2a2f29199) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/9db1500360d610e131d96669c4bf91763a124891 Git commit d86d09323650919694816f127b2b3d73c476a5a1 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: handle fast tests on slow emulators waitForStarted's getPid can miss the test process on a slow emulator running a very fast test (alwaysPasses-style): the testapp finishes before pidof catches it, leaving no captured pid. Polling the full 10s for a pid that will never arrive wastes time, and filterTestLogcat then drops everything because a non-positive pid matches nothing in the brief-format logcat lines. Stop waitForStarted once the process is gone (isRunning reports liveness by presence), so a finished or crashed test no longer hangs the wait. waitForLoggingStarted likewise stops once the process exits instead of polling for an output file that will never appear. Return the unfiltered logcat when no pid was caught so --show-logcat still surfaces the test's output, and drop the now-stale no-pid warning. Task-number: QTBUG-146960 Change-Id: If4ebf3aa1255436080c7bf28521ecca3d8e9f7cf Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 57865b1765898031832bdd9ec0e70b3445870fbe) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/d86d09323650919694816f127b2b3d73c476a5a1 Git commit a5781437f2ed3b543d583b400034afff6c6b3282 by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: check QFile::write return in pullResults A short write (disk full, IO error) left pullResults reporting success and the host result file silently truncated. Compare the returned count against output.size() and fail with the file's errorString so the caller surfaces EXIT_NORESULTS. Task-number: QTBUG-146960 Change-Id: I999e64dcfe11ee73304acfc1f1527ec2395205f9 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 1e49f846dde0ae44624cc299ea5ea4d11e1ffe03) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/a5781437f2ed3b543d583b400034afff6c6b3282 Git commit a2c9a43b0e8a609960dd65c226d1fe155e8785ac by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: handle unknown device clock state When obtainSdkVersion() fails (transient adb hiccup, very early device state), g_testInfo.sdkVersion stays at -1 and the "sdkVersion <= 23" check picked the legacy date format. Modern devices then mis-parse the timestamp and logcat filtering breaks. Require a positive sdkVersion to opt into the legacy branch so unknown maps to the modern, ISO-style format. Similarly, when the host can't query the device clock at all (adb shell date fails), fall back to a line-count cap (-t 5000) instead of a timestamp, rather than passing an empty -t ''. Task-number: QTBUG-146960 Change-Id: I39449e6dc40d78ccc8691627363f3d3f33eb459d Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit cc77d0eecb43df0a43bed5d5034622d84e7d3566) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/a2c9a43b0e8a609960dd65c226d1fe155e8785ac Git commit 7173492037bace63ab5ea59454b205f0f6798cab by Qt Cherry-pick Bot (on behalf of Assam Boudjelthia) on 27/07/2026 at 09:59.. AndroidTestRunner: add --serial to override the env vars Explicit flag takes precedence over ANDROID_SERIAL and ANDROID_DEVICE_SERIAL; env vars remain the fallback. Route every adb invocation through a shared helper that prepends -s, including the stdout-streaming tail subprocess which until now ran without it. With more than one device attached the tail's adb shell was ambiguous and produced no live output. Also pass the serial to bundletool's install-apks as --device-id, so an AAB install targets the right device when more than one is connected. Task-number: QTBUG-146960 Change-Id: Ib62b4c7a7b85c7669b407c7250a2e1f06f30a6b2 Reviewed-by: Ville Voutilainen <[email protected]> (cherry picked from commit 639a866bf987cb0b451adcb5e9e053dbfb395320) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtbase/-/commit/7173492037bace63ab5ea59454b205f0f6798cab