Bug #95201 main.check_basedir broken in debug build unless CMake DEBUG_EXTNAME=OFF
Submitted: 30 Apr 2019 11:43 Modified: 30 May 2019 13:10
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.0.11+ OS:Any
Assigned to: CPU Architecture:Any
Tags: cmake, mtr

[30 Apr 2019 11:43] Laurynas Biveinis
Description:
If mysqld binary is built as mysqld-debug (i.e by. -DBUILD_CONFIG=mysql_release or -DDEBUG_EXTNAME=ON), main.check_basedir reports a not-really-correct testcase check error:

...
MTR's internal check of the test case 'main.check_basedir' failed.
...
This is the diff of the states of the servers before and after the
test case was executed:
...
@@ -68,10 +68,12 @@
 run
 std_data
 tmp
+tmpniAbUx
 #-------------- MYSQLTEST_VARDIR/run --------------
 mysqld.1.pid
 #-------------- MYSQLTEST_VARDIR/tmp --------------
 mysqld.1
+server.out
 #------------- MYSQLTEST_VARDIR/std_data ------------
 .mylogin.cnf
 14897.frm

First of all, this is misleading, this is not a testcase check error for a passing test, this is a test failure posing as a check error. tmp/server.out contains

sh: runtime_output_directory/mysqld: No such file or directory

which is the actual failure here, caused by test Perl snippets constructing relative paths to mysqld binary and assuming it is named "mysqld", while it is actually "mysqld-debug" under this CMake setup:
line 39:   my $exe= File::Spec->catfile($relbindir, "mysqld");
line 64:  my $syscmd= "mysqld $ENV{'HVARGS'}";

If --nocheck-testcases is given, the test is "skipped" with the following message, again not correct:

[100%] main.check_basedir                        [ skipped ]  perl not found in path

The test passes if it is patched to use mysqld-debug.

How to repeat:
See above

Suggested fix:
Make test logic work with both mysqld and mysqld-debug
[3 May 2019 7:32] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback.

regards,
Umesh
[30 May 2019 13:10] Paul DuBois
Posted by developer:
 
Fixed in 8.0.18.

Configuration cleanup for test suite. No changelog entry required.