[MDEV-11861] Some replication tests quit dirty when skipped from inside the test Created: 2017-01-21 Updated: 2017-09-22 Resolved: 2017-09-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Affects Version/s: | 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.0.33, 10.1.27, 10.2.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Some replication tests first establish and start replication, then find out that server options are not suitable and skip the rest of execution, thus leaving the replication running. It affects the next test started on the same servers when it attempts to configure replication and fails because it's not possible to do with replication already running. Example:
The test rpl_innodb_bug68220.test starts this way:
An easy fix is to re-order include files, so that binlog format is checked before replication is configured:
A smart way, however, is to find out why MTR doesn't check the environment after a skipped test and doesn't clean-up, as it would have done if the test failed rather than was skipped. |
| Comments |
| Comment by Elena Stepanova [ 2017-08-10 ] | ||||||||||||||||||||
|
| ||||||||||||||||||||
| Comment by Kristian Nielsen [ 2017-08-11 ] | ||||||||||||||||||||
|
Right, currently master_slave.inc (or rpl_init.inc) must come after any have_xxx.inc checks that can cause the test case to be skipped. The cleanup-after-failure involves restarting (and re-installing I think) all mysqld's, that would be too expensive to do for every skipped test. It used to be that some have_xxx tests were interpreted before even running mysqltest. Then the test case never starts, and master-slave.inc cannot run. I prefered that as it is much faster, but I wonder if perhaps it is not like that anymore, since have_binlog_format_row can trigger this. Maybe that's also why this problem becomes worse? It is in any case kind of wrong not to do skip tests before doing real work like starting slaves. Maybe just fix all of them at once? Using something like this to find them:
There are quite a few... but shouldn't be hard to just do all the reorderings once and for all? | ||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-11 ] | ||||||||||||||||||||
Probably some are still do, but it is not always possible. More often than not these files check the variables of the currently running server – so, the server must be started before the check is performed.
I agree that we should try to do it whenever possible, but again, I'm afraid it's not always possible. I was going to do it anyway, whenever possible, and see in how many cases it's not.
Now, that's certainly impossible. We can fix existing tests, but there should certainly be new ones. | ||||||||||||||||||||
| Comment by Kristian Nielsen [ 2017-08-11 ] | ||||||||||||||||||||
Hehe, yes, that's true. Maybe it would be best if check_testcase was also run for skipped tests?
Maybe add in the $res==62 case a call to check_testcase() similar to the $res==0 case? Might make tests take longer, but perhaps not too much, that can be measured. And random failures that depent on test order are troublesome. Anyway, just a suggestion. |