Bug #48282 restore_stress test: mysql-stress-test tool can't find mysqltest utility in PB2
Submitted: 24 Oct 2009 15:41 Modified: 20 Feb 2010 19:06
Reporter: Rafal Somla Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Rafal Somla CPU Architecture:Any
Tags: team tree

[24 Oct 2009 15:41] Rafal Somla
Description:
restore_stress test which is in daily collection for 6.0-backup tree uses mysql-stress-test tool. In PB2 environment this tools fails with error:

ERROR: mysqltest binary ../client/mysqltest not found No such file or directory.
You must either specify file location explicitly using --mysqltest
option, or make sure path to mysqltest binary is listed 
in your PATH environment variable.
mysqltest: At line 133: command "perl ./mysql-stress-test.pl $STRESS_OPTS >$STRESS_DIR/stress.log" failed

How to repeat:
Observed in daily PB runs for 6.0-backup tree.

Suggested fix:
Add explicit path to mysqltest tool via --mysqltest option to mysql-stress-test.pl script.
[24 Oct 2009 16:09] Rafal Somla
REFINED PROBLEM DESCRIPTION
===========================

In backup_extra.restore_stress test, the --mysqltest option for mysql-stress-test script is set explicitly to ../client/mysqltest. However this is a wrong setting, e.g., when test is run inside a binary distribution in which case mysqltest utility is located in bin/ directory.
[26 Oct 2009 13:13] Rafal Somla
PROPOSED SOLUTION
=================

Extend MTR to export MYSQL_TEST_EXE variable holding the path to mysqltest utility (without options). This will be passed to mysql-stress-test.pl via --mysqltest option.
[18 Nov 2009 9:23] 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/90806

2894 Rafal Somla	2009-11-18
      Bug #48282 restore_stress test: mysql-stress-test tool can't find mysqltest utility in PB2
      
      The problem was that location of mysqltest utility, as passed to 
      mysql-stress-test.pl script via --mysqltest option was correct only
      in a source tree but not in other tree layouts.
      
      This is fixed by adding to MTR a new $MYSQL_TEST_EXE variable pointing
      at the correct location of the utility. Then this is used to pass 
      correct path to mysql-stress-test.pl.
      
      At the same time this patch fixes the issue of backup_restore suite 
      not being usable from MTR because it contained test scripts to be 
      used only by mysql-stress-test.pl script. Now these test scripts and 
      companinon files are moved to suite/backup_extra/fligtstats_stress/ dir.
     @ mysql-test/mysql-test-run.pl
        Define MYSQL_TEST_EXE variable pointing at mysqltest executable.
     @ mysql-test/suite/backup_extra/flightstats_stress/init_flightstat_stress.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_delete.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_init.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_insert.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_restore.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_update.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/run_flightstat_stress.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/run_flightstat_stress_with_restore.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_cleanup.test
        - Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_delete.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_init.test
        - Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_insert.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_restore.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_update.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/stress_basedir
        Remove the working directory for restore_stress test. Now it will be
        created by test script if it does not exist.
     @ mysql-test/suite/backup_extra/t/restore_stress.test
        - Set --mysqltest option using $MYSQL_TEST_EXE value - this is the main fix for
          the problem.
        - Update test to reflect new location of stress test scripts.
     @ mysql-test/suite/backup_extra/vptest/run_vp_test.pl
        - Update test to reflect new location of stress test scripts.
        - Changed location of working dir ($stress_basedir) to make it the same as
          the one used in restore_stress test.
[19 Nov 2009 12:00] Bjørn Munch
There's one thing in the long patch I wonder about: In flightstat_stress_init.result I see this seemingly unrelated change:

-RETURN ROUND(num * RAND() + 0.5);
+RETURN CEILING(num * RAND());

More generally, I wonder why the move of the fligtstats_stress is done here, isn't that a separate issue from the mysqltest problem?
[19 Nov 2009 13:41] Chuck Bell
Approved.
[19 Nov 2009 15:06] Bjørn Munch
OK to push.
[19 Nov 2009 15:49] 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/90973

