Bug #39972 mysql-test-run.pl: Confusing error message under special conditions

Submitted: 10 Oct 2008 10:55 Modified: 21 Dec 2010 14:00
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[10 Oct 2008 10:55] Matthias Leich
Description:
Annoying effect:
----------------
1. "var" points to a directory which does not exist
   > ls -l var
   lrwxrwxrwx 1 mleich ..... var -> /dev/shm/var_4_XJZ9
   > ls -l /dev/shm/var_4_XJZ9
   ls: Zugriff auf /dev/shm/var_4_XJZ9 nicht möglich:
       Datei oder Verzeichnis nicht gefunden
   (In english: No access to .... file or directory does not exist)
2. IMHO positive case:
   > ./mysql-test-run.pl   rpl_init_slave_func
   Logging: ./mysql-test-run.pl  rpl_init_slave_func
   MySQL Version 5.1.30
   mkdir /work2/5.1/mysql-5.1-rpl/mysql-test/var:
       Die Datei existiert bereits   at lib/My/Platform.pm line 116
       (The file exists already ....)
       \nToo long tmpdir path '/work2/5.1/mysql-5.1-rpl/mysql-test/var/tmp'
        creating a shorter one...
   - using tmpdir: '/tmp/NvX2us4Ak4'
   Checking supported features...
   ....
   Collecting tests...
   vardir: /work2/5.1/mysql-5.1-rpl/mysql-test/var
   Removing old var directory...
   - WARNING: Using the 'mysql-test/var' symlink
   mysql-test-run: *** ERROR: The destination for symlink 
   /work2/5.1/mysql-5.1-rpl/mysql-test/var does not exist

   Minor issue:
   I do not see that the old var directory was removed
   = the message is suspicious.
   But I assume that the current behaviour
   - reuse existing symlink to var dfirectory
   - abort with error message if the symlink is "ill"
   is one of the best solutions.

3. The annoying case:
   ./mysql-test-run.pl  --mem --timer rpl_init_slave_func
    Logging: ./mysql-test-run.pl  --mem --timer rpl_init_slave_func
    Not a SCALAR reference at lib/mtr_report.pm line 50.
    Can't read options

    ./mysql-test-run.pl [ OPTIONS ] [ TESTCASE ]

    Options to control what engine/variation to run
    .....

4. positive case: 
   ./mysql-test-run.pl --mem  rpl_init_slave_func
   Logging: ./mysql-test-run.pl  --mem rpl_init_slave_func
   MySQL Version 5.1.30
   mkdir /work2/5.1/mysql-5.1-rpl/mysql-test/var: 
   Die Datei existiert bereits at lib/My/Platform.pm line 116
   \nToo long tmpdir path 
   '/work2/5.1/mysql-5.1-rpl/mysql-test/var/tmp'  creating a shorter one...
   - using tmpdir: '/tmp/D0l5YxA1mq'
   ...
   ==================================================
   TEST                       RESULT   TIME (ms)
   --------------------------------------------------
   main.rpl_init_slave_func  [ pass ]     53
   --------------------------------------------------
   ...

The messages of MTR in case 3) are not helpful.
It looks like the combination of
1. var is a "ill" symlink
2. MTR runs with the options "--mem --timer"
is required for getting this effect.

My environment:
- Intel Core2Duo (64 Bit)
- OpenSuSE 11.0 (64 Bit)
- MySQL compiled from source
  tree: mysql-5.1-rpl
  last changeset; 2008-10-09 00:04:48 +0200

How to repeat:
See above
[21 Jan 2009 10: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/63680

2714 Magnus Svensson	2009-01-21
      Bug#39972 mysql-test-run.pl: Confusing error message under special conditions
       - Fix problem with for example ./mtr --timer, caused by new version of "Getopt::Long"
       - Evaluating the "$opt" variable as a string, returns the name of the parameter
         to be modified instead of "Getopt::Long::Callback" which is the class name
[30 Jan 2009 13:31] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:10] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:msvensson@mysql.com-20090121101716-9tjwp9oevbryqo0h) (merge vers: 5.1.31) (pib:6)
[17 Feb 2009 14:59] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:47] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:23] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)
[21 Dec 2010 14:00] Bjørn Munch
The fix for case #3 was pushed but the bug report never got updated.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.065 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.