Use tls plugin for old binaries < 5.2.0
This fixes restart tests from old binaries < 5.2.0, which previously were immediately crashing in a TLS codepath. This behavior was not originally ported from the old test harness to the new test harness.
This commit is contained in:
parent
0c8b7d1b37
commit
cfec8bdd61
|
@ -139,6 +139,8 @@ class Config:
|
|||
self.max_errors_args = {'short_name': 'E'}
|
||||
self.old_binaries_path: Path = Path('/app/deploy/global_data/oldBinaries/')
|
||||
self.old_binaries_path_args = {'help': 'Path to the directory containing the old fdb binaries'}
|
||||
self.tls_plugin_path: Path = Path('/app/deploy/runtime/.tls_5_1/FDBLibTLS.so')
|
||||
self.tls_plugin_path_args = {'help': 'Path to the tls plugin used for binaries < 5.2.0'}
|
||||
self.use_valgrind: bool = False
|
||||
self.use_valgrind_args = {'action': 'store_true'}
|
||||
self.buggify = BuggifyOption('random')
|
||||
|
|
|
@ -18,7 +18,7 @@ from functools import total_ordering
|
|||
from pathlib import Path
|
||||
from test_harness.version import Version
|
||||
from test_harness.config import config
|
||||
from typing import List, Pattern, OrderedDict
|
||||
from typing import Dict, List, Pattern, OrderedDict
|
||||
|
||||
from test_harness.summarize import Summary, SummaryTree
|
||||
|
||||
|
@ -309,6 +309,7 @@ class TestRun:
|
|||
self.trace_format: str | None = config.trace_format
|
||||
if Version.of_binary(self.binary) < "6.1.0":
|
||||
self.trace_format = None
|
||||
self.use_tls_plugin = Version.of_binary(self.binary) < "5.2.0"
|
||||
self.temp_path = config.run_dir / str(self.uid)
|
||||
# state for the run
|
||||
self.retryable_error: bool = False
|
||||
|
@ -332,6 +333,7 @@ class TestRun:
|
|||
|
||||
def run(self):
|
||||
command: List[str] = []
|
||||
env: Dict[str, str] = os.environ.copy()
|
||||
valgrind_file: Path | None = None
|
||||
if self.use_valgrind:
|
||||
command.append('valgrind')
|
||||
|
@ -346,6 +348,9 @@ class TestRun:
|
|||
'-s', str(self.random_seed)]
|
||||
if self.trace_format is not None:
|
||||
command += ['--trace_format', self.trace_format]
|
||||
if self.use_tls_plugin:
|
||||
command += ['--tls_plugin', str(config.tls_plugin_path)]
|
||||
env["FDB_TLS_PLUGIN"] = str(config.tls_plugin_path)
|
||||
if Version.of_binary(self.binary) >= '7.1.0':
|
||||
command += ['-fi', 'on' if self.fault_injection_enabled else 'off']
|
||||
if self.restarting:
|
||||
|
@ -361,7 +366,7 @@ class TestRun:
|
|||
resources = ResourceMonitor()
|
||||
resources.start()
|
||||
process = subprocess.Popen(command, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, cwd=self.temp_path,
|
||||
text=True)
|
||||
text=True, env=env)
|
||||
did_kill = False
|
||||
timeout = 20 * config.kill_seconds if self.use_valgrind else config.kill_seconds
|
||||
err_out: str
|
||||
|
|
Loading…
Reference in New Issue