MTR tests from binary tarball don't work out of the box: fail to find mysqldumpslow

Bug #1158036 reported by Elena Stepanova on 2013-03-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
Undecided
Unassigned
5.1
Fix Released
Medium
Alexey Bychko
5.5
Invalid
Undecided
Unassigned
5.6
Invalid
Undecided
Unassigned

Bug Description

I download Percona-Server-5.1.68-rel14.5-513.Linux.x86_64.tar.gz,
unpack it,
cd Percona-Server-5.1.68-rel14.5-513.Linux.x86_64/mysql-test
run MTR and expect the tests to work, but they don't:

/data/releases/Percona-Server-5.1.68-rel14.5-513.Linux.x86_64/mysql-test$ perl ./mysql-test-run.pl main.1st
Logging: ./mysql-test-run.pl main.1st
130321 3:55:35 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.1.68

...

==============================================================================

TEST RESULT TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: *** ERROR: Could not find /data/releases/Percona-Server-5.1.68-rel14.5-513.Linux.x86_64/scripts/mysqldumpslow
mysql-test-run: *** ERROR: Test suite aborted

Which is understandable, since mysql-test-run.pl insists on finding mysqldumpslow in 'scripts':

grep mysqldumpslow mysql-test-run.pl
  $ENV{'MYSQLDUMPSLOW'}= mtr_script_exists("$basedir/scripts/mysqldumpslow");

while mysqldumpslow is in fact in <basedir>/bin, and there is no <basedir>/scripts in the package at all.

5.5 is not affected, MTR doesn't look for mysqldumpslow there.

Maybe I'm missing something, but the simplest workaround I found was to create a link <basedir>/scripts => <basedir>/bin .

Tags: pkg Edit Tag help

Related branches

See also bug 1022481.

tags: added: pkg
Ignacio Nin (ignacio-nin) wrote :

Confirmed. This is also happening in RPM files, and in general anytime that scriptsdir is defined to anything other than basedir/scripts/.

While the symlink solution seems straightforward, I wouldn't like to pollute /usr/ by adding a scripts symlink there. Seems that the problem is that $basedir/scripts/ is hardcoded into mysql-test-run.pl.

I think patching mysql-test-run.pl would be the best option here, and un-hard-code $basedir/scripts/. Thoughts?

Ignacio -

Patching mysql-test-run.pl looks OK fix.

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2920

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers