Description:
test_services, test_services_threaded, test_services_plugin_registry perform some actions, then check the server error log for their output. This is done with the commonly seen MTR antipattern of using the default mysqld.1.err, at least without its truncation. This is wrong for the usual reasons: MTR --repeat is broken, the test depends on the previous tests in the same run, enabling both false positives and false negatives.
In this case LOAD DATA LOCAL INFILE is used with FIELDS TERMINATED BY ' [', which is not always able to handle the output of all the previous tests in the server error log.
How to repeat:
For example,
$ ./mtr --debug-server test_services --repeat=2
...
test_services.test_services [ pass ] 224
test_services.test_services [ fail ]
Test ended at 2017-10-02 09:04:54
CURRENT_TEST: test_services.test_services
--- /home/laurynas/mysql-8.0.3/mysql-test/suite/test_services/r/test_services.result 2017-09-19 13:22:09.000000000 +0300
+++ /home/laurynas/obj-mysql-8.0.3-san-debug/mysql-test/var/log/test_services.reject 2017-10-02 09:04:54.654009855 +0300
@@ -37,4 +37,9 @@
Note] Plugin test_services reported: 'This is the test plugin for services testing info report output'
Warning] Plugin test_services reported: 'This is a warning from test plugin for services testing warning report output'
ERROR] Plugin test_services reported: 'This is an error from test plugin for services testing error report output'
+Note] Plugin test_services reported: 'Test_services with_snprintf_val: 1'
+Note] Plugin test_services reported: 'Test_services with_log_message_val: 1'
+Note] Plugin test_services reported: 'This is the test plugin for services testing info report output'
+Warning] Plugin test_services reported: 'This is a warning from test plugin for services testing warning report output'
+ERROR] Plugin test_services reported: 'This is an error from test plugin for services testing error report output'
DROP TABLE IF EXISTS t1;
mysqltest: Result length mismatch
As for the FIELDS TERMINATED BY ' [':
170922 19:39:26 +29.391 [ 40%] test_services.test_services_threaded [ fail ]
Test ended at 2017-09-22 19:39:26
CURRENT_TEST: test_services.test_services_threaded
mysqltest: At line 33: query 'LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/log/mysqld.1.err' INTO TABLE t1
FIELDS TERMINATED BY ' ['' failed: 1300: Invalid utf8mb4 character string: 'Note] InnoDB: keynr=1, ''
Suggested fix:
Restart the server with the custom error log path, analyze that. Then keeping FIELDS TERMINATED BY ' [' could be acceptable too.