Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28914

MTR commands do not support "assert", "force_cpdir" and "copy_files_wildcard"



    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4
    • None
    • None


      "assert" command

      Thanks dlenski for pointing out that it is very confusing and error-prone to write `assert` statements in MTR tests.

      From dlenski:
      A big part of writing clear tests is being able to write code that says "Try running something as a test. Now let's verify that its actual results match our expected results."

      In procedural programming languages, assertions are the natural way to do this. In a statement like assert expected_results == actual_results, the expected results live right next to the code under test, and assert statements are often instrumented with debugging capabilities to help understand mismatches between actual/expected results. This makes it easier to read and review test code.

      One possible way to improve on this situation is to port the assert statement from MySQL's MTR to MariaDB's MTR.

      "force_cpdir" & "copy_files_wildcard" commands

      The current set of MariaDB MTR test commands do not provide the ability to copy directories or multiple files together, comparing to MySQL MTR commands where "force_cpdir" and "copy_files_wildcard" can be used.

      It makes even less sense that MariaDB has "remove_files_wildcard" supported but not "copy_files_wildcard".

      This causes inconvenience in some scenario, for example "force_cpdir" is useful when a test need to replace certain folders within the $datadir, and "copy_files_wildard" is useful when copying all files related to a specific table to another location


      Port MySQL's implementation of the above three commands to MariaDB:


        Issue Links



              serg Sergei Golubchik
              Tingynia Tingyao Nian
              0 Vote for this issue
              5 Start watching this issue



                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.