blob: 520703d1f7ca8aaad973b3f3ccf58c4ebdea479e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
These tests fail if / (root) is not a mountpoint.
Upstream-URL: https://invent.kde.org/frameworks/kio/-/issues/43
--- kio-5.116.0/autotests/jobtest.cpp.old 2024-05-04 11:40:29.000000000 +0000
+++ kio-5.116.0/autotests/jobtest.cpp 2025-08-10 05:18:18.789195125 +0000
@@ -60,8 +60,7 @@
{
KMountPoint::Ptr srcMountPoint = KMountPoint::currentMountPoints().findByPath(homeTmpDir());
KMountPoint::Ptr destMountPoint = KMountPoint::currentMountPoints().findByPath(otherTmpDir());
- Q_ASSERT(srcMountPoint);
- Q_ASSERT(destMountPoint);
+ if (srcMountPoint == nullptr || destMountPoint == nullptr) return true;
return srcMountPoint->mountedFrom() == destMountPoint->mountedFrom();
}
--- kio-5.116.0/autotests/kmountpointtest.cpp.old 2024-05-04 11:40:29.000000000 +0000
+++ kio-5.116.0/autotests/kmountpointtest.cpp 2025-08-10 05:26:09.210428498 +0000
@@ -56,9 +56,15 @@
// Check findByPath
#ifdef Q_OS_UNIX
const KMountPoint::Ptr rootMountPoint = mountPoints.findByPath(QStringLiteral("/"));
- QVERIFY(rootMountPoint);
- QCOMPARE(rootMountPoint->mountPoint(), QStringLiteral("/"));
- QVERIFY(!rootMountPoint->probablySlow());
+ if (!rootMountPoint) {
+ // This happens on Linux systems running inside chroot jails.
+ QSKIP("Couldn't find a root mountpoint, skipping those tests");
+ return;
+ } else {
+ QVERIFY(rootMountPoint);
+ QCOMPARE(rootMountPoint->mountPoint(), QStringLiteral("/"));
+ QVERIFY(!rootMountPoint->probablySlow());
+ }
QT_STATBUF rootStatBuff;
QCOMPARE(QT_STAT("/", &rootStatBuff), 0);
|