[MDEV-14288] Add MTR option to run tests with real server defaults Created: 2017-11-04  Updated: 2018-01-01  Resolved: 2018-01-01

Status: Closed
Project: MariaDB Server
Component/s: Tests
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Won't Do Votes: 0
Labels: None

Attachments: File mtr_default_server.patch    

 Description   

It's often important, especially on the stage when we try to create a test case for a problem initially observed in a realistic environment, to run such test case with server config based on real defaults (possibly with explicit additions from the failing environment). It happens a lot that when someone runs seemingly the exact same set of statements in MTR, the failure stops happening (or vice versa), and a lot of time is spent on investigating why it is so; or even worse, the problem is declared to be not reproducible.

The goal of this task is to add a command-line option --default-server-options (with no argument) to mysql-test-run.pl which will

  • replace usual default_my.cnf, containing numerous non-default options, with an empty config (apart from locations and paths which still need to be there, of course); the empty config template is also added in the scope of this task;
  • disable skipping optional plugins which happens in My/ConfigFactory.pm;
  • remove hardcoded additions to bootstrap.

The typical use of the option for developers would be, when a reporter posts a set of SQL commands to reproduce a bug, rather than an MTR test case (which is usual for external reporters), and when the failure does not occur when the developer puts this set of SQL commands into an MTR test case, try running it with --default-server-options and see if it makes a difference.

Testers will have more use for the option.

The option only affects "default defaults". Whatever is added through custom cnf files and/or opt files will still be added.



 Comments   
Comment by Elena Stepanova [ 2017-11-04 ]

serg,

I know we have too many options in MTR, but I'd want to have this small thing, would help me a lot as now I have to modify MTR manually every time. Please check if you're okay with it.
https://github.com/MariaDB/server/commit/d78273d1e53308c8fe78b9e067a88c43bd05e540

Comment by Elena Stepanova [ 2018-01-01 ]

The simple patch hasn't passed the review, and I don't want to make it more complicated, at least until there is an actual demand for it from people other than me, so I'm closing it for now. So far it's easier to apply the existing patch locally, it works perfectly for me on intermediate stages of reproducing bugs. I'm attaching it here so that I can easily find it even if it disappears from the JIRA commits linked to the issue.

Generated at Thu Feb 08 08:12:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.