Bug #61425 | Test suite run fails on the main.file_contents test case | ||
---|---|---|---|
Submitted: | 6 Jun 2011 16:29 | Modified: | 11 Jun 2011 8:11 |
Reporter: | Naveen Shetty | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Tests | Severity: | S3 (Non-critical) |
Version: | 5.5.12 | OS: | Linux (CentOS 5.5 i386 32bit (Final)) |
Assigned to: | CPU Architecture: | Any | |
Tags: | main.file_contents, test suite failure on centOS 5.5 |
[6 Jun 2011 16:29]
Naveen Shetty
[9 Jun 2011 21:39]
Naveen Shetty
I am updating the status of the bug as it is leads to Test Suite failure on CentOS 5.5.
[11 Jun 2011 8:11]
Sveta Smirnova
Thank you for the report. Verified as described.
[27 Feb 2012 10:01]
Honza Horak
This issue is happening also in Fedora. First, I wonder what correct value of MYSQL_BINDIR environment variable should be. I see it is '/usr' currently, which fails in the first match test: $dir_bin =~ m|/usr/| Is '/usr' right? Later then, $dir_docs is not /usr/share/doc as it probably supposes to be, but it is still '/usr', because a substitution s|/lib|/share/doc| is a no-op, since $dir_bin doesn't contain '/lib' at all. Second, there is a "Red Hat part", which doesn't actually correspond with the way, how docs are packaged in Fedora. It supposes to have $dir_docs/MySQL-server*, but docs are in $dir_docs/mysql-server* in Fedora. The following is a minimal patch, that fixes the testcase in Fedora and shouldn't influence other distros: --- mysql-5.5.20/mysql-test/t/file_contents.test.fixpath 2012-02-27 10:34:23.847382472 +0100 +++ mysql-5.5.20/mysql-test/t/file_contents.test 2012-02-27 10:34:52.157028555 +0100 @@ -11,7 +11,7 @@ --perl print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n"; $dir_bin = $ENV{'MYSQL_BINDIR'}; -if ($dir_bin =~ m|/usr/|) { +if ($dir_bin =~ m|/usr|) { # RPM package $dir_docs = $dir_bin; $dir_docs =~ s|/lib|/share/doc|; @@ -20,7 +20,8 @@ if ($dir_bin =~ m|/usr/|) { $dir_docs = glob "$dir_docs/packages/MySQL-server*"; } else { # RedHat: version number in directory name - $dir_docs = glob "$dir_docs/MySQL-server*"; + $dir_docs = "$dir_bin/share/doc"; + $dir_docs = glob "$dir_docs/mysql-server*"; } } elsif ($dir_bin =~ m|/usr$|) { # RPM build during development
[28 Feb 2012 2:50]
[ name withheld ]
The issue for the Fedora RPMs is first that we weren't installing INFO_SRC or INFO_BIN at all, and second that if we had been, they'd be in /usr/share/mysql-server-something not /usr/share/MySQL-server-something. However, I don't think that we should undertake a discussion of how to dodge that package naming difference, because the real problem with this is that putting these files in %doc violates multiple packaging guidelines. In the first place, %doc is only supposed to contain files that are documentation, ie are not actually needed for the software to function. If the regression tests fail without them, they don't belong in %doc. In the second place, files in /usr/share/doc must be architecture-independent, and the INFO_BIN file clearly is not. So multilib installations would fail if we do it this way. AFAICS the sanest place to put INFO_BIN is /usr/lib(64)/mysql/. There's some room for argument about INFO_SRC, but seems best to keep it beside INFO_BIN. So for the moment I'm changing the Fedora RPMs to install these two files there, and patching the file_contents test to look there. It's a pretty ugly patch though, because I can't find that the mtr environment provides any guidance on where the installation library directory is. Perhaps that could be improved in the future? This is related to bug #52223, which shows that there's another test that would really like access to the correct value of MYSQL_LIBDIR.