diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-02 11:51:01 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-03 20:49:51 -0700 |
| commit | bb0e9940723f729abcfee396c490637a12bdc377 (patch) | |
| tree | 5be766cb4a0f7f50b8e1541a039a269a36721abe | |
| parent | 01f58d7794c0f6a071760a7afbf742b97b63aaa3 (diff) | |
tst_QFile: restrict to running on Linux
My FreeBSD does not have /proc mounted, so this test doesn't run almost
ever. I have no idea about OpenBSD and no one has tested Qt on AIX in
over a decade.
Change-Id: Ifbf974a4d10745b099b1fffd1777a598ee91eb5d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| -rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index bcbe0f76365..214b6354db5 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -222,7 +222,7 @@ private slots: void writeLargeDataBlock(); void readFromWriteOnlyFile(); void writeToReadOnlyFile(); -#if defined(Q_OS_LINUX) || defined(Q_OS_AIX) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) +#if defined(Q_OS_LINUX) void virtualFile(); #endif #ifdef Q_OS_UNIX @@ -2573,19 +2573,12 @@ void tst_QFile::writeToReadOnlyFile() QCOMPARE(file.write(&c, 1), qint64(-1)); } -#if defined(Q_OS_LINUX) || defined(Q_OS_AIX) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) +#if defined(Q_OS_LINUX) // This platform have 0-sized virtual files void tst_QFile::virtualFile() { // test if QFile works with virtual files - QString fname; -#if defined(Q_OS_LINUX) - fname = "/proc/self/maps"; -#elif defined(Q_OS_AIX) - fname = QString("/proc/%1/map").arg(getpid()); -#else // defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) - fname = "/proc/curproc/map"; -#endif + QString fname = "/proc/self/maps"; // consistency check QFileInfo fi(fname); |
