From 20a8a277ee0d507d2b9a369ab0c41d23ab8b2291 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 24 Oct 2017 13:52:51 +0200 Subject: 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 --- tests/benchmarks/corelib/io/qfileinfo/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/benchmarks/corelib') 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); -- cgit v1.2.3