2890 Rafal Somla	2009-11-19
      Bug #48282 restore_stress test: mysql-stress-test tool can't find mysqltest utility in PB2
      
      The problem was that location of mysqltest utility, as passed to 
      mysql-stress-test.pl script via --mysqltest option was correct only
      in a source tree but not in other tree layouts.
      
      This is fixed by adding to MTR a new $MYSQL_TEST_EXE variable pointing
      at the correct location of the utility. Then this is used to pass 
      correct path to mysql-stress-test.pl.
      
      At the same time this patch fixes the issue of backup_restore suite 
      not being usable from MTR because it contained test scripts to be 
      used only by mysql-stress-test.pl script. Now these test scripts and 
      companinon files are moved to suite/backup_extra/fligtstats_stress/ dir.
     @ mysql-test/mysql-test-run.pl
        Define MYSQL_TEST_EXE variable pointing at mysqltest executable.
     @ mysql-test/suite/backup_extra/flightstats_stress/init_flightstat_stress.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_delete.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_init.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_insert.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_restore.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_update.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/run_flightstat_stress.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/run_flightstat_stress_with_restore.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_cleanup.test
        - Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_delete.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_init.test
        - Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_insert.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_restore.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_update.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/stress_basedir
        Remove the working directory for restore_stress test. Now it will be
        created by test script if it does not exist.
     @ mysql-test/suite/backup_extra/t/restore_stress.test
        - Set --mysqltest option using $MYSQL_TEST_EXE value - this is the main fix for
          the problem.
        - Update test to reflect new location of stress test scripts.
     @ mysql-test/suite/backup_extra/vptest/run_vp_test.pl
        - Update test to reflect new location of stress test scripts.
        - Changed location of working dir ($stress_basedir) to make it the same as
          the one used in restore_stress test.
[19 Nov 2009 15:51] 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/90974

2890 Rafal Somla	2009-11-19
      Bug #48282 restore_stress test: mysql-stress-test tool can't find 
                 mysqltest utility in PB2
      
      The problem was that location of mysqltest utility, as passed to 
      mysql-stress-test.pl script via --mysqltest option was correct only
      in a source tree but not in other tree layouts.
      
      This is fixed by adding to MTR a new $MYSQL_TEST_EXE variable 
      pointing at the correct location of the utility. Then this is used 
      to pass correct path to mysql-stress-test.pl.
      
      At the same time this patch fixes the issue of backup_restore suite 
      not being usable from MTR because it contained test scripts to be 
      used only by mysql-stress-test.pl script. Now these test scripts and 
      companion files are moved to suite/backup_extra/flightstats_stress/ 
      dir.
     @ mysql-test/mysql-test-run.pl
        Define MYSQL_TEST_EXE variable pointing at mysqltest executable.
     @ mysql-test/suite/backup_extra/flightstats_stress/init_flightstat_stress.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_delete.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_init.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_insert.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_restore.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/r/flightstat_stress_update.result
        - Move files used by mysql-stress-test utility to separate folder.
        - Updated result file.
     @ mysql-test/suite/backup_extra/flightstats_stress/run_flightstat_stress.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/run_flightstat_stress_with_restore.txt
        Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_cleanup.test
        - Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_delete.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_init.test
        - Move files used by mysql-stress-test utility to separate folder.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_insert.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_restore.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/flightstats_stress/t/flightstat_stress_update.test
        - Move files used by mysql-stress-test utility to separate folder.
        - Disable logging to make result file robust and deterministic. This
          is to avoid false warnings from mysql-stress-test utility.
     @ mysql-test/suite/backup_extra/stress_basedir
        Remove the working directory for restore_stress test. Now it will be
        created by test script if it does not exist.
     @ mysql-test/suite/backup_extra/t/restore_stress.test
        - Set --mysqltest option using $MYSQL_TEST_EXE value - this is the main fix for
          the problem.
        - Update test to reflect new location of stress test scripts.
     @ mysql-test/suite/backup_extra/vptest/run_vp_test.pl
        - Update test to reflect new location of stress test scripts.
        - Changed location of working dir ($stress_basedir) to make it the same as
          the one used in restore_stress test.
[19 Nov 2009 15:52] Rafal Somla
Pushed to mysql-6.0-backup tree.
revid:rafal.somla@sun.com-20091119155000-72twg8q6tq9a4b0y
[20 Feb 2010 9:17] Bugs System
Pushed into 6.0.14-alpha (revid:ingo.struewing@sun.com-20100218152520-s4v1ld76bif06eqn) (version source revid:ingo.struewing@sun.com-20100119103538-wtp5alpz4p2jayl5) (merge vers: 6.0.14-alpha) (pib:16)
[20 Feb 2010 19:06] Paul DuBois
Changes to test suite/test cases. No changelog entry needed.