Merge pull request #23614 from ClickHouse/skip-catboost-msan

Skip CatBoost tests under MSan
This commit is contained in:
alexey-milovidov 2021-04-25 22:03:43 +03:00 committed by GitHub
commit a369b8326b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 7 deletions

View File

@ -1031,13 +1031,18 @@ class ClickHouseInstance:
self.ipv6_address = ipv6_address
self.with_installed_binary = with_installed_binary
def is_built_with_thread_sanitizer(self):
def is_built_with_sanitizer(self, sanitizer_name=''):
build_opts = self.query("SELECT value FROM system.build_options WHERE name = 'CXX_FLAGS'")
return "-fsanitize=thread" in build_opts
return "-fsanitize={}".format(sanitizer_name) in build_opts
def is_built_with_thread_sanitizer(self):
return self.is_built_with_sanitizer('thread')
def is_built_with_address_sanitizer(self):
build_opts = self.query("SELECT value FROM system.build_options WHERE name = 'CXX_FLAGS'")
return "-fsanitize=address" in build_opts
return self.is_built_with_sanitizer('address')
def is_built_with_memory_sanitizer(self):
return self.is_built_with_sanitizer('memory')
# Connects to the instance via clickhouse-client, sends a query (1st argument) and returns the answer
def query(self, sql, stdin=None, timeout=None, settings=None, user=None, password=None, database=None,

View File

@ -42,6 +42,9 @@ def change_config(model_config):
def test(started_cluster):
if node.is_built_with_memory_sanitizer():
pytest.skip("Memory Sanitizer cannot work with third-party shared libraries")
# Set config with the path to the first model.
change_config("model_config.xml")

View File

@ -32,5 +32,8 @@ def started_cluster():
def test(started_cluster):
if node.is_built_with_memory_sanitizer():
pytest.skip("Memory Sanitizer cannot work with third-party shared libraries")
node.query("select modelEvaluate('titanic', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);")

View File

@ -32,6 +32,9 @@ def started_cluster():
cluster.shutdown()
def test_model_reload(started_cluster):
if node.is_built_with_memory_sanitizer():
pytest.skip("Memory Sanitizer cannot work with third-party shared libraries")
node.exec_in_container(["bash", "-c", "rm -f /etc/clickhouse-server/model/model.cbm"])
node.exec_in_container(["bash", "-c", "ln /etc/clickhouse-server/model/conjunction.cbm /etc/clickhouse-server/model/model.cbm"])
node.query("SYSTEM RELOAD MODEL model")
@ -53,6 +56,9 @@ def test_model_reload(started_cluster):
assert result == '1\n1\n1\n0\n'
def test_models_reload(started_cluster):
if node.is_built_with_memory_sanitizer():
pytest.skip("Memory Sanitizer cannot work with third-party shared libraries")
node.exec_in_container(["bash", "-c", "rm -f /etc/clickhouse-server/model/model.cbm"])
node.exec_in_container(["bash", "-c", "ln /etc/clickhouse-server/model/conjunction.cbm /etc/clickhouse-server/model/model.cbm"])
node.query("SYSTEM RELOAD MODELS")
@ -71,4 +77,4 @@ def test_models_reload(started_cluster):
WITH modelEvaluate('model', toFloat64(x), toFloat64(y)) as prediction, exp(prediction) / (1 + exp(prediction)) as probability
SELECT if(probability > 0.5, 1, 0) FROM binary;
""")
assert result == '1\n1\n1\n0\n'
assert result == '1\n1\n1\n0\n'

View File

@ -23,7 +23,7 @@ def started_node():
cluster.shutdown()
def test_send_segfault(started_node, ):
def test_send_segfault(started_node):
if started_node.is_built_with_thread_sanitizer():
pytest.skip("doesn't fit in timeouts for stacktrace generation")