Bug #17194 Problem with usage of mysql-test suite shipped for RPM based platforms
Submitted: 7 Feb 2006 15:53 Modified: 10 Nov 2006 20:28
Reporter: Alexey Stroganov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.0.17a-cert OS:Linux (Linux, RPM based)
Assigned to: Joerg Bruehe CPU Architecture:Any

[7 Feb 2006 15:53] Alexey Stroganov
Description:
For RPM based Linux OSes we provide separate MySQL-test package which includes mysql-test suite. By default mysql-test suite  will be installed to /usr/share/mysql-test directory. But both  mysql-test-run and mysql-test-run.pl scripts will not work out of box as expected from this location. The problem is that mechanism of detection of basedir  in these scripts support either tar.gz  or source installations but not RPM based installations. 

[root@rx2620a mysql-test]# pwd
/usr/share/mysql-test
[root@rx2620a mysql-test]# ./mysql-test-run alias
Installing Test Databases
Removing Stale Files
Installing Master Databases
mysqld is missing - looked in ../bin and in ../libexec
Error:  Could not install master test DBs

How to repeat:
1.install MySQL-test RPM package
2. cd /usr/share/mysql-test 
3. run  ./mysql-test-run
[7 Jul 2006 7:29] Tommy Yan
I also find this problem in 5.0.17c. 

Please inform me if there're any progress.
[4 Oct 2006 21:01] Chris Calender
This also occurs in 5.0.24a.
[20 Oct 2006 14:54] Joerg Bruehe
Testing with both the shell and the Perl version of the test suite script,
both fail ...
It seems that both the creation of subdirectories ("/usr/share/mysql-test/var")
and the search for the "mysqld" server binary need fixing ...
[1 Nov 2006 19:17] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/14705

ChangeSet@1.2557, 2006-11-01 20:17:10+01:00, joerg@trift2. +2 -0
  mysql-test/mysql-test-run.pl  +  mysql-test/mysql-test-run.sh
  
  Necessary changes if one of the test scripts is to be used with a RPM installation (bug#17194).
  
  This change handles finding the server and the other programs,
  but it does not solve the problem to get a writable "var" directory.
  If we want to avoid world-writable directories below "/usr/share/mysql-test" (and we do!), 
  any automatic solution would require fixed decisions which may not match the local installation.
  
  For the Perl script, use "--vardir"; for the shell script, create "mysql-test/var" manually.
[7 Nov 2006 16:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/14977

ChangeSet@1.2282, 2006-11-07 17:10:46+01:00, joerg@trift2. +1 -0
  mysql-test/mysql-test-run.sh  :    After-merge fix  (bug#17194)
[9 Nov 2006 16:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15097

ChangeSet@1.2558, 2006-11-09 17:43:31+01:00, joerg@trift2. +1 -0
  mysql-test/install_test_db.sh
      Adapt to the different path of the server program, if installation was by RPM.
      Missing in the first changeset for bug#17194.
[10 Nov 2006 10:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15120

ChangeSet@1.2284, 2006-11-10 11:21:42+01:00, joerg@trift2. +1 -0
  mysql-test/mysql-test-run.pl  :    After-merge fix: Handle "mysqlmanager" (bug#17194).
[10 Nov 2006 19:44] Joerg Bruehe
Pushed to the trees of 4.1.23, 5.0.30, and 5.1.13-beta.

The shell version of "mysql-test-run" is deprecated at least for 5.0 and up,
so this fix concentrates on the Perl script.
There is a privilege issue with the test directory remaining (5.0 and 5.1) which I hope will get solved before the listed release builds (no bug# assigned).

For the limitations of this fix, see the note of 2006-11-01 20:17.

A more detailed (internal) explanation is in same day's note of 16:48.
[10 Nov 2006 20:28] Paul DuBois
Noted in 4.1.23, 5.0.30, 5.1.13 changelogs.

mysql-test-run did not work correctly for RPM-based installations.