Bug #21247 Instance Manager: im_instance_conf.imtest fails on trees with test-1 in name
Submitted: 24 Jul 2006 7:36 Modified: 30 Aug 2006 20:09
Reporter: Ingo Strüwing Email Updates:
Status: Closed Impact on me:
None 
Category:Instance Manager Severity:S2 (Serious)
Version:5.1.12 OS:Linux (Linux)
Assigned to: Alexander Nozdrin CPU Architecture:Any

[24 Jul 2006 7:36] Ingo Strüwing
Description:
im_instance_conf               [ fail ]

Errors are (from /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/log/mysqltest-time) :
mysqltest: Result length mismatch 
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/im_instance_conf.result   2006-06-21 15:02:48.000000000 +0300
--- r/im_instance_conf.reject   2006-07-24 06:29:34.000000000 +0300
***************
*** 126,131 ****  
--- 126,154 ----
  --------------------------------------------------------------------
  --------------------------------------------------------------------
  --------------------------------------------------------------------
+ pid-file            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/im.pid
+ angel-pid-file      = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/im.angel.pid
+ socket              = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/tmp/im.sock
+ password-file       = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im.passwd
+ default-mysqld-path = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/mysqld
+ socket              = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/tmp/mysqld_1.sock
+ pid-file            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/mysqld_1.pid
+ datadir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data
+ log                 = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data/mysqld1.log
+ log-error           = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data/mysqld1.err.log
+ log-slow-queries    = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data/mysqld1.slow.log
+ language            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/english/
+ character-sets-dir  = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/charsets
+ basedir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test
+ socket              = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/tmp/mysqld_2.sock
+ pid-file            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/mysqld_2.pid
+ datadir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data
+ log                 = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data/mysqld2.log
+ log-error           = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data/mysqld2.err.log
+ log-slow-queries    = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data/mysqld2.slow.log
+ language            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/english/
+ character-sets-dir  = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/charsets
+ basedir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test
  --------------------------------------------------------------------
  --------------------------------------------------------------------
  --------------------------------------------------------------------
***************
*** 206,211 ****
--- 229,257 ----
  mysqld12      offline
  mysqld11      offline
  --------------------------------------------------------------------
+ pid-file            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/im.pid
+ angel-pid-file      = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/im.angel.pid
+ socket              = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/tmp/im.sock
+ password-file       = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im.passwd
+ default-mysqld-path = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/mysqld
+ socket              = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/tmp/mysqld_1.sock
+ pid-file            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/mysqld_1.pid
+ datadir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data
+ log                 = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data/mysqld1.log
+ log-error           = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data/mysqld1.err.log
+ log-slow-queries    = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_1.data/mysqld1.slow.log
+ language            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/english/
+ character-sets-dir  = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/charsets
+ basedir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test
+ socket              = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/tmp/mysqld_2.sock
+ pid-file            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/run/mysqld_2.pid
+ datadir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data
+ log                 = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data/mysqld2.log
+ log-error           = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data/mysqld2.err.log
+ log-slow-queries    = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test/var/im_mysqld_2.data/mysqld2.slow.log
+ language            = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/english/
+ character-sets-dir  = /mnt/hdb7/mytest/testdir-5.1-autotest-1/sql/share/charsets
+ basedir             = /mnt/hdb7/mytest/testdir-5.1-autotest-1/mysql-test
  test-1= hello world
  --------------------------------------------------------------------
  test-2=
-------------------------------------------------------
Please follow the instructions outlined at
http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html
to find the reason to this problem and how to report this.

Initially I had test-5.1-test-1. This failed on "test-5".
Changing test-5.1 to testdir-5.1 helped in this respect, but failed on
"test-1" then. Changing this to "autotest-1" was an unnecessary effort. :(((
Slowly I'm out of ideas how to rename my test trees without making them meaningless.

How to repeat:
bk clone bk-internal.mysql.com:/home/bk/mysql-5.1 testdir-5.1-autotest-1
cd testdir-5.1-autotest-1
BUILD/compile-pentium-debug-max
cd mysql-test
./mysql-test-run.pl im_instance_conf

Suggested fix:
Please change the grep pattern:

From
    --exec grep test-1 $MYSQLTEST_VARDIR/im.cnf || true;
to
    --exec grep '^test-1=' $MYSQLTEST_VARDIR/im.cnf || true;

Please do this accordingly for all similar patterns.

This will make it almost impossible to clash with tree names as they appear as absolute path names (starting with /).

The trailing '=' makes it easier for future extensions of the test beyond test-9. An instance test-10 would no longer clash with test-1.
[15 Aug 2006 12:57] 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/10473

ChangeSet@1.2277, 2006-08-15 16:57:46+04:00, anozdrin@alik. +2 -0
  Fix for BUG#21247: im_instance_conf.imtest fails on trees with test-1
  in their name.
  
  The problem was that IM-tests contained grep-statements with too wide
  patterns. The fix is to make these patterns more restrictive. Only IM-tests
  have been fixed, no code has been touched.
[24 Aug 2006 20:56] Petr Chardin
Pushed to 5.1.12
[30 Aug 2006 20:09] Paul DuBois
Test case change only. No changelog entry needed.