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

global debug_dbug pre-test value restoration issues

    XMLWordPrintable

    Details

      Description

      There are two failure-prone pattern in mtr suite tests that allows for a pre-test
      global.debug_dbug value to not be actually restored, though the test intends doing so.

      1. Total reset of @@global.debug_dbug at the end of the test, like in
      rpl.kill_race_condition leads to a mtr report like

      *--- /home2/me/MDB/WTs/10.5/sandbox/RUN_DEBUG/mysql-test/var/tmp/check-mysqld_2.result	2019-12-19 16:25:40.952378912 +0200
      +++ /home2/me/MDB/WTs/10.5/sandbox/RUN_DEBUG/mysql-test/var/tmp/check-mysqld_2.reject	2019-12-19 16:25:42.168365805 +0200
      @@ -124,9 +124,9 @@
       DEADLOCK_SEARCH_DEPTH_SHORT	4
       DEADLOCK_TIMEOUT_LONG	50000000
       DEADLOCK_TIMEOUT_SHORT	10000
      -DEBUG	d,ib_log_checkpoint_avoid
      +DEBUG	
       DEBUG_BINLOG_FSYNC_SLEEP	0
      -DEBUG_DBUG	d,ib_log_checkpoint_avoid
      +DEBUG_DBUG	
       DEBUG_MUTEX_DEADLOCK_DETECTOR	ON
       DEBUG_NO_THREAD_ALARM	OFF
       DEFAULT_PASSWORD_LIFETIME	0
       
      mysqltest: Result length mismatch
       
      not ok
       
      rpl.kill_race_condition 'row'            [ pass ]    787
       
      MTR's internal check of the test case 'rpl.kill_race_condition' 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.
      no* further _formatting_ is done here
      

      when run with a pre-installed debug_dbug: ./mtr --mysqld = --debug=d,....

      2. reset to a "$saved" mtr variable that expands at the assignment

      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:77:eval SET @@global.debug_dbug= '$old_debug';
      

      to a string whose value is actually variable
      e.g 'cos of the pre-installation pattern of p.1.

      Resetting should be done either via save/restore through a session @var, see

      mysql-test/suite/versioning/t/debug.test:34:set global debug_dbug=@old_dbug;
      

      or instead of the memorization pattern a +/-d,keyword increment and decrement style should be used.
      For using the latter without threatening to polute the server error log though we lack
      `commit 0b9400d1f54f4ae9b84decf53352850171880f1e
      19:47:52 Author: Thayumanavar <thayumanavar.x.sachithanantha@oracle.com (thayumanavar.x.sachithanantha@oracle.com)>
      19:47:52 Date: Thu May 2 16:22:57 2013 +0530

        Attachments

          Activity

            People

            Assignee:
            alice Alice Sherepa
            Reporter:
            Elkin Andrei Elkin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: