qt5base-lts/tests/auto/corelib/plugin/qlibrary
Kari Oikarinen 810bc3fb19 tst_QLibrary: Ensure installation order of testdata libs
This test executable was not flaky in the normal sense that when run, it
sometimes passes and sometimes fails. Instead, in some builds it would fail
consistently and in some builds it would pass consistently.

The first test to fail was version(ok00, default to last version) which gives
"mylib" as the library name and -1 as the library version. The description
implies that QLibrary selects the biggest or last used version when given -1.
However, versions less than 0 are not used at all. Instead the loading uses only
the name to select the library. Change the description to match.

So why did the test sometimes pass, sometimes fail? The test uses two library
projects lib and lib2 which install two different major versions of libmylib.
That includes the symbolic links:

  libmylib.so -> libmylib.so.1.0.0*
  libmylib.so.1 -> libmylib.so.1.0.0*
  libmylib.so.1.0 -> libmylib.so.1.0.0*
  libmylib.so.1.0.0*
  libmylib.so -> libmylib.so.2.0.0*
  libmylib.so.2 -> libmylib.so.2.0.0*
  libmylib.so.2.0 -> libmylib.so.2.0.0*
  libmylib.so.2.0.0*

The key thing being that both set the libmylib.so symbolic link. In a
multithreaded installation it's undefined which happens to set the link last.
The test code expected libmylib.so to point to libmylib.so.2.0.0. Ensure that by
building and installing lib2 after lib.

Task-number: QTBUG-66722
Task-number: QTBUG-66216
Change-Id: Ic513c772902273049c28e43fc1d83d550aafcd23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-03-02 07:20:04 +00:00
..
lib QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
lib2 QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
library_path Moving relevant tests to corelib/plugin 2011-09-01 12:42:51 +02:00
tst macOS: Don't build auto-tests as application bundles unless explicitly requested 2016-10-23 10:39:56 +00:00
.gitignore Remove mention of Trolltech in qlibrary autotest. 2011-12-28 04:48:06 +01:00
qlibrary.pro tst_QLibrary: Ensure installation order of testdata libs 2018-03-02 07:20:04 +00:00
tst_qlibrary.cpp tst_QLibrary: Ensure installation order of testdata libs 2018-03-02 07:20:04 +00:00