diff --git a/mysql-test/include/no_msan_without_big.inc b/mysql-test/include/no_msan_without_big.inc new file mode 100644 index 00000000000..158b3986768 --- /dev/null +++ b/mysql-test/include/no_msan_without_big.inc @@ -0,0 +1,8 @@ +# Slow with MSAN, but if mtr --big-test specified, then it should complete +if (!$BIG_TEST) +{ + if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`) + { + --skip Can't be run WITH_MSAN unless using --big-test + } +} diff --git a/mysql-test/include/not_msan.inc b/mysql-test/include/not_msan.inc index ca1e2c1d7bd..678139199a2 100644 --- a/mysql-test/include/not_msan.inc +++ b/mysql-test/include/not_msan.inc @@ -1,4 +1,5 @@ -# This file should only be used with tests that are too big or slow for MSAN. +# This file should only be used with tests that are too big or slow for MSAN (even with --big-test). +# Use no_msan_without_big instead unless this really won't complete in a test timeout period. if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`) { diff --git a/mysql-test/include/not_msan_with_debug.inc b/mysql-test/include/not_msan_with_debug.inc new file mode 100644 index 00000000000..155e05991a0 --- /dev/null +++ b/mysql-test/include/not_msan_with_debug.inc @@ -0,0 +1,9 @@ +# This file should only be used with tests that are too big or slow for MSAN with Debug. + +if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`) +{ + if (`select version() like '%debug%'`) + { + --skip Can't be run WITH_MSAN and CMAKE_BUILD_TYPE=Debug + } +} diff --git a/mysql-test/main/alter_table_lock.test b/mysql-test/main/alter_table_lock.test index bd26c1ac7d0..500cc3ced57 100644 --- a/mysql-test/main/alter_table_lock.test +++ b/mysql-test/main/alter_table_lock.test @@ -1,5 +1,3 @@ ---source include/not_msan.inc - --echo # --echo # MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in --echo # Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK) diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test index 4ecdaa4f0fa..6e2dd3b1f16 100644 --- a/mysql-test/main/cte_recursive.test +++ b/mysql-test/main/cte_recursive.test @@ -1,6 +1,6 @@ --source include/default_optimizer_switch.inc # This is too slow on MSAN ---source include/not_msan.inc +--source include/no_msan_without_big.inc --source include/not_valgrind.inc --source include/have_innodb.inc diff --git a/mysql-test/main/join_cache_notasan.cnf b/mysql-test/main/join_cache_notasan.cnf new file mode 100644 index 00000000000..7b2fb3bcb15 --- /dev/null +++ b/mysql-test/main/join_cache_notasan.cnf @@ -0,0 +1,5 @@ +!include include/default_my.cnf + +[ENV] +MSAN_OPTIONS=allocator_may_return_null=1:abort_on_error=1 + diff --git a/mysql-test/main/join_cache_notasan.result b/mysql-test/main/join_cache_notasan.result index 3cec949f5c6..885eece83d6 100644 --- a/mysql-test/main/join_cache_notasan.result +++ b/mysql-test/main/join_cache_notasan.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("MemorySanitizer failed to allocate"); # # MDEV-28217 Incorrect Join Execution When Controlling Join Buffer Size # diff --git a/mysql-test/main/join_cache_notasan.test b/mysql-test/main/join_cache_notasan.test index c2ff670f044..5271d3fae9c 100644 --- a/mysql-test/main/join_cache_notasan.test +++ b/mysql-test/main/join_cache_notasan.test @@ -4,11 +4,13 @@ --source include/have_64bit.inc # Disable asan it asan builds crashes when trying to allocate too much memory --source include/not_asan.inc ---source include/not_msan.inc # Valgrind is useful here, but very slow as lots of memory is allocated --source include/no_valgrind_without_big.inc --source include/have_innodb.inc +# MSAN runs, but ignore its notice. ER_OUTOFMEMORY is expected by tests +call mtr.add_suppression("MemorySanitizer failed to allocate"); + --echo # --echo # MDEV-28217 Incorrect Join Execution When Controlling Join Buffer Size --echo # diff --git a/mysql-test/main/sum_distinct-big.test b/mysql-test/main/sum_distinct-big.test index 8820c191ae9..54fc676740f 100644 --- a/mysql-test/main/sum_distinct-big.test +++ b/mysql-test/main/sum_distinct-big.test @@ -5,7 +5,7 @@ --source include/big_test.inc # Test will take more than one hour with valgrind --source include/not_valgrind.inc ---source include/not_msan.inc +--source include/not_msan_with_debug.inc --source include/have_innodb.inc --source include/have_sequence.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_views-big.test b/mysql-test/suite/funcs_1/t/myisam_views-big.test index 60fe1b8eaba..7199542d3d6 100644 --- a/mysql-test/suite/funcs_1/t/myisam_views-big.test +++ b/mysql-test/suite/funcs_1/t/myisam_views-big.test @@ -4,8 +4,7 @@ # because of a pair of slow Solaris Sparc machines in pb2, # this test is marked as big: --source include/big_test.inc -# This test often times out with MSAN ---source include/not_msan.inc +--source include/not_msan_with_debug.inc # MyISAM tables should be used # diff --git a/mysql-test/suite/innodb_gis/t/rtree_purge.test b/mysql-test/suite/innodb_gis/t/rtree_purge.test index f89f590acf0..4efb7213e28 100644 --- a/mysql-test/suite/innodb_gis/t/rtree_purge.test +++ b/mysql-test/suite/innodb_gis/t/rtree_purge.test @@ -4,8 +4,7 @@ --source include/innodb_page_size.inc --source include/have_sequence.inc --source include/not_valgrind.inc -# This test often times out with MSAN ---source include/not_msan.inc +--source include/no_msan_without_big.inc create table t ( b point not null,d point not null, spatial key (d),spatial key (b) diff --git a/mysql-test/suite/maria/max_length.test b/mysql-test/suite/maria/max_length.test index 02df51b33d7..c6859d5267d 100644 --- a/mysql-test/suite/maria/max_length.test +++ b/mysql-test/suite/maria/max_length.test @@ -6,7 +6,7 @@ --source include/big_test.inc # This test is too slow for valgrind --source include/not_valgrind.inc ---source include/not_msan.inc +--source include/not_msan_with_debug.inc drop table if exists t1,t2; diff --git a/mysql-test/suite/perfschema/t/statement_digest_long_query.test b/mysql-test/suite/perfschema/t/statement_digest_long_query.test index efa33800b58..23ff15c9102 100644 --- a/mysql-test/suite/perfschema/t/statement_digest_long_query.test +++ b/mysql-test/suite/perfschema/t/statement_digest_long_query.test @@ -6,6 +6,7 @@ --source include/have_perfschema.inc # Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled --source include/no_protocol.inc +--source include/not_msan_with_debug.inc # Thread stack overrun on solaris let $have_solaris = `select convert(@@version_compile_os using latin1) LIKE ("solaris%")`; if ($have_solaris)