From 524b19fc23f72b488476d9d195aa013793bce452 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Wed, 28 Oct 2020 12:45:04 +0100 Subject: Selftest - copy XAUTHORITY environment variable Otherwise XOpenDisplay in a newly spawned process may fail with a 'No protocol specified' message (as it recently happened in CentOS 8.1 vm). Fixes: QTBUG-87621 Pick-to: 5.15 Change-Id: Ib6c08c7f154fb2a126d32a4aa52b535e5daa1589 Reviewed-by: Liang Qi --- tests/auto/testlib/selftests/tst_selftests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/testlib') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 1839737d15..13afe6f7e5 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -943,7 +943,7 @@ static QProcessEnvironment testEnvironment() || key == "QEMU_SET_ENV" || key == "QEMU_LD_PREFIX" // Required for QEMU # if !defined(Q_OS_MACOS) || key == "DISPLAY" || key == "XAUTHLOCALHOSTNAME" - || key.startsWith("XDG_") + || key.startsWith("XDG_") || key == "XAUTHORITY" # endif // !Q_OS_MACOS #endif // Q_OS_UNIX #ifdef __COVERAGESCANNER__ -- cgit v1.2.3