From acefacde5ecae338eb30f343de0e187a9383577c Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Thu, 26 Sep 2024 19:44:55 -0700 Subject: [PATCH] test: apply ubsan suppressions to all redpanda invocations When running `redpanda --version` apply ubsan suppressions like we do when we run redpanda normally. Signed-off-by: Noah Watkins --- tests/rptest/services/redpanda.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/rptest/services/redpanda.py b/tests/rptest/services/redpanda.py index 32d164f1ebc58..5a223ba29afa2 100644 --- a/tests/rptest/services/redpanda.py +++ b/tests/rptest/services/redpanda.py @@ -2553,6 +2553,10 @@ def __init__(self, self._expect_max_controller_records = 1000 + def redpanda_env_preamble(self): + # Pass environment variables via FOO=BAR shell expressions + return " ".join([f"{k}={v}" for (k, v) in self._environment.items()]) + def set_seed_servers(self, node_list): assert len(node_list) > 0 self._seed_servers = node_list @@ -2961,9 +2965,7 @@ def start_redpanda(self, node, extra_cli: list[str] = []): dict(LLVM_PROFILE_FILE= f"\"{RedpandaService.COVERAGE_PROFRAW_CAPTURE}\"")) - # Pass environment variables via FOO=BAR shell expressions - env_preamble = " ".join( - [f"{k}={v}" for (k, v) in self._environment.items()]) + env_preamble = self.redpanda_env_preamble() cmd = ( f"{preamble} {env_preamble} nohup {self.find_binary('redpanda')}" @@ -3879,7 +3881,8 @@ def get_version(self, node): """ Returns the redpanda binary version as a string. """ - version_cmd = f"{self.find_binary('redpanda')} --version" + env_preamble = self.redpanda_env_preamble() + version_cmd = f"{env_preamble} {self.find_binary('redpanda')} --version" VERSION_LINE_RE = re.compile(".*(v\\d+\\.\\d+\\.\\d+).*") # NOTE: not all versions of Redpanda support the --version field, even # though they print out the version.