From fc6711c636a8407ab99d06763f731b6bea7ccb71 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 27 Mar 2024 22:30:29 +0100 Subject: [PATCH] mtr: increase timeouts under ASAN/UBSAN/MSAN not only under valgrind --- mysql-test/include/shutdown_mysqld.inc | 7 ++----- mysql-test/include/slow_environ.inc | 9 +++++++++ mysql-test/include/sync_slave_sql_with_io.inc | 7 ++----- mysql-test/include/sync_with_master_gtid.inc | 7 ++----- mysql-test/include/wait_for_slave_param.inc | 7 ++----- 5 files changed, 17 insertions(+), 20 deletions(-) create mode 100644 mysql-test/include/slow_environ.inc diff --git a/mysql-test/include/shutdown_mysqld.inc b/mysql-test/include/shutdown_mysqld.inc index fc2972560c3..2db4624e4ac 100644 --- a/mysql-test/include/shutdown_mysqld.inc +++ b/mysql-test/include/shutdown_mysqld.inc @@ -31,11 +31,8 @@ if ($rpl_inited) set @@global.log_warnings=0; --enable_query_log ---let $server_shutdown_timeout= 60 -if ($VALGRIND_TEST) -{ - --let $server_shutdown_timeout= 300 -} +--source include/slow_environ.inc +--let $server_shutdown_timeout= 60$_timeout_adjustment if ($shutdown_timeout) { diff --git a/mysql-test/include/slow_environ.inc b/mysql-test/include/slow_environ.inc new file mode 100644 index 00000000000..761147fd288 --- /dev/null +++ b/mysql-test/include/slow_environ.inc @@ -0,0 +1,9 @@ +if (!$slow_environ_check) +{ + let $_timeout_adjustment=; + if (`select $VALGRIND_TEST + count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like '%SAN%'`) + { + let $_timeout_adjustment=0; + } + let $slow_environ_check=1; +} diff --git a/mysql-test/include/sync_slave_sql_with_io.inc b/mysql-test/include/sync_slave_sql_with_io.inc index 9efede9a61f..c16d28edbb9 100644 --- a/mysql-test/include/sync_slave_sql_with_io.inc +++ b/mysql-test/include/sync_slave_sql_with_io.inc @@ -25,11 +25,8 @@ let $_slave_timeout= $slave_timeout; if (!$_slave_timeout) { - let $_slave_timeout= 300; - if ($VALGRIND_TEST) - { - let $_slave_timeout= 1500; - } + source include/slow_environ.inc; + let $_slave_timeout= 300$_timeout_adjustment; } --let $_master_log_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1) diff --git a/mysql-test/include/sync_with_master_gtid.inc b/mysql-test/include/sync_with_master_gtid.inc index 777711b979c..0ca2c90784e 100644 --- a/mysql-test/include/sync_with_master_gtid.inc +++ b/mysql-test/include/sync_with_master_gtid.inc @@ -33,11 +33,8 @@ let $_slave_timeout= $slave_timeout; if (!$_slave_timeout) { - let $_slave_timeout= 120; - if ($VALGRIND_TEST) - { - let $_slave_timeout= 1200; - } + source include/slow_environ.inc; + let $_slave_timeout= 120$_timeout_adjustment; } --let $_result= `SELECT master_gtid_wait('$master_pos', $_slave_timeout)` diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc index ed81c55963f..6802cd41203 100644 --- a/mysql-test/include/wait_for_slave_param.inc +++ b/mysql-test/include/wait_for_slave_param.inc @@ -49,11 +49,8 @@ let $_slave_timeout= $slave_timeout; if (!$_slave_timeout) { - let $_slave_timeout= 300; - if ($VALGRIND_TEST) - { - let $_slave_timeout= 1500; - } + source include/slow_environ.inc; + let $_slave_timeout= 300$_timeout_adjustment; } let $_slave_param_comparison= $slave_param_comparison;