[MDEV-7454] Tests fail on RHEL-6 because libmytap.so is not found Created: 2015-01-14  Updated: 2022-11-20  Resolved: 2022-11-20

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.0.15
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Honza Horak Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

Linux, RHEL-6



 Description   

running `make test` fails with errors like:

  1/ 55 Testing pcre_test                        Passed
  2/ 55 Testing pcre_grep_test                   Passed
  3/ 55 Testing strings                       ***Failed 
  4/ 55 Testing simple                        ***Failed 
  5/ 55 Testing skip                          ***Failed 

and so on.

running `/usr/bin/ctest --force-new-ctest-process --verbose` showed me errors like:

/builddir/build/BUILD/mariadb-10.0.15/unittest/strings/strings-t: error while loading shared libraries: libmytap.so: cannot open shared object file: No such file or directory

After analysing build log I see difference between RHEL-6 and Fedora such as there is the following rpath definition more on Fedora when building strings-t binary (one of the unittests):

-Wl,-rpath,/builddir/build/BUILD/mariadb-10.0.15/unittest/mytap

and that is also reason why tests pass on Fedora.

My workaround for allowing the test binaries to find mytap library also works:

LD_LIBRARY_PATH=$(pwd)/unittest/mytap make test

RHEL-6 includes cmake-2.6.4 and Fedora 21 includes cmake-3.0.2, but since it works fine in 5.5.x I guess it should be possible to fix it in CMake configs somehow. But my knowledge of CMake is not good enough to provide a patch.



 Comments   
Comment by Sergei Golubchik [ 2022-11-20 ]

RHEL6 has reached EOL in 2020.
And anyway, we don't run make test in our CI so it's not guaranteed to work, use mysql-test-run.pl script instead, it runs unit tests too

Generated at Thu Feb 08 07:19:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.