Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77104 - dev-db/mysql sql-bench suite incorrectly locates @INC in run-all-tests
Summary: dev-db/mysql sql-bench suite incorrectly locates @INC in run-all-tests
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-07 20:32 UTC by Michael Crawford (ali3nx)
Modified: 2005-01-08 17:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Crawford (ali3nx) 2005-01-07 20:32:47 UTC
white attemting to prepare the sql-bench suite that is installed with mysql's docs  
i encountered a syntax error in sql-bench's environment variables that locate perl modules in @INC

Reproducible: Always
Steps to Reproduce:
1. emerge mysql
2. perl /usr/share/mysql-{packageversion}/sql-bench/run-all-tests
3. observe the path that run-all-tests looks for @INC
4. Installing the dependant scripts in an accepted @INC path will not satisfy perl due to the syntax of $pwd and the cwd() function attempting to find bench-init.pl at /root/bench-init.pl 
Actual Results:  
gateway ~ # perl /usr/share/mysql/sql-bench/run-all-tests
Can't locate /root/bench-init.pl in @INC (@INC contains: /etc/perl
/usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i686-linux
/usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl
/usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i686-linux .) at
/usr/share/mysql/sql-bench/run-all-tests line 43.


Expected Results:  
usable mysql benchmarking suite for gentoo linux

I'm quite positive that the following section of the script is responsible for
the error. specifically the path variable in the $dir variable

@ORG_ARGV=@ARGV;
$pwd = cwd(); $pwd = "." if ($pwd eq '');
require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
$opt_silent=0;
$perl=$^X;
$machine=machine();
$redirect= !($machine =~ /windows/i || $machine =~ "^NT\s") ? "2>&1" : "";
$dir= ($pwd =~ /\\/) ? '\\' : '/';      # directory symbol for shell
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-08 17:58:29 UTC
Read the upstream documentation:
http://dev.mysql.com/doc/mysql/en/MySQL_Benchmarks.html

You must change to the /usr/share/mysql/sql-bench/ directory to run the tests.