From 70e2fe2bba71ea0a4d1d1e533c1130c97f77df55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Matysiak?= Date: Wed, 5 Jun 2024 13:50:10 +0200 Subject: [PATCH] Use /tmp to test eq operator of qdir The test checks if two paths test equal if they are pointing to the same place, but one of them is not a canonical path. Example of such paths: /tmp/.. and / The test assumes that /usr is an existing directory on platforms other than win, haiku and android. The reason /usr is used instead of /tmp is that /tmp is a symlink on macos and that interferes with the test (as described in 0b67ad9d). However /usr does not exist on VxWorks (unless created by the user). /tmp can (and is in our CI env) enabled by turning on the INCLUDE_TMP_DIR component. Solve the problem by using /tmp instead of /usr on vxworks. Pick-to: 6.7 6.8 Task-number: QTBUG-115777 Change-Id: I98b0d46d1b879f404c0b5bd655031e7c3f19ba33 Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qdir/tst_qdir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index b19f1587463..06f0c3d178f 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -2285,6 +2285,8 @@ void tst_QDir::equalityOperator_data() QString pathinroot("/system/.."); #elif defined(Q_OS_HAIKU) QString pathinroot("/boot/.."); +#elif defined(Q_OS_VXWORKS) + QString pathinroot("/tmp/.."); #else QString pathinroot("/usr/.."); #endif