Fix tst_QFile for qemu
Qemu does not report /proc/self/maps size correctly. Added expected failure for it Change-Id: I4019884702b8f9a33717b02e79c9e0c042b2449f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
42b3ed763f
commit
60f6e4428f
@ -6,6 +6,8 @@ else: DEFINES += QT_NO_NETWORK
|
||||
|
||||
TARGET = ../tst_qfile
|
||||
SOURCES = ../tst_qfile.cpp
|
||||
INCLUDEPATH += ../../../../../shared/
|
||||
HEADERS += ../../../../../shared/emulationdetector.h
|
||||
|
||||
RESOURCES += ../qfile.qrc ../rename-fallback.qrc ../copy-fallback.qrc
|
||||
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include <private/qfsfileengine_p.h>
|
||||
#include <private/qfilesystemengine_p.h>
|
||||
|
||||
#include "emulationdetector.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QT_BEGIN_NAMESPACE
|
||||
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||
@ -2393,7 +2395,11 @@ void tst_QFile::virtualFile()
|
||||
// open the file
|
||||
QFile f(fname);
|
||||
QVERIFY2(f.open(QIODevice::ReadOnly), msgOpenFailed(f).constData());
|
||||
if (EmulationDetector::isRunningArmOnX86())
|
||||
QEXPECT_FAIL("","QEMU does not read /proc/self/maps size correctly", Continue);
|
||||
QCOMPARE(f.size(), Q_INT64_C(0));
|
||||
if (EmulationDetector::isRunningArmOnX86())
|
||||
QEXPECT_FAIL("","QEMU does not read /proc/self/maps size correctly", Continue);
|
||||
QVERIFY(f.atEnd());
|
||||
|
||||
// read data
|
||||
|
Loading…
Reference in New Issue
Block a user