summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-24 13:52:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-30 09:59:09 +0000
commit20a8a277ee0d507d2b9a369ab0c41d23ab8b2291 (patch)
tree896abba2985f5822cc2108c94723b076ab749710 /tests/benchmarks/corelib
parent09e926cc278d8572bfd107424af2d4d482ac73ae (diff)
tst_qfileinfo: Refactor ntfsJunctionPointsAndSymlinks()
Move the creation of the symbolic link/junction from the _data() slot into the actual test function. The parameters are passed by a newly introduced struct. This ensures only the symbolic links/junctions that are actually needed are created. It can then no longer happen that filtering for one data row invokes recursive deletion of the mountpoint junction. Also use of the newly introduced convenience createSymbolicLink() in canonicalFilePath() Task-number: QTBUG-63989 Change-Id: Ia78fd4ad6097136934ab5a375f4c352713d0f115 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 5180e7c29e..104c01d118 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
@@ -94,7 +94,9 @@ void qfileinfo::symLinkTargetPerformanceMounpoint()
QString rootVolume = QString::fromWCharArray(buffer);
QString mountpoint = "mountpoint";
rootVolume.replace("\\\\?\\","\\??\\");
- FileSystem::createNtfsJunction(rootVolume, mountpoint);
+ QString errorMessage;
+ QVERIFY2(FileSystem::createNtfsJunction(rootVolume, mountpoint, &errorMessage) == ERROR_SUCCESS,
+ qPrintable(errorMessage));
QFileInfo info(mountpoint);
info.setCaching(false);