Bug #98703 clone.remote_basic_replace fails, result mismatch
Submitted: 21 Feb 2020 8:10 Modified: 25 Feb 2020 3:07
Reporter: Hao Li Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:8.0.18 OS:CentOS
Assigned to: CPU Architecture:Any
Tags: MTR fail

[21 Feb 2020 8:10] Hao Li
Description:
clone.remote_basic_replace, clone.remote_dml_replace, clone.remote_recovery
these case fails when i run mtr test.

we got the err message as following:

mysqltest: Connecting to server localhost:13041 (socket /common_02/mtu/hwsql/bin__community_debug/mysql-test/var/tmp/mysqld.2.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-testcase.test' ...
mysqltest: ... Done processing test commands.
--- /common_02/mtu/hwsql/bin__community_debug/mysql-test/var/tmp/check-mysqld_2.result	2020-02-21 10:52:41.191000000 +0300
+++ /common_02/mtu/hwsql/bin__community_debug/mysql-test/var/tmp/check-mysqld_2.reject	2020-02-21 10:52:41.420000000 +0300
@@ -75,6 +75,7 @@
 #-------------- MYSQLTEST_VARDIR/tmp --------------
 mysqld.1
 mysqld.2
+tmp.inc
 #------------- MYSQLTEST_VARDIR/std_data ------------
 .mylogin.cnf
 14897.frm

mysqltest: Result content mismatch

it seems the teset case donot do cleanup properly.

How to repeat:
./mtr --report-unstable-tests  clone.remote_basic_replace

Suggested fix:
Do cleanup properly. 

When i check out the file "check-testcase.test" file. i found that it say "the important files, directory will be check", and these file names will insret into a temporary table 'file_tbl' and be checked and do cleanup works if option 'proceed_with_check_of_files' is set.
[24 Feb 2020 12:34] MySQL Verification Team
Hello Hao Li,

Thank you for the report and feedback.
I'm not seeing any issues at my end with 8.0.19/8.0.18 debug/release build. Could you please confirm exact cmake options used for the build if you have source build, along with OS details? Thank you.

-
 ./mtr --report-unstable-tests  clone.remote_basic_replace
Logging: ./mtr  --report-unstable-tests clone.remote_basic_replace
MySQL Version 8.0.19
Checking supported features
Using 'all' suites
Collecting tests
Checking leftover processes
Removing old var directory
Creating var directory '/export/umesh/server/binaries/GABuilds/mysql-8.0.19/mysql-test/var'
Installing system database
Using parallel: 1

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[100%] clone.remote_basic_replace                [ pass ]  23120
------------------------------------------------------------------------------
The servers were restarted 0 times
The servers were reinitialized 0 times
Spent 23.120 of 32 seconds executing testcases

Completed: All 1 tests were successful.

-
 ./mtr --report-unstable-tests  clone.remote_basic_replace --user=root
Logging: ./mtr  --report-unstable-tests clone.remote_basic_replace --user=root
MySQL Version 8.0.19
Too long tmpdir path '/export/umesh/server/source/bugs/src_build/fb_builds/98719/mysql-8.0.19/mysql-test/var/tmp'  creating a shorter one
 - Using tmpdir: '/tmp/UwboBJmFeA'

Checking supported features
 - Binaries are debug compiled
Using 'all' suites
Collecting tests
Checking leftover processes
Removing old var directory
Creating var directory '/export/umesh/server/source/bugs/src_build/fb_builds/98719/mysql-8.0.19/mysql-test/var'
Installing system database
Using parallel: 1

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[100%] clone.remote_basic_replace                [ pass ]  32772
------------------------------------------------------------------------------
The servers were restarted 0 times
The servers were reinitialized 0 times
Spent 32.772 of 56 seconds executing testcases

Completed: All 1 tests were successful.

regards,
Umesh
[25 Feb 2020 3:05] Hao Li
the cmake option i used as following:

cmake .. -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=RelWithDebInfo  -DCMAKE_INSTALL_PREFIX=../bin -DWITH_BOOST=/path/to/boost_1_70_0 -DCMAKE_C_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches" -DCMAKE_CXX_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches" -DWITH_SYSTEMD=1 -DWITH_INNODB_MEMCACHED=1 -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=1 -DWITH_EMBEDDED_SHARED_LIBRARY=0 '-DCOMPILATION_COMMENT=MySQL Community Server - (GPL)' -DMYSQL_SERVER_SUFFIX=

[yyy@ecs-xxx-dev mysql-test]$ uname -a
Linux ecs-xxx-dev 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

and 

[yyy@ecs-xxx-dev mysql-test]$ ./mtr --report-unstable-tests clone.remote_basic_replace  
Logging: ./mtr  --report-unstable-tests clone.remote_basic_replace
MySQL Version 8.0.18
Checking supported features
Using 'all' suites
Collecting tests
Removing old var directory
Creating var directory '/common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var'
Installing system database
Using parallel: 1

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[100%] clone.remote_basic_replace                [ fail ]
        Test ended at 2020-02-25 10:58:38

MTR's internal check of the test case 'clone.remote_basic_replace' failed.
This means that the test case does not preserve the state that existed
before the test case was executed.  Most likely the test case did not
do a proper clean-up. It could also be caused by the previous test run
by this thread, if the server wasn't restarted.
This is the diff of the states of the servers before and after the
test case was executed:
mysqltest: Results saved in '/common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var/tmp/check-mysqld_1.result'.
mysqltest: Logging to '/common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var/tmp/check-mysqld_1.log'.
mysqltest: Connecting to server localhost:13020 (socket /common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-testcase.test' ...
mysqltest: ... Done processing test commands.
--- /common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var/tmp/check-mysqld_1.result	2020-02-25 05:58:38.054000000 +0300
+++ /common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var/tmp/check-mysqld_1.reject	2020-02-25 05:58:38.246000000 +0300
@@ -75,6 +75,7 @@
 #-------------- MYSQLTEST_VARDIR/tmp --------------
 mysqld.1
 mysqld.2
+tmp.inc
 #------------- MYSQLTEST_VARDIR/std_data ------------
 .mylogin.cnf
 14897.frm

mysqltest: Result content mismatch

not ok
safe_process[28747]: Child process: 28749, exit: 1

Skip condition should be checked in the beginning of a test case,
before modifying any database objects. Most likely the test case
is skipped with the current server configuration after altering
system status. Please fix the test case to perform the skip
condition check before modifying the system status.

 - the logfile can be found in '/common_02/mtu/hwsql_2/hwsql/bin/mysql-test/var/log/clone.remote_basic_replace/remote_basic_replace.log'

------------------------------------------------------------------------------
The servers were restarted 0 times
The servers were reinitialized 0 times
Spent 0.000 of 13 seconds executing testcases

Check of testcase failed for: clone.remote_basic_replace

Completed: Failed 1/1 tests, 0.00% were successful.

Failing test(s): clone.remote_basic_replace

The log files in var/log may give you some hint of what went wrong.
[25 Feb 2020 3:07] Hao Li
[yyy@ecs-xxx-dev mysql-test]$ gcc --version
gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.