diff --git a/doc/develop/test/twister.rst b/doc/develop/test/twister.rst index 42f09ef020eee..0add02e925ba7 100644 --- a/doc/develop/test/twister.rst +++ b/doc/develop/test/twister.rst @@ -434,6 +434,20 @@ build_only: (default False) enabled in Zephyr and that the code builds, for example sensor drivers. Such test shall not be used to verify the functionality of the driver. +no_build: (default False) + If true, twister will not run any compilation or build steps. If the test requires + a specific executable file, this file should be built by a different test, or + being prov by any other means. + + A typical use-case for this option is a BabbleSim test suite which builds one or + several executable binary file(s) which can be used by different test cases. This + option allows to avoid unnecessary abd time consuming recompilation, by using it + in conjunction with ``build_only`` option, where one or more tests build required + binaries, and all other tests are using their output. + + Note: this option has only been tested with BabbleSim harness, which ensures that + ``build_only`` tests are executed first. + build_on_all: (default False) If true, attempt to build test scenario on all available platforms. This is mostly used in CI for increased coverage. Do not use this flag in new tests. @@ -970,21 +984,68 @@ robot_option: (default empty) Bsim ==== -Harness ``bsim`` is implemented in limited way - it helps only to copy the -final executable (``zephyr.exe``) from build directory to BabbleSim's -``bin`` directory (``${BSIM_OUT_PATH}/bin``). +Harness ``bsim`` is allows to build and run BabbleSim test. If used with ``build_only`` +option, it will only copy the final executable (``zephyr.exe``) from build directory +to BabbleSim's ``bin`` directory (``${BSIM_OUT_PATH}/bin``), which is useful to allow +BabbleSim's tests to directly run after. -This action is useful to allow BabbleSim's tests to directly run after. -By default, the executable file name is (with dots and slashes -replaced by underscores): ``bs___``. -This name can be overridden with the ``bsim_exe_name`` option in -``harness_config`` section. +By default, the executable file name is (with dots and slashes replaced by underscores): +``bs___``. This name can be overridden +with the ``bsim_exe_name`` option in ``harness_config`` section. -bsim_exe_name: +bsim_exe_name: (optional) If provided, the executable filename when copying to BabbleSim's bin directory, will be ``bs__`` instead of the default based on the test path and scenario name. +bsim_verbosity: (optional) + If provided, sets the verbosity log level for BabbleSim's simulated devices + and Phy layer. Default setting is 2. + +bsim_sim_length: (optional) + Simulated time in microseconds that BabbleSim's simulation is allowed to run. + Default value is 60e6 (60 seconds). Note: simulated time isn't equal real-time. + +bsim_devices: (optional) + Specifies a number of simulated BabbleSim devices, with test_id value (mandatory), + executable binary file name and list of options that are passed to simulation. If + executable file name is not specified, value of ``bsim_exe_name`` is used. + + Example with two simulated devices using common executable and options: + + .. code-block:: yaml + + harness_config: + bsim_exe_name: test_exe + bsim_devices: + - test_id: dut + - test_id: tester + bsim_options: + - -RealEncryption=0 + + Example with two simulated device using different binary files and options: + + .. code-block:: yaml + + harness_config: + sim_devices: + - test_id: dut + exe: dut_exe + options: + - -RealEncryption=0 + - test_id: tester + exe: tester_exe + options: + - -RealEncryption=1 + +bsim_options: (optional) + List of common command-line options passed to all simulated BabbleSim devices + in the ``bsim_devices`` field. Full list of options could be a combination of + ``bsim_options`` and invidiual options for each device from ``bsim_devices``. + +bsim_phy_options: (optional) + List of command-line options passed for to BabbleSim's simulat Phy. + Shell ===== diff --git a/scripts/pylib/twister/twisterlib/config_parser.py b/scripts/pylib/twister/twisterlib/config_parser.py index 738fa8285b406..36e95daad9e63 100644 --- a/scripts/pylib/twister/twisterlib/config_parser.py +++ b/scripts/pylib/twister/twisterlib/config_parser.py @@ -57,6 +57,7 @@ class TwisterConfigParser: "extra_dtc_overlay_files": {"type": "list", "default": []}, "required_snippets": {"type": "list"}, "build_only": {"type": "bool", "default": False}, + "no_build": {"type": "bool", "default": False}, "build_on_all": {"type": "bool", "default": False}, "skip": {"type": "bool", "default": False}, "slow": {"type": "bool", "default": False}, @@ -181,7 +182,7 @@ def get_scenario(self, name: str) -> dict[str, Any]: if k == "filter": d[k] = f"({d[k]}) and ({v})" elif k not in ("extra_conf_files", "extra_overlay_confs", - "extra_dtc_overlay_files"): + "extra_dtc_overlay_files", "harness_config"): if isinstance(d[k], str) and isinstance(v, list): d[k] = [d[k]] + v elif isinstance(d[k], list) and isinstance(v, str): @@ -203,6 +204,25 @@ def get_scenario(self, name: str) -> dict[str, Any]: else: d[k] = v + harness_config = copy.deepcopy(self.common.get("harness_config", {})) + if "harness_config" in self.scenarios[name]: + if harness_config: + for k, v in self.scenarios[name]["harness_config"].items(): + if k in harness_config: + if isinstance(harness_config[k], list): + if d["harness"] == "bsim": + harness_config[k] += v if isinstance(v, list) else [v] + else: + harness_config[k] = v if isinstance(v, list) else [v] + else: + harness_config[k] = v + else: + harness_config[k] = v + else: + harness_config = self.scenarios[name]["harness_config"] + + d["harness_config"] = harness_config + # Compile conf files in to a single list. The order to apply them is: # (1) CONF_FILEs extracted from common['extra_args'] # (2) common['extra_conf_files'] diff --git a/scripts/pylib/twister/twisterlib/harness.py b/scripts/pylib/twister/twisterlib/harness.py index 58fbf5e5dcd56..98de77539c5ab 100644 --- a/scripts/pylib/twister/twisterlib/harness.py +++ b/scripts/pylib/twister/twisterlib/harness.py @@ -1,6 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 + from __future__ import annotations +import glob import json import logging import os @@ -41,6 +43,8 @@ class Harness: RUN_FAILED = "PROJECT EXECUTION FAILED" run_id_pattern = r"RunID: (?P.*)" + cacheable = False + def __init__(self): self._status = TwisterStatus.NONE self.reason = None @@ -964,12 +968,77 @@ class Ztest(Test): class Bsim(Harness): + DEFAULT_VERBOSITY = 2 + DEFAULT_SIM_LENGTH = 60e6 + + BSIM_READY_TIMEOUT_S = 60 + + cacheable = True + + def __init__(self): + super().__init__() + self._bsim_out_path = os.getenv('BSIM_OUT_PATH', '') + if self._bsim_out_path: + self._bsim_out_path = os.path.join(self._bsim_out_path, 'bin') + self._exe_paths = {} + self._tc_output = [] + self._start_time = 0 + + def _set_start_time(self): + self._start_time = time.time() + + def _get_exe_path(self, name=None): + return self._exe_paths[name] + + def configure(self, instance): + def replacer(exe_name): + return exe_name.replace(os.path.sep, '_').replace('.', '_').replace('@', '_') + + super().configure(instance) + + if not self._bsim_out_path: + raise Exception('Cannot copy bsim exe - BSIM_OUT_PATH not provided.') + + exe_names = {} + cfg = self.instance.testsuite.harness_config + + build_exe_name = cfg.get('bsim_exe_name', None) + if build_exe_name: + exe_names[None] = replacer(f'bs_{self.instance.platform.name}_{build_exe_name}') + else: + for exe_name in [dev['exe'] for dev in cfg.get('bsim_devices', [])]: + exe_names[exe_name] = replacer(f'bs_{self.instance.platform.name}_{exe_name}') + + if not exe_names: + exe_names[None] = f'bs_{replacer(self.instance.name)}' + + self._exe_paths = \ + {name_id: os.path.join(self._bsim_out_path, exe) for name_id, exe in exe_names.items()} + + def clean_exes(self): + self._set_start_time() + + try: + for exe_path in self._exe_paths.values(): + if os.path.exists(exe_path): + os.remove(exe_path) + except Exception as e: + logger.warning(f'Failed to clean up bsim exes: {e}') + + def wait_bsim_ready(self): + start_time = time.time() + while time.time() - start_time < Bsim.BSIM_READY_TIMEOUT_S: + if all([os.path.exists(f_path) for f_path in self._exe_paths.values()]): + return True + time.sleep(0.1) + + return False + def build(self): """ Copying the application executable to BabbleSim's bin directory enables running multidevice bsim tests after twister has built them. """ - if self.instance is None: return @@ -978,23 +1047,118 @@ def build(self): logger.warning('Cannot copy bsim exe - cannot find original executable.') return - bsim_out_path: str = os.getenv('BSIM_OUT_PATH', '') - if not bsim_out_path: - logger.warning('Cannot copy bsim exe - BSIM_OUT_PATH not provided.') - return + try: + new_exe_path = self._get_exe_path() + logger.debug(f'Copying executable from {original_exe_path} to {new_exe_path}') + shutil.copy(original_exe_path, new_exe_path) + self.status = TwisterStatus.PASS + except Exception as e: + logger.error(f'Failed to copy bsim exe: {e}') + self.status = TwisterStatus.ERROR + finally: + self.instance.execution_time = time.time() - self._start_time - new_exe_name: str = self.instance.testsuite.harness_config.get('bsim_exe_name', '') - if new_exe_name: - new_exe_name = f'bs_{self.instance.platform.name}_{new_exe_name}' + def _run_cmd(self, cmd, timeout): + logger.debug(' '.join(cmd)) + with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + cwd=self._bsim_out_path) as proc: + try: + reader_t = threading.Thread(target=self._output_reader, args=(proc,), daemon=True) + reader_t.start() + reader_t.join(timeout) + if reader_t.is_alive(): + terminate_process(proc) + logger.warning('Timeout has occurred. Can be extended in testspec file. ' + f'Currently set to {timeout} seconds.') + self.status = TwisterStatus.ERROR + proc.wait(timeout) + except subprocess.TimeoutExpired: + self.status = TwisterStatus.ERROR + proc.kill() + + if proc.returncode != 0: + self.status = TwisterStatus.ERROR + self.instance.reason = f'Bsim error - return code {proc.returncode}' else: - new_exe_name = self.instance.name - new_exe_name = f'bs_{new_exe_name}' + self.status = TwisterStatus.PASS if self.status == TwisterStatus.NONE else self.status + + def _output_reader(self, proc): + while proc.stdout.readable() and proc.poll() is None: + line = proc.stdout.readline().decode().strip() + if not line: + continue + logger.debug(line) + self._tc_output.append(line) + proc.communicate() + + def _generate_commands(self): + bsim_phy_path = os.path.join(self._bsim_out_path, 'bs_2G4_phy_v1') + suite_id = f'-s={self.instance.name.split(os.path.sep)[-1].replace(".", "_")}' + + cfg = self.instance.testsuite.harness_config + verbosity = f'-v={cfg.get("bsim_verbosity", self.DEFAULT_VERBOSITY)}' + sim_length = f'-sim_length={cfg.get("bsim_sim_length", self.DEFAULT_SIM_LENGTH)}' + extra_args = cfg.get('bsim_options', []) + phy_extra_args = cfg.get('bsim_phy_options', []) + devices = cfg.get('bsim_devices', []) + if not devices: + logger.error(f'No devices specified for bsim test {self.instance.name}') + self.status = TwisterStatus.ERROR + return [] + + cmds = [] + for i, dev in enumerate(devices): + exe = self._get_exe_path(dev.get('exe', None)) + cmds.append([exe, verbosity, suite_id, f'-d={i}', f'-testid={dev["test_id"]}'] + + extra_args + dev.get('options', [])) + + cmds.append([bsim_phy_path, verbosity, suite_id, f'-D={len(devices)}', sim_length] + + phy_extra_args) + + return cmds - new_exe_name = new_exe_name.replace(os.path.sep, '_').replace('.', '_').replace('@', '_') + def _clean_up_files(self): + # Clean-up any log files that the test may have generated + files = glob.glob(os.path.join(self._bsim_out_path, '*.log')) + recent_files = [f for f in files if os.path.getctime(f) > self._start_time] + for file in recent_files: + try: + os.remove(file) + except Exception as e: + logger.warning(f'Failed to clean up bsim log file {file}: {e}') + + def bsim_run(self, timeout): + try: + self._set_start_time() + + threads = [] + for cmd in self._generate_commands(): + t = threading.Thread(target=lambda c=cmd: self._run_cmd(c, timeout)) + threads.append(t) + t.start() + + for t in threads: + t.join(timeout=timeout) + except Exception as e: + logger.error(f'BSIM test failed: {e}') + self.status = TwisterStatus.ERROR + finally: + self._update_test_status() + self._clean_up_files() + + def _update_test_status(self): + self.instance.execution_time += time.time() - self._start_time + if not self.instance.testcases: + self.instance.init_cases() + + # currently there is always one testcase per bsim suite + self.instance.testcases[0].status = self.status if self.status != TwisterStatus.NONE else \ + TwisterStatus.FAIL + self.instance.status = self.instance.testcases[0].status + if self.instance.status in [TwisterStatus.ERROR, TwisterStatus.FAIL]: + self.instance.reason = self.instance.reason or 'Bsim test failed' + self.instance.testcases[0].output = '\n'.join(self._tc_output) - new_exe_path: str = os.path.join(bsim_out_path, 'bin', new_exe_name) - logger.debug(f'Copying executable from {original_exe_path} to {new_exe_path}') - shutil.copy(original_exe_path, new_exe_path) class Ctest(Harness): def configure(self, instance: TestInstance): @@ -1135,15 +1299,41 @@ def _parse_report_file(self, report): class HarnessImporter: + cache = {} + cache_lock = threading.Lock() + @staticmethod - def get_harness(harness_name): + def get_harness(instance: TestInstance): + harness_class = HarnessImporter._get_harness_class(instance.testsuite.harness) + if not harness_class: + return None + + harness = None + with HarnessImporter.cache_lock: + if harness_class.cacheable and instance.name in HarnessImporter.cache: + harness = HarnessImporter.cache[instance.name] + else: + harness = harness_class() + if harness_class.cacheable: + harness.configure(instance) + HarnessImporter.cache[instance.name] = harness + + return harness + + @staticmethod + def _get_harness_class(harness_name: str): thismodule = sys.modules[__name__] try: if harness_name: - harness_class = getattr(thismodule, harness_name) + harness_class = getattr(thismodule, harness_name.capitalize()) else: harness_class = thismodule.Test - return harness_class() + return harness_class except AttributeError as e: logger.debug(f"harness {harness_name} not implemented: {e}") return None + + @staticmethod + def get_harness_by_name(harness_name: str): + harness_class = HarnessImporter._get_harness_class(harness_name) + return harness_class() if harness_class else None diff --git a/scripts/pylib/twister/twisterlib/runner.py b/scripts/pylib/twister/twisterlib/runner.py index 5b02e3374d8a2..65ed48e1aea94 100644 --- a/scripts/pylib/twister/twisterlib/runner.py +++ b/scripts/pylib/twister/twisterlib/runner.py @@ -45,7 +45,7 @@ from domains import Domains from twisterlib.coverage import run_coverage_instance from twisterlib.environment import TwisterEnv -from twisterlib.harness import Ctest, HarnessImporter, Pytest +from twisterlib.harness import Bsim, Ctest, HarnessImporter, Pytest from twisterlib.log_helper import log_command from twisterlib.platform import Platform from twisterlib.testinstance import TestInstance @@ -630,6 +630,10 @@ def run_build(self, args=None): return ret + @property + def is_bsim_test(self): + return self.instance.testsuite.harness == 'bsim' + def run_cmake(self, args="", filter_stages=None): if filter_stages is None: filter_stages = [] @@ -656,7 +660,7 @@ def run_cmake(self, args="", filter_stages=None): f'-DPython3_EXECUTABLE={pathlib.Path(sys.executable).as_posix()}' ] - if self.instance.testsuite.harness == 'bsim': + if self.is_bsim_test: cmake_args.extend([ '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DCONFIG_ASSERT=y', @@ -1125,11 +1129,18 @@ def process(self, pipeline, done, message, lock, results): # Run the generated binary using one of the supported handlers elif op == "run": - try: + def run(): logger.debug(f"run test: {self.instance.name}") self.run() logger.debug(f"run status: {self.instance.name} {self.instance.status}") + try: + if self.is_bsim_test: + with lock: + run() + else: + run() + # to make it work with pickle self.instance.handler.thread = None self.instance.handler.duts = None @@ -1700,6 +1711,9 @@ def cmake_assemble_args(extra_args, handler, extra_conf_files, extra_overlay_con return args_expanded def cmake(self, filter_stages=None): + if self.is_bsim_test: + HarnessImporter.get_harness(self.instance).clean_exes() + if filter_stages is None: filter_stages = [] args = [] @@ -1729,10 +1743,10 @@ def cmake(self, filter_stages=None): self.options.extra_args, # CMake extra args self.instance.build_dir, ) - return self.run_cmake(args,filter_stages) + return self.run_cmake(args, filter_stages) def build(self): - harness = HarnessImporter.get_harness(self.instance.testsuite.harness.capitalize()) + harness = HarnessImporter.get_harness(self.instance) build_result = self.run_build(['--build', self.build_dir]) try: if harness: @@ -1765,7 +1779,7 @@ def run(self): if self.options.extra_test_args and instance.platform.arch == "posix": instance.handler.extra_test_args = self.options.extra_test_args - harness = HarnessImporter.get_harness(instance.testsuite.harness.capitalize()) + harness = HarnessImporter.get_harness(instance) try: harness.configure(instance) except ConfigurationError as error: @@ -1778,6 +1792,13 @@ def run(self): harness.pytest_run(instance.handler.get_test_timeout()) elif isinstance(harness, Ctest): harness.ctest_run(instance.handler.get_test_timeout()) + elif isinstance(harness, Bsim): + if harness.wait_bsim_ready(): + harness.bsim_run(instance.handler.get_test_timeout()) + else: + instance.status = TwisterStatus.ERROR + instance.reason = "BSIM not ready" + logger.error(instance.reason) else: instance.handler.handle(harness) @@ -1937,6 +1958,7 @@ def add_tasks_to_queue( test_only=False, retry_build_errors=False ): + task_list = [] for instance in self.instances.values(): if build_only: instance.run = False @@ -1971,17 +1993,23 @@ def add_tasks_to_queue( expr_parser.reserved.keys() ) - if test_only and instance.run: - pipeline.put({"op": "run", "test": instance}) + if (test_only and instance.run) or\ + (instance.testsuite.no_build and instance.testsuite.harness == 'bsim'): + task_list.append({"op": "run", "test": instance}) elif instance.filter_stages and "full" not in instance.filter_stages: - pipeline.put({"op": "filter", "test": instance}) + task_list.append({"op": "filter", "test": instance}) else: cache_file = os.path.join(instance.build_dir, "CMakeCache.txt") if os.path.exists(cache_file) and self.env.options.aggressive_no_clean: - pipeline.put({"op": "build", "test": instance}) + task_list.append({"op": "build", "test": instance}) else: - pipeline.put({"op": "cmake", "test": instance}) + task_list.append({"op": "cmake", "test": instance}) + + if all([inst.testsuite.harness == 'bsim' for inst in self.instances.values()]): + task_list.sort(key=lambda t: t['op'] == 'cmake') + for task in task_list: + pipeline.put(task) def pipeline_mgr(self, pipeline, done_queue, lock, results): try: diff --git a/scripts/pylib/twister/twisterlib/testinstance.py b/scripts/pylib/twister/twisterlib/testinstance.py index 4822146d93ca1..7b1373fa0641e 100644 --- a/scripts/pylib/twister/twisterlib/testinstance.py +++ b/scripts/pylib/twister/twisterlib/testinstance.py @@ -226,7 +226,8 @@ def testsuite_runnable(testsuite, fixtures): 'gtest', 'robot', 'ctest', - 'shell' + 'shell', + 'bsim' ]: can_run = True # if we have a fixture that is also being supplied on the diff --git a/scripts/schemas/twister/testsuite-schema.yaml b/scripts/schemas/twister/testsuite-schema.yaml index 55bfbcb7b9cce..7554d2073f7f4 100644 --- a/scripts/schemas/twister/testsuite-schema.yaml +++ b/scripts/schemas/twister/testsuite-schema.yaml @@ -38,6 +38,9 @@ schema;scenario-schema: "build_only": type: bool required: false + "no_build": + type: bool + required: false "build_on_all": type: bool required: false @@ -180,6 +183,39 @@ schema;scenario-schema: "bsim_exe_name": type: str required: false + "bsim_verbosity": + type: int + required: false + "bsim_sim_length": + type: float + required: false + "bsim_devices": + type: seq + required: false + sequence: + - type: map + mapping: + "test_id": + type: str + required: true + "exe": + type: str + required: false + "options": + type: seq + required: false + sequence: + - type: str + "bsim_options": + type: seq + required: false + sequence: + - type: str + "bsim_phy_options": + type: seq + required: false + sequence: + - type: str "min_ram": type: int required: false diff --git a/scripts/tests/twister/test_harness.py b/scripts/tests/twister/test_harness.py index bc529932eefbb..797823017daeb 100644 --- a/scripts/tests/twister/test_harness.py +++ b/scripts/tests/twister/test_harness.py @@ -670,7 +670,7 @@ def test_get_harness(name): harness_name = name # Act - harness_class = harnessimporter.get_harness(harness_name) + harness_class = harnessimporter.get_harness_by_name(harness_name) # Assert assert isinstance(harness_class, Test) @@ -1211,6 +1211,8 @@ def test_gtest_repeated_run(gtest): def test_bsim_build(monkeypatch, tmp_path): + monkeypatch.setenv("BSIM_OUT_PATH", str(tmp_path)) + mocked_instance = mock.Mock() build_dir = tmp_path / "build_dir" os.makedirs(build_dir) @@ -1219,9 +1221,8 @@ def test_bsim_build(monkeypatch, tmp_path): mocked_instance.testsuite.harness_config = {} harness = Bsim() - harness.instance = mocked_instance + harness.configure(mocked_instance) - monkeypatch.setenv("BSIM_OUT_PATH", str(tmp_path)) os.makedirs(os.path.join(tmp_path, "bin"), exist_ok=True) zephyr_exe_path = os.path.join(build_dir, "zephyr", "zephyr.exe") os.makedirs(os.path.dirname(zephyr_exe_path), exist_ok=True) diff --git a/scripts/tests/twister/test_runner.py b/scripts/tests/twister/test_runner.py index 1bc4774bc41e5..8c3587c127de6 100644 --- a/scripts/tests/twister/test_runner.py +++ b/scripts/tests/twister/test_runner.py @@ -2324,8 +2324,8 @@ def test_projectbuilder_run( pytest_mock = mock.Mock(spec=Pytest) harness_mock = mock.Mock() - def mock_harness(name): - if name == 'Pytest': + def mock_harness(inst): + if instance_mock.testsuite.harness == 'pytest': return pytest_mock else: return harness_mock diff --git a/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh b/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh index bf049c331b2c6..dcb20010a1bd4 100755 --- a/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh +++ b/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh @@ -13,6 +13,5 @@ export BOARD="${BOARD:-nrf5340bsim/nrf5340/cpunet}" source ${ZEPHYR_BASE}/tests/bsim/sh_common.source ${ZEPHYR_BASE}/tests/bsim/bluetooth/ll/compile.sh -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/compile.sh wait_for_background_jobs diff --git a/tests/bsim/bluetooth/compile.sh b/tests/bsim/bluetooth/compile.sh index 76525a816135d..3648c8e332478 100755 --- a/tests/bsim/bluetooth/compile.sh +++ b/tests/bsim/bluetooth/compile.sh @@ -17,7 +17,6 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source # the rest to save a couple of seconds. run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/audio/compile.sh ${ZEPHYR_BASE}/tests/bsim/bluetooth/audio_samples/compile.sh -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/compile.sh ${ZEPHYR_BASE}/tests/bsim/bluetooth/ll/compile.sh ${ZEPHYR_BASE}/tests/bsim/bluetooth/mesh/compile.sh ${ZEPHYR_BASE}/tests/bsim/bluetooth/samples/compile.sh diff --git a/tests/bsim/bluetooth/host/adv/chain/testcase.yaml b/tests/bsim/bluetooth/host/adv/chain/testcase.yaml index 8f7e9361fa2b3..f4c1d518b23ed 100644 --- a/tests/bsim/bluetooth/host/adv/chain/testcase.yaml +++ b/tests/bsim/bluetooth/host/adv/chain/testcase.yaml @@ -1,11 +1,16 @@ tests: bluetooth.host.adv.chain: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet harness: bsim + timeout: 30 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_chain_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: adv + - test_id: scan diff --git a/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh b/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh deleted file mode 100755 index 045b1eba64903..0000000000000 --- a/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2018 Oticon A/S -# SPDX-License-Identifier: Apache-2.0 - -# Validate Extended Advertising AD Data fragment operation, PDU chaining and -# Extended Scanning of chain PDUs -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="adv_chain" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_chain_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=adv - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_chain_prj_conf\ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=scan - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=10e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh deleted file mode 100755 index 4bde3f3f74053..0000000000000 --- a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="$(guess_test_long_name)" -verbosity_level=2 -test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -data_set=1 - -Execute ./"$test_exe" \ - -v=${verbosity_level} -s="${simulation_id}_${data_set}" -d=0 -testid=central \ - -RealEncryption=1 -argstest data-set="${data_set}" - -Execute ./"$test_exe" \ - -v=${verbosity_level} -s="${simulation_id}_${data_set}" -d=1 -testid=peripheral \ - -RealEncryption=1 -argstest data-set="${data_set}" - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}_${data_set}" \ - -D=2 -sim_length=20e6 $@ - -wait_for_background_jobs - -data_set=2 - -Execute ./"$test_exe" \ - -v=${verbosity_level} -s="${simulation_id}_${data_set}" -d=0 -testid=central \ - -RealEncryption=1 -argstest data-set="${data_set}" - -Execute ./"$test_exe" \ - -v=${verbosity_level} -s="${simulation_id}_${data_set}" -d=1 -testid=peripheral \ - -RealEncryption=1 -argstest data-set="${data_set}" - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}_${data_set}" \ - -D=2 -sim_length=20e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml index b4f5feb521bfd..0ae7816d43ae0 100644 --- a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml +++ b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml @@ -1,10 +1,43 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_encrypted_css_sample_data_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 20e6 + bsim_options: + - -RealEncryption=1 + tests: - bluetooth.host.adv.encrypted.css_sample_data: + bluetooth.host.adv.encrypted.build_css_sample_data: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - harness: bsim + + bluetooth.host.adv.encrypted.css_sample_data_1: + no_build: true harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_adv_encrypted_css_sample_data_prj_conf + bsim_devices: + - test_id: central + options: + - -argstest + - data-set=1 + - test_id: peripheral + options: + - -argstest + - data-set=1 + + bluetooth.host.adv.encrypted.css_sample_data_2: + no_build: true + harness_config: + bsim_devices: + - test_id: central + options: + - -argstest + - data-set=2 + - test_id: peripheral + options: + - -argstest + - data-set=2 diff --git a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh deleted file mode 100755 index adbe2b19b781d..0000000000000 --- a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="ead_sample" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_encrypted_ead_sample_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_encrypted_ead_sample_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml index ebb55116b7d63..33ae7e687b6e5 100644 --- a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml +++ b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.adv.encrypted.ead_sample: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_encrypted_ead_sample_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=0 + bsim_devices: + - test_id: central + - test_id: peripheral diff --git a/tests/bsim/bluetooth/host/adv/extended/testcase.yaml b/tests/bsim/bluetooth/host/adv/extended/testcase.yaml index 0c433197a7711..4e205c487fb7a 100644 --- a/tests/bsim/bluetooth/host/adv/extended/testcase.yaml +++ b/tests/bsim/bluetooth/host/adv/extended/testcase.yaml @@ -1,20 +1,55 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_options: + - -RealEncryption=0 tests: - bluetooth.host.adv.extended.advertiser: + bluetooth.host.adv.extended.build_advertiser: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf extra_args: CONF_FILE=prj_advertiser.conf - bluetooth.host.adv.extended.scanner: + + bluetooth.host.adv.extended.build_scanner: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf extra_args: CONF_FILE=prj_scanner.conf + + bluetooth.host.adv.extended.ext_adv: + no_build: true + harness_config: + bsim_devices: + - test_id: ext_adv_advertiser + exe: tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf + - test_id: ext_adv_scanner + exe: tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf + + bluetooth.host.adv.extended.ext_adv_conn: + no_build: true + harness_config: + bsim_devices: + - test_id: ext_adv_conn_advertiser + exe: tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf + - test_id: ext_adv_conn_scanner + exe: tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf + + bluetooth.host.adv.extended.ext_adv_conn_x5: + no_build: true + harness_config: + bsim_devices: + - test_id: ext_adv_conn_advertiser_x5 + exe: tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf + - test_id: ext_adv_conn_scanner_x5 + exe: tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf diff --git a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh deleted file mode 100755 index 268cbbabb8a73..0000000000000 --- a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Croxel, Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Extended advertising test: -# -# - Broadcasting Only: a Bluetooth LE broadcaster advertises with extended -# advertising, and a scanner scans the extended advertisement packets. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="ext_adv" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=ext_adv_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=ext_adv_scanner -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=10e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh deleted file mode 100755 index 50a56853be6b4..0000000000000 --- a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Croxel, Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Extended advertising test: -# -# - Connectable: In addition to broadcasting advertisements, it is connectable -# and restarts advertisements once disconnected. The scanner/central scans -# for the packets and establishes the connection, to then disconnect -# shortly-after. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="ext_adv_conn" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=ext_adv_conn_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=ext_adv_conn_scanner -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=10e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh deleted file mode 100755 index c5f3b3d10c2cf..0000000000000 --- a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Croxel, Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Extended advertising test: -# -# - Connectable X5: In addition to broadcasting advertisements, it is connectable -# and restarts advertisements once disconnected. The scanner/central scans -# for the packets and establishes the connection, to then disconnect -# shortly-after. This is repeated over 5 times. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="ext_adv_conn_x5" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=ext_adv_conn_advertiser_x5 -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=ext_adv_conn_scanner_x5 -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=10e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh b/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh deleted file mode 100755 index ad78f49e54e1e..0000000000000 --- a/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" - -simulation_id=${test_name} - -verbosity_level=2 - -SIM_LEN_US=$((2 * 1000 * 1000)) - -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=advertiser -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69 -testid=scanner - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml b/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml index 7b3735da2c387..7e96f66e54b27 100644 --- a/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml +++ b/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml @@ -1,10 +1,15 @@ tests: bluetooth.host.adv.long_ad: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_long_ad_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 2e6 + bsim_devices: + - test_id: advertiser + - test_id: scanner diff --git a/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml b/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml index 901c5f930cc63..a43a104df443a 100644 --- a/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml +++ b/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml @@ -1,23 +1,87 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 15e6 + bsim_options: + - -RealEncryption=0 tests: - bluetooth.host.adv.periodic: + bluetooth.host.adv.periodic.build: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_periodic_prj_conf - bluetooth.host.adv.periodic.coded: + + bluetooth.host.adv.periodic.build_coded: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf extra_args: EXTRA_CONF_FILE=prj_coded.conf - bluetooth.host.adv.periodic.long_data: + + bluetooth.host.adv.periodic.build_long_data: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf extra_args: EXTRA_CONF_FILE=prj_long_data.conf + + bluetooth.host.adv.periodic.per_adv: + no_build: true + harness_config: + bsim_devices: + - test_id: per_adv_advertiser + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + - test_id: per_adv_sync + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + + bluetooth.host.adv.periodic.per_adv_conn: + no_build: true + harness_config: + bsim_devices: + - test_id: per_adv_conn_advertiser + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + - test_id: per_adv_conn_sync + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + + bluetooth.host.adv.periodic.per_adv_long_data: + no_build: true + harness_config: + bsim_devices: + - test_id: per_adv_long_data_advertiser + exe: tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf + - test_id: per_adv_long_data_sync + exe: tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf + + bluetooth.host.adv.periodic.per_adv_conn_privacy: + no_build: true + harness_config: + bsim_devices: + - test_id: per_adv_conn_privacy_advertiser + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + - test_id: per_adv_conn_privacy_sync + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + + bluetooth.host.adv.periodic.per_adv_not_scanning: + no_build: true + harness_config: + bsim_devices: + - test_id: per_adv_advertiser + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + - test_id: per_adv_sync_app_not_scanning + exe: tests_bsim_bluetooth_host_adv_periodic_prj_conf + + bluetooth.host.adv.periodic.per_adv_app_not_scanning_coded: + no_build: true + harness_config: + bsim_devices: + - test_id: per_adv_advertiser_coded_phy + exe: tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf + - test_id: per_adv_sync_app_not_scanning + exe: tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh deleted file mode 100755 index a27b9fedf4ee4..0000000000000 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Basic periodic advertising sync test: an advertiser advertises with periodic -# advertising, and a scanner scans for and syncs to the periodic advertising. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="per_adv" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=per_adv_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=per_adv_sync -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=15e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh deleted file mode 100755 index 33c61af5fb9c2..0000000000000 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Periodic advertising sync test where the host starts scanning -# automatically because the application didn't start it. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="per_adv_not_scanning" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=per_adv_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=per_adv_sync_app_not_scanning -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=15e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh deleted file mode 100755 index c64dbc4d20bc3..0000000000000 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Periodic advertising sync test where the host starts scanning -# automatically because the application didn't start it. -# The advertiser is using Coded PHY as primary PHY. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="per_adv_app_not_scanning_coded" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=per_adv_advertiser_coded_phy -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=per_adv_sync_app_not_scanning -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=15e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh deleted file mode 100755 index dce1400647f23..0000000000000 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Basic periodic advertising sync test: an advertiser advertises with periodic -# advertising, and a scanner scans for and syncs to the periodic advertising. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="per_adv_conn" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=per_adv_conn_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=per_adv_conn_sync -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=15e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh deleted file mode 100755 index 018887a2255c3..0000000000000 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Basic periodic advertising sync test: an advertiser advertises with periodic -# advertising, and a scanner scans for and syncs to the periodic advertising. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="per_adv_conn_privacy" -verbosity_level=2 -EXECUTE_TIMEOUT=60 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=per_adv_conn_privacy_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=per_adv_conn_privacy_sync -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=15e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh deleted file mode 100755 index 48c0934fb88dc..0000000000000 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Basic periodic advertising sync test: an advertiser advertises with periodic -# advertising, and a scanner scans for and syncs to the periodic advertising. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="per_adv_long_data" -verbosity_level=2 -EXECUTE_TIMEOUT=60 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ - -testid=per_adv_long_data_advertiser -rs=23 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \ - -testid=per_adv_long_data_sync -rs=6 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=15e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt/testcase.yaml b/tests/bsim/bluetooth/host/att/eatt/testcase.yaml index db8476734e1a1..00a9bec68d3e0 100644 --- a/tests/bsim/bluetooth/host/att/eatt/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/eatt/testcase.yaml @@ -1,27 +1,70 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 120 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 tests: - bluetooth.host.att.eatt.autoconnect: + bluetooth.host.att.eatt.build_autoconnect: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf extra_args: EXTRA_CONF_FILE=prj_autoconnect.conf + + bluetooth.host.att.eatt.build_lowres: + build_only: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_lowres_conf + extra_args: + EXTRA_CONF_FILE=prj_lowres.conf + + bluetooth.host.att.eatt.autoconnect: + no_build: true + harness_config: + bsim_devices: + - test_id: central_autoconnect + exe: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf + - test_id: peripheral_autoconnect + exe: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf + + bluetooth.host.att.eatt.reconfigure: + no_build: true + harness_config: + bsim_devices: + - test_id: central_reconfigure + exe: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf + - test_id: peripheral_reconfigure + exe: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf + bluetooth.host.adt.eatt.collision: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_collision_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bluetooth.host.att.eatt.lowres: + no_build: true harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_lowres_conf - extra_args: - EXTRA_CONF_FILE=prj_lowres.conf + bsim_devices: + - test_id: central_lowres + exe: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf + - test_id: peripheral_lowres + exe: tests_bsim_bluetooth_host_att_eatt_prj_lowres_conf + bluetooth.host.att.eatt.multiple_conn: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_multiple_conn_conf + bsim_devices: + - test_id: central + - test_id: peripheral extra_args: EXTRA_CONF_FILE=prj_multiple_conn.conf diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh deleted file mode 100755 index 47fc5f0e2a0e2..0000000000000 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="connection" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_autoconnect -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_autoconnect -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh deleted file mode 100755 index 010ac1600cbdd..0000000000000 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="collision" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_collision_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_collision_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh deleted file mode 100755 index b12d045edd9ab..0000000000000 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="lowres" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_lowres -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_lowres_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_lowres -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh deleted file mode 100755 index 9bdf58693dc3c..0000000000000 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="multiple_conn" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_multiple_conn_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_multiple_conn_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh deleted file mode 100755 index d2a51f290986d..0000000000000 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="reconfigure" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_reconfigure -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_reconfigure -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh b/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh deleted file mode 100755 index 39d442e38b2e3..0000000000000 --- a/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# EATT notification reliability test - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="eatt_notif" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_notif_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=client -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_notif_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=server -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml b/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml index b87aaff2f0c54..02995cf4c6508 100644 --- a/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml @@ -1,11 +1,18 @@ tests: bluetooth.host.att.eatt_notif: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet harness: bsim + timeout: 120 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_notif_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_options: + - -RealEncryption=1 + bsim_devices: + - test_id: client + - test_id: server diff --git a/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh deleted file mode 100755 index 148865c54745c..0000000000000 --- a/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="long_read" -dev_exe=bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf -args_all=(-s=${simulation_id} -D=2) -args_dev=(-v=2 -RealEncryption=1 -testid=the_test) - -cd "${BSIM_OUT_PATH}/bin" - -Execute ./${dev_exe} "${args_all[@]}" "${args_dev[@]}" -d=0 - -Execute ./${dev_exe} "${args_all[@]}" "${args_dev[@]}" -d=1 - -Execute ./bs_2G4_phy_v1 "${args_all[@]}" -v=6 -sim_length=60e6 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/long_read/testcase.yaml b/tests/bsim/bluetooth/host/att/long_read/testcase.yaml index 6579792fe46f9..15dc2f590921a 100644 --- a/tests/bsim/bluetooth/host/att/long_read/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/long_read/testcase.yaml @@ -1,10 +1,18 @@ tests: bluetooth.host.att.long_read: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_long_read_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + - -D=2 + bsim_devices: + - test_id: the_test + - test_id: the_test diff --git a/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh deleted file mode 100755 index b8cae7776531f..0000000000000 --- a/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="mtu_update" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -central_exe="./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_mtu_update_prj_central_conf" -peripheral_exe="./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_mtu_update_prj_peripheral_conf" - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=20e6 $@ -argschannel -at=40 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml b/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml index 028b2d7d66e2f..5284a0ee08c5c 100644 --- a/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml @@ -1,19 +1,38 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 tests: - bluetooth.host.att.mtu_update.central: + bluetooth.host.att.mtu_update.build_central: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_mtu_update_prj_central_conf extra_args: CONF_FILE=prj_central.conf - bluetooth.host.att.mtu_update.peripheral: + + bluetooth.host.att.mtu_update.build_peripheral: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_mtu_update_prj_peripheral_conf extra_args: CONF_FILE=prj_peripheral.conf + + bluetooth.host.att.mtu_update.test: + no_build: true + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + bsim_devices: + - test_id: central + exe: tests_bsim_bluetooth_host_att_mtu_update_prj_central_conf + - test_id: peripheral + exe: tests_bsim_bluetooth_host_att_mtu_update_prj_peripheral_conf + bsim_phy_options: + - -argschannel + - -at=40 diff --git a/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh deleted file mode 100755 index c18d5e0a9a512..0000000000000 --- a/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_path=$(guess_test_long_name) -dev_exe="bs_${BOARD_TS}_${test_path}_prj_conf" -simulation_id="${test_path}" - -EXECUTE_TIMEOUT=120 - -cd "${BSIM_OUT_PATH}/bin" - -args_all=(-s="${simulation_id}" -D=2) -args_dev=(-v=2 -RealEncryption=1 -testid=the_test) - -Execute ./"${dev_exe}" "${args_all[@]}" "${args_dev[@]}" -d=1 -Execute ./bs_2G4_phy_v1 "${args_all[@]}" -v=6 -sim_length=200e6 -Execute ./"${dev_exe}" "${args_all[@]}" "${args_dev[@]}" -d=0 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/open_close/testcase.yaml b/tests/bsim/bluetooth/host/att/open_close/testcase.yaml index aa60ab2942c23..da46e3c04fc78 100644 --- a/tests/bsim/bluetooth/host/att/open_close/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/open_close/testcase.yaml @@ -1,10 +1,18 @@ tests: bluetooth.host.att.open_close: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_open_close_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 200e6 + bsim_options: + - -RealEncryption=1 + - -D=2 + bsim_devices: + - test_id: the_test + - test_id: the_test diff --git a/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml b/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml index b881dcffbb39b..fb3b042e84d76 100644 --- a/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml @@ -7,10 +7,11 @@ common: harness: bsim tests: - bluetooth.host.att.pipeline.dut: + bluetooth.host.att.pipeline.build_dut: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf - bluetooth.host.att.pipeline.dut_rx_tx_prio: + + bluetooth.host.att.pipeline.build_dut_rx_tx_prio: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf_rx_tx_prio_invert_extra_conf diff --git a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh deleted file mode 100755 index dba6867a3aabb..0000000000000 --- a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -dut_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf" -tester_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf" - -simulation_id="att_pipeline" -verbosity_level=2 -sim_length_us=100e6 -EXECUTE_TIMEOUT=240 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=${sim_length_us} $@ - -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=tester_1 -RealEncryption=1 -rs=100 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=dut_1 -RealEncryption=1 - -wait_for_background_jobs - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=3 -sim_length=${sim_length_us} $@ - -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=2 -testid=tester -RealEncryption=1 -rs=100 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=dut -RealEncryption=1 -rs=2000 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=dut -RealEncryption=1 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh deleted file mode 100755 index d271c9c04fad3..0000000000000 --- a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023-2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Test purpose: -# -# Basic check that the DUT GATT client does not pipeline ATT -# requests. -# -# Sending a new request on a bearer before the response to the -# previous request has been received ('pipelining') is a -# protocol violation. -# -# Test variant 'rx_tx_prio_invert': -# -# - The priority of the RX and TX threads is inverted compared -# to the default configuration. The result shall be the same. -# -# Test procedure: -# -# - DUT is excercised by calling `gatt_write` in a loop. -# - Tester does not immediately respond but delays the response -# a bit to ensure the LL has time to transport any extra -# requests, exposing a bug. -# - Tester verifies there is no such extra request while it's -# delaying the response. Detecting an extra request proves a -# protocol violation. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -dut_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf" -dut_exe+="_rx_tx_prio_invert_extra_conf" -tester_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf" - -simulation_id="att_pipeline_test_shall_not_pipeline_variant_rx_tx_prio_invert" -verbosity_level=2 -sim_length_us=100e6 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=${sim_length_us} $@ - -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=tester_1 -RealEncryption=1 -rs=100 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=dut_1 -RealEncryption=1 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh deleted file mode 100755 index d5d90c645d34e..0000000000000 --- a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023-2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Test purpose: -# -# Check that DUT GATT server gracefully handles a pipelining -# client. -# -# The DUT GATT server must remain available to a well-behaved -# peer while a bad peer tries to spam ATT requests. -# -# Test variant 'rx_tx_prio_invert': -# -# - The priority of the RX and TX threads is inverted compared -# to the default configuration. The result shall be the same. -# -# Test procedure: -# -# - The well-behaved peer performs a discovery procedure -# repeatedly. -# - The bad peer spams ATT requests as fast as possible. -# - The connection with the well-behaved peer shall remain -# responsive. -# - Either: The DUT may disconnect the bad peer ACL after -# receiving a protocol violation occurs. The bad peer shall -# be able to reconnect and continue the bad behavior. -# - Or: The DUT may process and respond to the pipelined -# requests, preserving their ordering. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -dut_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf" -dut_exe+="_rx_tx_prio_invert_extra_conf" -tester_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf" - -simulation_id="att_pipeline_test_tolerate_pipeline_variant_rx_tx_prio_invert" -verbosity_level=2 -sim_length_us=100e6 -EXECUTE_TIMEOUT=240 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=3 -sim_length=${sim_length_us} $@ - -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=2 -testid=tester -RealEncryption=1 -rs=100 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=dut -RealEncryption=1 -rs=2000 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=dut -RealEncryption=1 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/pipeline/testcase.yaml b/tests/bsim/bluetooth/host/att/pipeline/testcase.yaml new file mode 100644 index 0000000000000..24b0621b88ac2 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/pipeline/testcase.yaml @@ -0,0 +1,32 @@ +common: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 240 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 100e6 + bsim_options: + - -RealEncryption=1 + +tests: + bluetooth.host.att.pipeline.shall_not_pipeline: + harness_config: + bsim_devices: + - test_id: dut_1 + exe: tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf_rx_tx_prio_invert_extra_conf + - test_id: tester_1 + exe: tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf + + bluetooth.host.att.pipeline.tolerate_pipeline: + harness_config: + bsim_devices: + - test_id: dut + exe: tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf + - test_id: dut + exe: tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf + - test_id: tester + exe: tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml b/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml index e1ed0e91a1a9a..a2bd826f95d52 100644 --- a/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.pipeline.tester: + bluetooth.host.att.pipeline.build_tester: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml b/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml index 982a5ed861c40..43cfdbb60c538 100644 --- a/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.read_fill_buf.client: + bluetooth.host.att.read_fill_buf.build_client: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml b/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml index a302947c6cc7c..24a98bed556c5 100644 --- a/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.read_fill_buf.server: + bluetooth.host.att.read_fill_buf.build_server: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh b/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh deleted file mode 100755 index a35e1f0d2ad0d..0000000000000 --- a/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="read_fill_buf" -test_exe_d0="./bs_${BOARD_TS}_$(guess_test_long_name)_client_prj_conf" -test_exe_d1="./bs_${BOARD_TS}_$(guess_test_long_name)_server_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$test_exe_d0" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=cli \ - -RealEncryption=1 - -Execute "$test_exe_d1" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=srv \ - -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/testcase.yaml b/tests/bsim/bluetooth/host/att/read_fill_buf/testcase.yaml new file mode 100644 index 0000000000000..3eb96d9d7eb26 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/read_fill_buf/testcase.yaml @@ -0,0 +1,19 @@ +tests: + bluetooth.host.att.read_fill_buf.test_read_fil_buf: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + bsim_devices: + - test_id: cli + exe: tests_bsim_bluetooth_host_att_read_fill_buf_client_prj_conf + - test_id: srv + exe: tests_bsim_bluetooth_host_att_read_fill_buf_server_prj_conf diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml b/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml index d6dde84b2ab61..4c30084a4e8c9 100644 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.retry_on_sec_err.client: + bluetooth.host.att.retry_on_sec_err.build_client: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml b/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml index 5e4ebd2b76be5..ce6db1f0a145f 100644 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.retry_on_sec_err.server: + bluetooth.host.att.retry_on_sec_err.build_server: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh deleted file mode 100755 index da52822211fc7..0000000000000 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Codecoup -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="retry_on_sec_err" -verbosity_level=2 -test_exe_d0="./bs_${BOARD_TS}_$(guess_test_long_name)_client_prj_conf" -test_exe_d1="./bs_${BOARD_TS}_$(guess_test_long_name)_server_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -printf "\n\n===== ATT retry on security error (auto security elevation) ======\n\n" - -Execute "$test_exe_d0" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=test_client \ - -RealEncryption=1 - -Execute "$test_exe_d1" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=test_server \ - -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh b/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh deleted file mode 100755 index 15c973a8cd191..0000000000000 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Codecoup -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="retry_on_sec_err_seq_request" -verbosity_level=2 -test_exe_d0="./bs_${BOARD_TS}_$(guess_test_long_name)_client_prj_conf" -test_exe_d1="./bs_${BOARD_TS}_$(guess_test_long_name)_server_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -printf "\n\n==== ATT retry on security error (peripheral security request) ====\n\n" - -Execute "$test_exe_d0" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=test_client_security_request \ - -RealEncryption=1 - -Execute "$test_exe_d1" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=test_server_security_request \ - -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/testcase.yaml b/tests/bsim/bluetooth/host/att/retry_on_sec_err/testcase.yaml new file mode 100644 index 0000000000000..65b12072ec848 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/testcase.yaml @@ -0,0 +1,30 @@ +common: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + +tests: + bluetooth.host.att.retry_on_sec_err.retry_on_sec_err: + harness_config: + bsim_devices: + - test_id: test_client + exe: tests_bsim_bluetooth_host_att_retry_on_sec_err_client_prj_conf + - test_id: test_server + exe: tests_bsim_bluetooth_host_att_retry_on_sec_err_server_prj_conf + + bluetooth.host.att.retry_on_sec_err.retry_on_sec_err_sec_request: + harness_config: + bsim_devices: + - test_id: test_client_security_request + exe: tests_bsim_bluetooth_host_att_retry_on_sec_err_client_prj_conf + - test_id: test_server_security_request + exe: tests_bsim_bluetooth_host_att_retry_on_sec_err_server_prj_conf diff --git a/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml b/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml index 82620e086bf25..3375c48f55ae8 100644 --- a/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.sequential.dut: + bluetooth.host.att.sequential.build_dut: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh b/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh deleted file mode 100755 index b67a1fa379d03..0000000000000 --- a/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="att_sequential" -verbosity_level=2 - -dut_exe="bs_${BOARD_TS}_$(guess_test_long_name)_dut_prj_conf" -tester_exe="bs_${BOARD_TS}_$(guess_test_long_name)_tester_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=10e6 $@ - -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=tester -RealEncryption=0 -rs=100 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=dut -RealEncryption=0 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/sequential/testcase.yaml b/tests/bsim/bluetooth/host/att/sequential/testcase.yaml new file mode 100644 index 0000000000000..308ca6d171f50 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/sequential/testcase.yaml @@ -0,0 +1,19 @@ +tests: + bluetooth.host.att.sequential.att_sequential: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_options: + - -RealEncryption=0 + bsim_devices: + - test_id: dut + exe: tests_bsim_bluetooth_host_att_sequential_dut_prj_conf + - test_id: tester + exe: tests_bsim_bluetooth_host_att_sequential_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml b/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml index e092ca177b7b1..3ccfe3694c2b7 100644 --- a/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.att.sequential.tester: + bluetooth.host.att.sequential.build_tester: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh deleted file mode 100755 index 1a28986ba6b1d..0000000000000 --- a/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -x - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source -EXECUTE_TIMEOUT=120 - -simulation_id="timeout" -dev_exe=bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf -args_all=(-s=${simulation_id} -D=2) -args_dev=(-v=2 -RealEncryption=1 -testid=the_test) - -cd "${BSIM_OUT_PATH}/bin" - -Execute ./${dev_exe} "${args_all[@]}" "${args_dev[@]}" -d=0 - -Execute ./${dev_exe} "${args_all[@]}" "${args_dev[@]}" -d=1 - -Execute ./bs_2G4_phy_v1 "${args_all[@]}" -sim_length=200e6 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/timeout/testcase.yaml b/tests/bsim/bluetooth/host/att/timeout/testcase.yaml index 8d00256097dbe..c2f247d9f1c7a 100644 --- a/tests/bsim/bluetooth/host/att/timeout/testcase.yaml +++ b/tests/bsim/bluetooth/host/att/timeout/testcase.yaml @@ -1,10 +1,18 @@ tests: bluetooth.host.att.timeout: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_att_timeout_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 200e6 + bsim_options: + - -RealEncryption=1 + - -D=2 + bsim_devices: + - test_id: the_test + - test_id: the_test diff --git a/tests/bsim/bluetooth/host/central/testcase.yaml b/tests/bsim/bluetooth/host/central/testcase.yaml index e4ea1098aa188..c49ee37c4b674 100644 --- a/tests/bsim/bluetooth/host/central/testcase.yaml +++ b/tests/bsim/bluetooth/host/central/testcase.yaml @@ -1,11 +1,34 @@ +common: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + - nrf5340bsim/nrf5340/cpunet + harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_exe_name: tests_bsim_bluetooth_host_central_prj_conf + tests: - bluetooth.host.central: + bluetooth.host.central.build: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - - nrf5340bsim/nrf5340/cpunet - harness: bsim + no_build: false + + bluetooth.host.central.central_connect_timeout: harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_central_prj_conf + bsim_devices: + - test_id: central_connect_timeout + + bluetooth.host.central.central_connect_when_connecting: + harness_config: + bsim_devices: + - test_id: central_connect_when_connecting + + bluetooth.host.central.central_connect_to_existing: + harness_config: + bsim_devices: + - test_id: central_connect_to_existing + - test_id: peripheral_dummy diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh deleted file mode 100755 index 3b0cdcab24e0d..0000000000000 --- a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="central_connect_timeout" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_connect_timeout - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh deleted file mode 100755 index af64f6a14ad10..0000000000000 --- a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="central_connect_timeout_to_existing" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_connect_to_existing - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_dummy - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh deleted file mode 100755 index 5d352adc0fe16..0000000000000 --- a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="central_connect_when_connecting" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_connect_when_connecting - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/compile.sh b/tests/bsim/bluetooth/host/compile.sh deleted file mode 100755 index 3d2d0b022445a..0000000000000 --- a/tests/bsim/bluetooth/host/compile.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Compile all the applications needed by the bsim tests in these subfolders - -#set -x #uncomment this line for debugging -set -ue - -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" - -#Set a default value to BOARD if it does not have one yet -BOARD="${BOARD:-nrf52_bsim/native}" - -west twister -T ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/ -p ${BOARD} diff --git a/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh b/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh deleted file mode 100755 index c318928fbf8ea..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="gatt_authorization" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_authorization_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_authorization_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=gatt_server - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml b/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml index 56223b9248684..45f04c1c477ef 100644 --- a/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml @@ -1,11 +1,16 @@ tests: bluetooth.host.gatt.authorization: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_authorization_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_devices: + - test_id: gatt_client + - test_id: gatt_server diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh deleted file mode 100755 index 5ba9e92e66f18..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -EXECUTE_TIMEOUT=120 -BIN_SUFFIX=${bin_suffix:-} - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_caching_prj_conf${BIN_SUFFIX} \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=${client_id} -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_caching_prj_conf${BIN_SUFFIX} \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=${server_id} -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_db_hash_read_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_db_hash_read_eatt.sh deleted file mode 100755 index fc9fc3675b55a..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_db_hash_read_eatt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_db_hash_read_eatt" \ - client_id="gatt_client_db_hash_read_eatt" \ - server_id="gatt_server_eatt" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_db_hash_read_no_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_db_hash_read_no_eatt.sh deleted file mode 100755 index acafc89515a70..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_db_hash_read_no_eatt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_db_hash_read_no_eatt" \ - client_id="gatt_client_db_hash_read_no_eatt" \ - server_id="gatt_server_no_eatt" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_out_of_sync_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_out_of_sync_eatt.sh deleted file mode 100755 index 7326530b02308..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_out_of_sync_eatt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_out_of_sync_eatt" \ - client_id="gatt_client_out_of_sync_eatt" \ - server_id="gatt_server_eatt" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_out_of_sync_no_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_out_of_sync_no_eatt.sh deleted file mode 100755 index bfab7cf6c85cd..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_out_of_sync_no_eatt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_out_of_sync_no_eatt" \ - client_id="gatt_client_out_of_sync_no_eatt" \ - server_id="gatt_server_no_eatt" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_psa_db_hash_read_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_psa_db_hash_read_eatt.sh deleted file mode 100755 index 281ff23a055db..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_psa_db_hash_read_eatt.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_psa_db_hash_read_eatt_psa" \ - client_id="gatt_client_db_hash_read_eatt" \ - server_id="gatt_server_eatt" \ - bin_suffix="_psa_overlay_conf" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_retry_reads_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_retry_reads_eatt.sh deleted file mode 100755 index b9b9c960c4528..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_retry_reads_eatt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_retry_reads_eatt" \ - client_id="gatt_client_retry_reads_eatt" \ - server_id="gatt_server_eatt" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_retry_reads_no_eatt.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_retry_reads_no_eatt.sh deleted file mode 100755 index 2b7fda8fa9424..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/gatt_caching_retry_reads_no_eatt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_caching_retry_reads_no_eatt" \ - client_id="gatt_client_retry_reads_no_eatt" \ - server_id="gatt_server_no_eatt" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml b/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml index dd23374dcf4f9..47aeb25fb3cb9 100644 --- a/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml @@ -1,18 +1,66 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet + no_build: true + timeout: 120 harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_exe_name: tests_bsim_bluetooth_host_gatt_caching_prj_conf + bsim_options: + - -RealEncryption=1 tests: - bluetooth.host.gatt.caching: + bluetooth.host.gatt.build_caching: + build_only: true + no_build: false + + bluetooth.host.gatt.caching_db_hash_read_eatt: harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_gatt_caching_prj_conf - bluetooth.host.gatt.caching_psa_overlay: + bsim_devices: + - test_id: gatt_client_db_hash_read_eatt + - test_id: gatt_server_eatt + + bluetooth.host.gatt.caching_db_hash_read_no_eatt: harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_gatt_caching_prj_conf_psa_overlay_conf + bsim_devices: + - test_id: gatt_client_db_hash_read_no_eatt + - test_id: gatt_server_no_eatt + + bluetooth.host.gatt.caching_out_of_sync_eatt: + harness_config: + bsim_devices: + - test_id: gatt_client_out_of_sync_eatt + - test_id: gatt_server_eatt + + bluetooth.host.gatt.caching_out_of_sync_no_eatt: + harness_config: + bsim_devices: + - test_id: gatt_client_out_of_sync_no_eatt + - test_id: gatt_server_no_eatt + + bluetooth.host.gatt.caching_psa_db_hash_read_eatt_psa: + no_build: false extra_args: EXTRA_CONF_FILE=psa_overlay.conf + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_caching_prj_conf_psa_overlay_conf + bsim_devices: + - test_id: gatt_client_db_hash_read_eatt + - test_id: gatt_server_eatt + + bluetooth.host.gatt.caching_retry_reads_eatt: + harness_config: + bsim_devices: + - test_id: gatt_client_retry_reads_eatt + - test_id: gatt_server_eatt + + bluetooth.host.gatt.caching_retry_reads_no_eatt: + harness_config: + bsim_devices: + - test_id: gatt_client_retry_reads_no_eatt + - test_id: gatt_server_no_eatt diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh deleted file mode 100755 index e09177ef122ee..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -simulation_id="ccc_store" -verbosity_level=2 -EXECUTE_TIMEOUT=60 - -cd ${BSIM_OUT_PATH}/bin - -if [ "${1}" != 'debug0' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -if [ "${1}" != 'debug1' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 - -if [ "${1}" == 'debug0' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -if [ "${1}" == 'debug1' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_no_long_wq.sh b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_no_long_wq.sh deleted file mode 100755 index cad38e56e524e..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_no_long_wq.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/env bash -# Copyright 2025 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_overlay-no_long_wq_conf" -simulation_id="ccc_store_no_long_wq" -verbosity_level=2 -EXECUTE_TIMEOUT=60 - -cd ${BSIM_OUT_PATH}/bin - -if [ "${1}" != 'debug0' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -if [ "${1}" != 'debug1' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 - -if [ "${1}" == 'debug0' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -if [ "${1}" == 'debug1' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_no_store_on_write.sh b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_no_store_on_write.sh deleted file mode 100755 index b732d1c598fbf..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_no_store_on_write.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_overlay-no_store_on_write_conf" -simulation_id="ccc_store_no_store_on_write" -verbosity_level=2 -EXECUTE_TIMEOUT=60 - -cd ${BSIM_OUT_PATH}/bin - -if [ "${1}" != 'debug0' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -if [ "${1}" != 'debug1' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 - -if [ "${1}" == 'debug0' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -if [ "${1}" == 'debug1' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -argstest 10 -fi - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml b/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml index a2ee367de1a3d..4d48d21cb9fe1 100644 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml @@ -1,22 +1,63 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 60 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + - -flash_rm tests: bluetooth.host.gatt.ccc_store: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_ccc_store_prj_conf + bsim_devices: + - test_id: central + options: + - -flash=ccc_store_client.log.bin + - -argstest + - '10' + - test_id: peripheral + options: + - -flash=ccc_store_server.log.bin + - -argstest + - '10' + bluetooth.host.gatt.ccc_store_no_store_on_write: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_ccc_store_overlay-no_store_on_write_conf + bsim_devices: + - test_id: central + options: + - -flash=ccc_no_store_on_write_client.log.bin + - -argstest + - '10' + - test_id: peripheral + options: + - -flash=ccc_no_store_on_write_server.log.bin + - -argstest + - '10' extra_args: EXTRA_CONF_FILE=overlay-no_store_on_write.conf + bluetooth.host.gatt.ccc_store_no_long_wq: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_ccc_store_overlay-no_long_wq_conf + bsim_devices: + - test_id: central + options: + - -flash=ccc_store_no_long_wq_client.log.bin + - -argstest + - '10' + - test_id: peripheral + options: + - -flash=ccc_store_no_long_wq_server.log.bin + - -argstest + - '10' extra_args: EXTRA_CONF_FILE=overlay-no_long_wq.conf diff --git a/tests/bsim/bluetooth/host/gatt/device_name/test_scripts/run_device_name.sh b/tests/bsim/bluetooth/host/gatt/device_name/test_scripts/run_device_name.sh deleted file mode 100755 index 944de3a87fe13..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/device_name/test_scripts/run_device_name.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2025 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" -simulation_id=${test_name} - -verbosity_level=2 - -EXECUTE_TIMEOUT=120 - -SIM_LEN_US=$((2 * 1000 * 1000)) - -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=server \ - -RealEncryption=1 -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69 -testid=client \ - -RealEncryption=1 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/device_name/testcase.yaml b/tests/bsim/bluetooth/host/gatt/device_name/testcase.yaml index 4bd3a1b7c8349..4289dec0d9ac1 100644 --- a/tests/bsim/bluetooth/host/gatt/device_name/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/device_name/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.gatt.device_name: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_device_name_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 2e6 + bsim_options: + - -RealEncryption=1 + bsim_devices: + - test_id: server + - test_id: client diff --git a/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh b/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh deleted file mode 100755 index dbcf007840332..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Basic GATT test: A central acting as a GATT client scans for and connects -# to a peripheral acting as a GATT server. The GATT client will then attempt -# to write and read to and from a few GATT characteristics. - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="gatt" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_general_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_general_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=gatt_server -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/general/testcase.yaml b/tests/bsim/bluetooth/host/gatt/general/testcase.yaml index c173715475ab4..9abe82b06b001 100644 --- a/tests/bsim/bluetooth/host/gatt/general/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/general/testcase.yaml @@ -1,11 +1,18 @@ tests: bluetooth.host.gatt.general: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet harness: bsim + timeout: 120 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_general_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_options: + - -RealEncryption=1 + bsim_devices: + - test_id: gatt_client + - test_id: gatt_server diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh deleted file mode 100755 index faa4199dd04c6..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=${client_id} -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=${server_id} -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_enhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_enhanced.sh deleted file mode 100755 index d8516fa35de17..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_enhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_enhanced_enhanced" \ - server_id="gatt_server_enhanced" \ - client_id="gatt_client_enhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_mixed.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_mixed.sh deleted file mode 100755 index 4d82408fb9120..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_mixed.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_enhanced_mixed" \ - server_id="gatt_server_enhanced" \ - client_id="gatt_client_mixed" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_none.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_none.sh deleted file mode 100755 index 13a4e67e1f0e7..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_none.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_enhanced_none" \ - server_id="gatt_server_enhanced" \ - client_id="gatt_client_none" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_unenhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_unenhanced.sh deleted file mode 100755 index 480fbabf467df..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_enhanced_unenhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_enhanced_unenhanced" \ - server_id="gatt_server_enhanced" \ - client_id="gatt_client_unenhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_enhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_enhanced.sh deleted file mode 100755 index 16827e3988bf1..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_enhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_mixed_enhanced" \ - server_id="gatt_server_mixed" \ - client_id="gatt_client_enhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_mixed.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_mixed.sh deleted file mode 100755 index ed0a3e4f61e83..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_mixed.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_mixed_mixed" \ - server_id="gatt_server_mixed" \ - client_id="gatt_client_mixed" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_none.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_none.sh deleted file mode 100755 index 944d91f575eed..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_none.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_mixed_none" \ - server_id="gatt_server_mixed" \ - client_id="gatt_client_none" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_unenhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_unenhanced.sh deleted file mode 100755 index 25d0f9839451f..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_mixed_unenhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_mixed_unenhanced" \ - server_id="gatt_server_mixed" \ - client_id="gatt_client_unenhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_enhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_enhanced.sh deleted file mode 100755 index 514b8508ea98f..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_enhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_none_enhanced" \ - server_id="gatt_server_none" \ - client_id="gatt_client_enhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_mixed.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_mixed.sh deleted file mode 100755 index 7c74575a9f949..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_mixed.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_none_mixed" \ - server_id="gatt_server_none" \ - client_id="gatt_client_mixed" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_none.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_none.sh deleted file mode 100755 index 1d988718f242c..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_none.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_none_none" \ - server_id="gatt_server_none" \ - client_id="gatt_client_none" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_unenhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_unenhanced.sh deleted file mode 100755 index 9c8425e376f7e..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_none_unenhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_none_unenhanced" \ - server_id="gatt_server_none" \ - client_id="gatt_client_unenhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_enhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_enhanced.sh deleted file mode 100755 index 4c7c499f166ff..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_enhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_unenhanced_enhanced" \ - server_id="gatt_server_unenhanced" \ - client_id="gatt_client_enhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_mixed.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_mixed.sh deleted file mode 100755 index 4a0fdef0243c3..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_mixed.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_unenhanced_mixed" \ - server_id="gatt_server_unenhanced" \ - client_id="gatt_client_mixed" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_none.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_none.sh deleted file mode 100755 index 5b705823e7245..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_none.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_unenhanced_none" \ - server_id="gatt_server_unenhanced" \ - client_id="gatt_client_none" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_unenhanced.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_unenhanced.sh deleted file mode 100755 index 7da2f2ae39bb4..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/gatt_notify_unenhanced_unenhanced.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -simulation_id="gatt_notify_unenhanced_unenhanced" \ - server_id="gatt_server_unenhanced" \ - client_id="gatt_client_unenhanced" \ - $(dirname "${BASH_SOURCE[0]}")/_run_test.sh diff --git a/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml b/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml index b50aec3fb5da6..ba130572a8a6f 100644 --- a/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml @@ -1,10 +1,115 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + no_build: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_notify_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + tests: - bluetooth.host.gatt.notify: + bluetooth.host.gatt.build_notify: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - harness: bsim + no_build: false + + bluetooth.host.gatt.notify_enhanced_enhanced: harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_gatt_notify_prj_conf + bsim_devices: + - test_id: gatt_client_enhanced + - test_id: gatt_server_enhanced + + bluetooth.host.gatt.notify_enhanced_mixed: + harness_config: + bsim_devices: + - test_id: gatt_client_mixed + - test_id: gatt_server_enhanced + + bluetooth.host.gatt.notify_enhanced_none: + harness_config: + bsim_devices: + - test_id: gatt_client_none + - test_id: gatt_server_enhanced + + bluetooth.host.gatt.notify_enhanced_unenhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_unenhanced + - test_id: gatt_server_enhanced + + bluetooth.host.gatt.notify_mixed_enhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_enhanced + - test_id: gatt_server_mixed + + bluetooth.host.gatt.notify_mixed_mixed: + harness_config: + bsim_devices: + - test_id: gatt_client_mixed + - test_id: gatt_server_mixed + + bluetooth.host.gatt.notify_mixed_none: + harness_config: + bsim_devices: + - test_id: gatt_client_none + - test_id: gatt_server_mixed + + bluetooth.host.gatt.notify_mixed_unenhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_unenhanced + - test_id: gatt_server_mixed + + bluetooth.host.gatt.notify_none_enhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_enhanced + - test_id: gatt_server_none + + bluetooth.host.gatt.notify_none_mixed: + harness_config: + bsim_devices: + - test_id: gatt_client_mixed + - test_id: gatt_server_none + + bluetooth.host.gatt.notify_none_none: + harness_config: + bsim_devices: + - test_id: gatt_client_none + - test_id: gatt_server_none + + bluetooth.host.gatt.notify_none_unenhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_unenhanced + - test_id: gatt_server_none + + bluetooth.host.gatt.notify_unenhanced_enhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_enhanced + - test_id: gatt_server_unenhanced + + bluetooth.host.gatt.notify_unenhanced_mixed: + harness_config: + bsim_devices: + - test_id: gatt_client_mixed + - test_id: gatt_server_unenhanced + + bluetooth.host.gatt.notify_unenhanced_none: + harness_config: + bsim_devices: + - test_id: gatt_client_none + - test_id: gatt_server_unenhanced + + bluetooth.host.gatt.notify_unenhanced_unenhanced: + harness_config: + bsim_devices: + - test_id: gatt_client_unenhanced + - test_id: gatt_server_unenhanced diff --git a/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh b/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh deleted file mode 100755 index d89a5701fd998..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="notify_multiple" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=gatt_server -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml b/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml index 3da3f5bcb662d..34919b14a7579 100644 --- a/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.gatt.notify_multiple: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_devices: + - test_id: gatt_client + - test_id: gatt_server + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/notify_stress/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/gatt/notify_stress/test_scripts/run_test.sh deleted file mode 100755 index 489bea278afd6..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/notify_stress/test_scripts/run_test.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2025 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Test purpose: -# -# Verify that the Central can receive 30 notifications from the Peripheral over all available EATT -# channels. -# -# Note: The number of notifications and the size of the characteristic are chosen empirically. -# -# This test is designed to stress HCI driver to guarantee that no data is dropped between Host and -# Controller. Specifically, the HCI IPC driver that tends to drop data when the Host is not able to -# process it fast enough. The test is guaranteed to fail with Controller to Host HCI data flow -# control being disabled. -# -# Test Setup: -# -# - Devices: Central and Peripheral -# - Characteristic Length: Peripheral exposes a long characteristic (greater than 23 bytes). -# - Connection: Central connects to Peripheral. -# - Notification subscription: Central subscribes to notificaitons from the Peripheral. -# - EATT Usage: EATT is enabled, and the maximum possible EATT channels are established to -# parallelize notifications as much as possible, increasing traffic towards Central. -# -# Test Steps: -# -# 1. The Peripheral sends 30 notifications to the Central over all available EATT channels. -# 2. Upon receiving a notification, the Central holds the received notification callback for 1 -# second before releasing it. -# 3. The test passes if all 30 notifications are successfully sent by the Peripheral and received -# by the Central. - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -EXECUTE_TIMEOUT=150 - -verbosity_level=2 -simulation_id="gatt_notify_enhanced_stress" -server_id="gatt_server_enhanced_notif_stress" -client_id="gatt_client_enhanced_notif_stress" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=${client_id} -RealEncryption=1 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=${server_id} -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/notify_stress/testcase.yaml b/tests/bsim/bluetooth/host/gatt/notify_stress/testcase.yaml index ead6f5effdd89..4ef227d09371e 100644 --- a/tests/bsim/bluetooth/host/gatt/notify_stress/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/notify_stress/testcase.yaml @@ -7,6 +7,14 @@ tests: platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpuapp + timeout: 150 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_notify_stress_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 70e6 + bsim_devices: + - test_id: gatt_server_enhanced_notif_stress + - test_id: gatt_client_enhanced_notif_stress + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh b/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh deleted file mode 100755 index 73ec66146aef5..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name='sc_indicate' -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_${test_name}_prj_conf" -simulation_id="${test_name}" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml b/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml index 743c415080f80..81c41003cef75 100644 --- a/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.gatt.sc_indicate: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_sc_indicate_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_devices: + - test_id: central + - test_id: peripheral + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh b/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh deleted file mode 100755 index e6012eb616a5f..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="settings" -verbosity_level=2 -EXECUTE_TIMEOUT=120 -test_exe="./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -# Remove the files used by the custom SETTINGS backend -TO_DELETE="${simulation_id}_server.log ${simulation_id}_client.log" -echo "remove settings files ${TO_DELETE}" -rm ${TO_DELETE} || true - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" -D=8 -sim_length=30e6 $@ - -# Only one `server` device is really running at a time. This is a necessary hack -# because bsim doesn't support plugging devices in and out of a running -# simulation, but this test needs a way to power-cycle the `server` device a few -# times. -# -# Each device will wait until the previous instance (called 'test round') has -# finished executing before starting up. -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=0 -testid=server -RealEncryption=1 -argstest 0 6 "server" -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=1 -testid=server -RealEncryption=1 -argstest 1 6 "server" -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=2 -testid=server -RealEncryption=1 -argstest 2 6 "server" -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=3 -testid=server -RealEncryption=1 -argstest 3 6 "server" -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=4 -testid=server -RealEncryption=1 -argstest 4 6 "server" -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=5 -testid=server -RealEncryption=1 -argstest 5 6 "server" -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=6 -testid=server -RealEncryption=1 -argstest 6 6 "server" - -Execute "$test_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=7 -testid=client -RealEncryption=1 -argstest 0 0 "client" - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_privacy.sh b/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_privacy.sh deleted file mode 100755 index 94e660dfecd5e..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_privacy.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="settings_privacy" -verbosity_level=2 -EXECUTE_TIMEOUT=120 -test_priv_exe="./bs_${BOARD_TS}_$(guess_test_long_name)_overlay-privacy_conf" - -cd ${BSIM_OUT_PATH}/bin - -# Remove the files used by the custom SETTINGS backend -TO_DELETE="${simulation_id}_server_priv.log ${simulation_id}_client_priv.log" -echo "remove settings files ${TO_DELETE}" -rm ${TO_DELETE} || true - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" -D=8 -sim_length=30e6 $@ - -# Only one `server` device is really running at a time. This is a necessary hack -# because bsim doesn't support plugging devices in and out of a running -# simulation, but this test needs a way to power-cycle the `server` device a few -# times. -# -# Each device will wait until the previous instance (called 'test round') has -# finished executing before starting up. -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=0 -testid=server -RealEncryption=1 -argstest 0 6 "server_priv" -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=1 -testid=server -RealEncryption=1 -argstest 1 6 "server_priv" -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=2 -testid=server -RealEncryption=1 -argstest 2 6 "server_priv" -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=3 -testid=server -RealEncryption=1 -argstest 3 6 "server_priv" -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=4 -testid=server -RealEncryption=1 -argstest 4 6 "server_priv" -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=5 -testid=server -RealEncryption=1 -argstest 5 6 "server_priv" -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=6 -testid=server -RealEncryption=1 -argstest 6 6 "server_priv" - -Execute "$test_priv_exe" -v=${verbosity_level} \ - -s="${simulation_id}" -d=7 -testid=client -RealEncryption=1 -argstest 0 0 "client_priv" - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml b/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml index 8d8575b2c49e4..3aad1d2eef1c1 100644 --- a/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml @@ -1,17 +1,106 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 120 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_options: + - -RealEncryption=1 + - -argstest tests: bluetooth.host.gatt.settings: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_settings_prj_conf + bsim_devices: + - test_id: client + options: + - '0' + - '0' + - 'client' + - test_id: server + options: + - '0' + - '6' + - 'server' + - test_id: server + options: + - '1' + - '6' + - 'server' + - test_id: server + options: + - '2' + - '6' + - 'server' + - test_id: server + options: + - '3' + - '6' + - 'server' + - test_id: server + options: + - '4' + - '6' + - 'server' + - test_id: server + options: + - '5' + - '6' + - 'server' + - test_id: server + options: + - '6' + - '6' + - 'server' + bluetooth.host.gatt.settings_priv: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_settings_overlay-privacy_conf + bsim_devices: + - test_id: client + options: + - '0' + - '0' + - 'client_priv' + - test_id: server + options: + - '0' + - '6' + - 'server_priv' + - test_id: server + options: + - '1' + - '6' + - 'server_priv' + - test_id: server + options: + - '2' + - '6' + - 'server_priv' + - test_id: server + options: + - '3' + - '6' + - 'server_priv' + - test_id: server + options: + - '4' + - '6' + - 'server_priv' + - test_id: server + options: + - '5' + - '6' + - 'server_priv' + - test_id: server + options: + - '6' + - '6' + - 'server_priv' extra_args: EXTRA_CONF_FILE=overlay-privacy.conf diff --git a/tests/bsim/bluetooth/host/gatt/settings_clear/test_scripts/run_settings_clear.sh b/tests/bsim/bluetooth/host/gatt/settings_clear/test_scripts/run_settings_clear.sh deleted file mode 100755 index ed8d08e9e4fcc..0000000000000 --- a/tests/bsim/bluetooth/host/gatt/settings_clear/test_scripts/run_settings_clear.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" -simulation_id=${test_name} - -verbosity_level=2 - -EXECUTE_TIMEOUT=120 - -SIM_LEN_US=$((2 * 1000 * 1000)) - -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=server \ - -RealEncryption=1 -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69 -testid=client \ - -RealEncryption=1 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/settings_clear/testcase.yaml b/tests/bsim/bluetooth/host/gatt/settings_clear/testcase.yaml index 86d83e4412ca7..10f12661e0bdc 100644 --- a/tests/bsim/bluetooth/host/gatt/settings_clear/testcase.yaml +++ b/tests/bsim/bluetooth/host/gatt/settings_clear/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.gatt.settings_clear: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 120 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_gatt_settings_clear_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: client + - test_id: server + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh b/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh deleted file mode 100755 index ea9f7660887ae..0000000000000 --- a/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_id_settings_prj_conf" -simulation_id="id_settings" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s="${simulation_id}_1" -d=0 -testid=dut1 \ - -flash="${simulation_id}.log.bin" - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}_1" \ - -D=1 -sim_length=60e6 - -wait_for_background_jobs - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s="${simulation_id}_2" -d=0 -testid=dut2 \ - -flash="${simulation_id}.log.bin" -flash_rm - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}_2" \ - -D=1 -sim_length=60e6 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/id/settings/testcase.yaml b/tests/bsim/bluetooth/host/id/settings/testcase.yaml index 0b9876bcf6e8b..fdca3635ae372 100644 --- a/tests/bsim/bluetooth/host/id/settings/testcase.yaml +++ b/tests/bsim/bluetooth/host/id/settings/testcase.yaml @@ -1,10 +1,31 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_id_settings_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -flash=id_settings.log.bin + tests: - bluetooth.host.id.settings: + bluetooth.host.id.build_settings: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - harness: bsim + + bluetooth.host.id.settings_dut2: + no_build: true harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_id_settings_prj_conf + bsim_devices: + - test_id: dut2 + options: + - -flash_rm + + bluetooth.host.id.settings_dut1: + no_build: true + harness_config: + bsim_devices: + - test_id: dut1 diff --git a/tests/bsim/bluetooth/host/iso/bis/testcase.yaml b/tests/bsim/bluetooth/host/iso/bis/testcase.yaml index d6bd7c9c21deb..eff8fdfb5b9c9 100644 --- a/tests/bsim/bluetooth/host/iso/bis/testcase.yaml +++ b/tests/bsim/bluetooth/host/iso/bis/testcase.yaml @@ -1,10 +1,29 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_exe_name: tests_bsim_bluetooth_host_iso_bis_prj_conf + tests: - bluetooth.host.iso.bis: + bluetooth.host.iso.build_bis: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - harness: bsim + + bluetooth.host.iso.bis: + no_build: true + harness_config: + bsim_devices: + - test_id: broadcaster + - test_id: receiver + + bluetooth.host.iso.bis_disable: + no_build: true harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_iso_bis_prj_conf + bsim_devices: + - test_id: broadcaster_disable + - test_id: receiver diff --git a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh deleted file mode 100755 index 18c76e299e37e..0000000000000 --- a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="iso_bis" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_bis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_bis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=receiver - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh deleted file mode 100755 index 980af68ee6f04..0000000000000 --- a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="iso_bis_disable" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_bis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster_disable - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_bis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=receiver - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/cis/testcase.yaml b/tests/bsim/bluetooth/host/iso/cis/testcase.yaml index 188e2d764c040..267d31f7f950b 100644 --- a/tests/bsim/bluetooth/host/iso/cis/testcase.yaml +++ b/tests/bsim/bluetooth/host/iso/cis/testcase.yaml @@ -1,10 +1,29 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 120 + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_iso_cis_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + tests: - bluetooth.host.iso.cis: + bluetooth.host.iso.build_cis: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - harness: bsim + + bluetooth.host.iso.cis: + no_build: true + harness_config: + bsim_devices: + - test_id: central + - test_id: peripheral + + bluetooth.host.iso.cis_disable: + no_build: true harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_iso_cis_prj_conf + bsim_devices: + - test_id: central_disable + - test_id: peripheral diff --git a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh deleted file mode 100755 index b693f09456737..0000000000000 --- a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="iso_cis" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_cis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_cis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh deleted file mode 100755 index cb20190d668fb..0000000000000 --- a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="iso_cis_disable" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_cis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_disable - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_cis_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/frag/testcase.yaml b/tests/bsim/bluetooth/host/iso/frag/testcase.yaml index eeaded9d10904..58b8bf0257219 100644 --- a/tests/bsim/bluetooth/host/iso/frag/testcase.yaml +++ b/tests/bsim/bluetooth/host/iso/frag/testcase.yaml @@ -1,10 +1,14 @@ tests: bluetooth.host.iso.frag: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_iso_frag_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_devices: + - test_id: broadcaster diff --git a/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh b/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh deleted file mode 100755 index 5808c885310b3..0000000000000 --- a/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="iso_frag" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=30e6 $@ - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_frag_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml b/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml index 27e7a9a9bf1fb..6ffac7bbd11b2 100644 --- a/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml +++ b/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml @@ -1,10 +1,14 @@ tests: bluetooth.host.iso.frag_2: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_iso_frag_2_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_devices: + - test_id: broadcaster diff --git a/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh b/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh deleted file mode 100755 index c6307d3302713..0000000000000 --- a/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="iso_frag_2" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=30e6 $@ - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_frag_2_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml index 4b7ef8127c584..87aa9716a194a 100644 --- a/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml @@ -1,16 +1,26 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 30e6 tests: bluetooth.host.l2cap.credits: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bluetooth.host.l2cap.credits_ecred: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_prj_conf_overlay-ecred_conf - extra_args: EXTRA_CONF_FILE="overlay-ecred.conf" + bsim_devices: + - test_id: central + - test_id: peripheral + extra_args: EXTRA_CONF_FILE=overlay-ecred.conf diff --git a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh deleted file mode 100755 index 5595dde430cd4..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id=$(guess_test_long_name) -bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=420 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=100 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh deleted file mode 100755 index b58c32f6aab75..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id=$(guess_test_long_name)_ecred -bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf_overlay-ecred_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=420 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=100 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml index 47ecd4484ab20..63422d97dd664 100644 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml @@ -1,16 +1,26 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 30e6 tests: bluetooth.host.l2cap.credits_seg_recv: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_seg_recv_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bluetooth.host.l2cap.credits_seg_recv_ecred: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_seg_recv_prj_conf_overlay-ecred_conf - extra_args: EXTRA_CONF_FILE="overlay-ecred.conf" + bsim_devices: + - test_id: central + - test_id: peripheral + extra_args: EXTRA_CONF_FILE=overlay-ecred.conf diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh deleted file mode 100755 index 5595dde430cd4..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id=$(guess_test_long_name) -bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=420 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=100 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh deleted file mode 100755 index b58c32f6aab75..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id=$(guess_test_long_name)_ecred -bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf_overlay-ecred_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=420 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=100 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml index b39bfa0e73dad..80ed65ff7410f 100644 --- a/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.l2cap.ecred.dut: + bluetooth.host.l2cap.ecred.build_dut: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml index ee61e8ce24653..aa11b4ddcb4a5 100644 --- a/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.l2cap.ecred.peer: + bluetooth.host.l2cap.ecred.build_peer: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh deleted file mode 100755 index 43ac0f88e659b..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" - -simulation_id=${test_name} -verbosity_level=2 - -SIM_LEN_US=$((1 * 1000 * 1000)) - -dut_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_dut_prj_conf" -peer_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_peer_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "${dut_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=dut -Execute "${peer_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69 -testid=peer - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/ecred/testcase.yaml new file mode 100644 index 0000000000000..088c032648677 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/ecred/testcase.yaml @@ -0,0 +1,17 @@ +tests: + bluetooth.host.l2cap.ecred.peer: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: dut + exe: tests_bsim_bluetooth_host_l2cap_ecred_dut_prj_conf + - test_id: peer + exe: tests_bsim_bluetooth_host_l2cap_ecred_peer_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh deleted file mode 100755 index b86db52d9dfc0..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" -simulation_id=${test_name} -verbosity_level=2 -EXECUTE_TIMEOUT=120 -SIM_LEN_US=$((2 * 1000 * 1000)) - -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 \ - -testid=l2cap/einprogress/dut -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 \ - -testid=l2cap/einprogress/tester - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml index 1fb1c7906842c..bfd4b46acf14b 100644 --- a/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml @@ -1,10 +1,15 @@ tests: bluetooth.host.l2cap.einprogress: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_einprogress_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: l2cap/einprogress/dut + - test_id: l2cap/einprogress/tester diff --git a/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml index 16fece81fb5a9..9d702041b490b 100644 --- a/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml @@ -1,10 +1,15 @@ tests: bluetooth.host.l2cap.general: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_general_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_devices: + - test_id: central + - test_id: peripheral diff --git a/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh deleted file mode 100755 index 3784ccfa1e0cc..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# EATT test -simulation_id="l2cap_ecred" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_general_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=43 - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_general_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=42 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml index 4ed273d8e477c..5837a704d7374 100644 --- a/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml @@ -1,10 +1,18 @@ tests: bluetooth.host.l2cap.many_conns: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_many_conns_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: central + - test_id: peripheral + - test_id: peripheral + - test_id: peripheral + - test_id: peripheral diff --git a/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh deleted file mode 100755 index ee3c308f57437..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="l2cap_many_conns" - -bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_many_conns_prj_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -s=${simulation_id} -d=0 -testid=central -rs=42 - -Execute "${bsim_exe}" -s=${simulation_id} -d=1 -testid=peripheral -rs=1 -Execute "${bsim_exe}" -s=${simulation_id} -d=2 -testid=peripheral -rs=2 -Execute "${bsim_exe}" -s=${simulation_id} -d=3 -testid=peripheral -rs=3 -Execute "${bsim_exe}" -s=${simulation_id} -d=4 -testid=peripheral -rs=4 - -Execute ./bs_2G4_phy_v1 -s=${simulation_id} -D=5 -sim_length=10e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh deleted file mode 100755 index 1e4752d2c4aea..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" - -simulation_id=${test_name} - -SIM_LEN_US=$((40 * 1000 * 1000)) - -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -dump_imm -s=${simulation_id} -D=3 -sim_length=${SIM_LEN_US} $@ - -Execute "${test_exe}" -s=${simulation_id} -d=0 -rs=420 -RealEncryption=1 -testid=dut - -# Start centrals with an offset, so the CONN_IND packets don't clash on-air. -# Since code executes in zero-time, this will always happen if we don't stagger -# the connection creation somehow. -Execute "${test_exe}" -s=${simulation_id} \ - -d=1 -rs=169 -RealEncryption=1 -testid=central -delay_init -start_offset=1e3 -Execute "${test_exe}" -s=${simulation_id} \ - -d=2 -rs=690 -RealEncryption=1 -testid=central -delay_init -start_offset=10e3 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml index 178daf75091e0..2c030e752698d 100644 --- a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml @@ -1,10 +1,24 @@ tests: bluetooth.host.l2cap.multilink_peripheral: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_multilink_peripheral_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 40e6 + bsim_devices: + - test_id: dut + - test_id: central + options: + - -delay_init + - -start_offset=1e3 + - test_id: cenrtal + options: + - -delay_init + - -start_offset=10e3 + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml index 523e13549f6d9..0a6c6a45ed547 100644 --- a/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.l2cap.reassembly.dut: + bluetooth.host.l2cap.reassembly.build_dut: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml index 809d15fa87ae7..036da17914ee0 100644 --- a/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.l2cap.reassembly.peer: + bluetooth.host.l2cap.reassembly.build_peer: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh deleted file mode 100755 index 8a50896d8d525..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" -simulation_id=${test_name} - -verbosity_level=2 - -# Ten-second (maximum) sim time. -# The test will exit simulation as soon as it has passed. -SIM_LEN_US=$((10 * 1000 * 1000)) - -dut_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_dut_prj_conf" -peer_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_peer_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -Execute "${peer_exe}" -v=${verbosity_level} -s=${simulation_id} \ - -d=1 -rs=69 -testid=peer - -Execute "${dut_exe}" -v=${verbosity_level} -s=${simulation_id} \ - -d=0 -rs=420 -testid=dut -argstest log_level 3 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/reassembly/testcase.yaml new file mode 100644 index 0000000000000..257c289b17389 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/testcase.yaml @@ -0,0 +1,21 @@ +tests: + bluetooth.host.l2cap.reassembly.test: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: dut + exe: tests_bsim_bluetooth_host_l2cap_reassembly_dut_prj_conf + options: + - -argstest + - log_level + - '3' + - test_id: peer + exe: tests_bsim_bluetooth_host_l2cap_reassembly_peer_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml index 36ee2712a43d7..749e2c4576a94 100644 --- a/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml @@ -1,18 +1,28 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet + timeout: 120 harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 30e6 tests: bluetooth.host.l2cap.send_on_connect: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bluetooth.host.l2cap.send_on_connect_ecred: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf_overlay-ecred_conf + bsim_devices: + - test_id: central + - test_id: peripheral extra_args: EXTRA_CONF_FILE=overlay-ecred.conf diff --git a/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh deleted file mode 100755 index d7b8abd67ca94..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="l2cap_send_on_connect" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs - -simulation_id="l2cap_send_on_connect_ecred" - -cd ${BSIM_OUT_PATH}/bin - -Execute \ - ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf_overlay-ecred_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central - -Execute \ - ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf_overlay-ecred_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml index 29005c8fb7144..559df7bfc55d5 100644 --- a/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.l2cap.split.dut: + bluetooth.host.l2cap.split.build_dut: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh b/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh deleted file mode 100755 index fe3c34950252a..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -dut_exe="bs_${BOARD_TS}_$(guess_test_long_name)_dut_prj_conf" -tester_exe="bs_${BOARD_TS}_$(guess_test_long_name)_tester_prj_conf" - -simulation_id="l2cap_split" -verbosity_level=2 -sim_length_us=30e6 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=${sim_length_us} $@ -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=test_0 -RealEncryption=1 -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=test_0 -RealEncryption=1 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/split/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/split/testcase.yaml new file mode 100644 index 0000000000000..042b565dad4e9 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/split/testcase.yaml @@ -0,0 +1,19 @@ +tests: + bluetooth.host.l2cap.split.test: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_devices: + - test_id: test_0 + exe: tests_bsim_bluetooth_host_l2cap_split_dut_prj_conf + - test_id: test_0 + exe: tests_bsim_bluetooth_host_l2cap_split_tester_prj_conf + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml index 37557f4faeab6..5cb26eb4c9369 100644 --- a/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.l2cap.split.tester: + bluetooth.host.l2cap.split.build_tester: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml index f872f5873dae8..a5250d36b93d5 100644 --- a/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml @@ -1,20 +1,33 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 240 harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 400e6 + bsim_devices: + - test_id: central + - test_id: peripheral + - test_id: peripheral + - test_id: peripheral + - test_id: peripheral + - test_id: peripheral + - test_id: peripheral tests: bluetooth.host.l2cap.stress: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_stress_prj_conf + bluetooth.host.l2cap.stress_nofrag: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_stress_prj_conf_overlay-nofrag_conf - extra_args: EXTRA_CONF_FILE="overlay-nofrag.conf" + extra_args: EXTRA_CONF_FILE=overlay-nofrag.conf + bluetooth.host.l2cap.stress_syswq: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_stress_prj_conf_overlay-syswq_conf - extra_args: EXTRA_CONF_FILE="overlay-syswq.conf" + extra_args: EXTRA_CONF_FILE=overlay-syswq.conf diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh deleted file mode 100755 index 975a5abd232c8..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# EATT test -simulation_id="l2cap_stress" -verbosity_level=2 -EXECUTE_TIMEOUT=240 - -bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_stress_prj_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=43 - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=42 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral -rs=10 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=3 -testid=peripheral -rs=23 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=4 -testid=peripheral -rs=7884 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=5 -testid=peripheral -rs=230 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=6 -testid=peripheral -rs=9 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=7 -sim_length=400e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh deleted file mode 100755 index 7183d4b016319..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# EATT test -simulation_id="l2cap_stress_nofrag" -verbosity_level=2 -EXECUTE_TIMEOUT=240 - -bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_stress_prj_conf_overlay-nofrag_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=43 - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=42 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral -rs=10 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=3 -testid=peripheral -rs=23 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=4 -testid=peripheral -rs=7884 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=5 -testid=peripheral -rs=230 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=6 -testid=peripheral -rs=9 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=7 -sim_length=400e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh deleted file mode 100755 index 57fcf1747b689..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# EATT test -simulation_id="l2cap_stress_syswq" -verbosity_level=2 -EXECUTE_TIMEOUT=240 - -bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_stress_prj_conf_overlay-syswq_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=43 - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=42 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral -rs=10 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=3 -testid=peripheral -rs=23 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=4 -testid=peripheral -rs=7884 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=5 -testid=peripheral -rs=230 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=6 -testid=peripheral -rs=9 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=7 -sim_length=400e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml index e07a92386497b..bf84e47abc128 100644 --- a/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml +++ b/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml @@ -1,10 +1,15 @@ tests: bluetooth.host.l2cap.userdata: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_l2cap_userdata_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 5e6 + bsim_devices: + - test_id: central + - test_id: peripheral diff --git a/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh deleted file mode 100755 index e5bcdd078c0d9..0000000000000 --- a/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="l2cap_ecred_userdata" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_userdata_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_userdata_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=5e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh deleted file mode 100755 index e742f59b18f00..0000000000000 --- a/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" -simulation_id=${test_name} -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -# sixty-second (maximum) sim time. -# The test will exit simulation as soon as it has passed. -SIM_LEN_US=$((60 * 1000 * 1000)) - -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=dut \ - -argstest log_level 3 -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69 -testid=peer \ - -argstest log_level 3 >/dev/null - -Execute ./bs_2G4_phy_v1 -defmodem=BLE_simple \ - -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml b/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml index 5ea6173ebd482..b96564e5f9aa5 100644 --- a/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml @@ -1,10 +1,21 @@ tests: bluetooth.host.mics.acl_tx_frag: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 120 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_misc_acl_tx_frag_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_devices: + - test_id: dut + - test_id: peer + bsim_options: + - -argstest + - log_level + - '3' + bsim_phy_options: + - -defmodem=BLE_simple diff --git a/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml b/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml index b9f979a22ea82..5d4bc550e154a 100644 --- a/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.misc.conn_stress.central: + bluetooth.host.misc.conn_stress.build_central: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml b/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml index db3c539ffae44..4d48fffa458d1 100644 --- a/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.misc.conn_stress.peripheral: + bluetooth.host.misc.conn_stress.build_peripheral: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/misc/disable/testcase.yaml b/tests/bsim/bluetooth/host/misc/disable/testcase.yaml index a4ef16acb14f8..06fabbd7d95cb 100644 --- a/tests/bsim/bluetooth/host/misc/disable/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/disable/testcase.yaml @@ -1,11 +1,37 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + - nrf5340bsim/nrf5340/cpunet + timeout: 120 + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_disable_prj_conf + bsim_verbosity: 2 + tests: - bluetooth.host.mics.disable: + bluetooth.host.mics.build_disable: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - - nrf5340bsim/nrf5340/cpunet - harness: bsim + + bluetooth.host.mics.disable: + no_build: true + harness_config: + bsim_sim_length: 60e6 + bsim_devices: + - test_id: disable + + bluetooth.host.mics.disable_with_gatt: + no_build: true + harness_config: + bsim_sim_length: 600e6 + bsim_devices: + - test_id: gatt_client + - test_id: gatt_server + + bluetooth.host.mics.disable_set_default_id: + no_build: true harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_misc_disable_prj_conf + bsim_sim_length: 10e6 + bsim_devices: + - test_id: disable_set_default_id diff --git a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh deleted file mode 100755 index 0be9af35e7a71..0000000000000 --- a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# Disable test: bt_enable and bt_disable are called in a loop. -simulation_id="disable_test" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=disable - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh deleted file mode 100755 index 437dcdff139af..0000000000000 --- a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# Disable test: bt_enable and bt_disable are called in a loop. -# Each iteration the default ID is updated -simulation_id="disable_test_set_default_id" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=disable_set_default_id - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=10e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh deleted file mode 100755 index f81a8fe6e4d12..0000000000000 --- a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# Disable with GATT test: A central acting as a GATT client scans for and connects -# to a peripheral acting as a GATT server. The GATT client will then attempt -# to write and read to and from a few GATT characteristics. Both the central and -# peripheral then disable bluetooth and the test repeats. -simulation_id="disable_with_gatt" -verbosity_level=2 -EXECUTE_TIMEOUT=120 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client - -Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=gatt_server - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=600e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml b/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml index c778299fd775c..43fc6d6b3c51f 100644 --- a/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.misc.disconnect.dut: + bluetooth.host.misc.disconnect.build_dut: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh b/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh deleted file mode 100755 index ada291fa88aa3..0000000000000 --- a/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -dut_exe="bs_${BOARD_TS}_$(guess_test_long_name)_dut_prj_conf" -tester_exe="bs_${BOARD_TS}_$(guess_test_long_name)_tester_prj_conf" - -simulation_id="misc_disconnect" -verbosity_level=2 -sim_length_us=10e6 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 \ - -v=${verbosity_level} -s="${simulation_id}" -D=2 -sim_length=${sim_length_us} $@ - -Execute "./$tester_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=tester -RealEncryption=0 -rs=100 - -Execute "./$dut_exe" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=dut -RealEncryption=0 - -# wait_for_background_jobs, but doesn't exit on error -exit_code=0 -for process_id in $_process_ids; do -wait $process_id || let "exit_code=$?" -done - -# Make pcaps -for j in {0..1}; do - i=$(printf '%02i' $j) - - ${BSIM_OUT_PATH}/components/ext_2G4_phy_v1/dump_post_process/csv2pcap -o \ - ${BSIM_OUT_PATH}/results/${simulation_id}/Trace_$i.Tx.pcap \ - ${BSIM_OUT_PATH}/results/${simulation_id}/d_2G4_$i.Tx.csv - - ${BSIM_OUT_PATH}/components/ext_2G4_phy_v1/dump_post_process/csv2pcap -o \ - ${BSIM_OUT_PATH}/results/${simulation_id}/Trace_$i.Rx.pcap \ - ${BSIM_OUT_PATH}/results/${simulation_id}/d_2G4_$i.Rx.csv - - echo "${BSIM_OUT_PATH}/results/${simulation_id}/Trace_$i.Tx.pcap" - echo "${BSIM_OUT_PATH}/results/${simulation_id}/Trace_$i.Rx.pcap" -done - -exit $exit_code diff --git a/tests/bsim/bluetooth/host/misc/disconnect/testcase.yaml b/tests/bsim/bluetooth/host/misc/disconnect/testcase.yaml new file mode 100644 index 0000000000000..ab15352fb183c --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/disconnect/testcase.yaml @@ -0,0 +1,19 @@ +tests: + bluetooth.host.misc.disconnect.test: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: dut + exe: tests_bsim_bluetooth_host_misc_disconnect_dut_prj_conf + - test_id: tester + exe: tests_bsim_bluetooth_host_misc_disconnect_tester_prj_conf + bsim_options: + - -RealEncryption=0 diff --git a/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml b/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml index 337d4f9829e7e..993550aeb725c 100644 --- a/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.misc.disconnect.tester: + bluetooth.host.misc.disconnect.build_tester: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh deleted file mode 100755 index cc5eef568b2b1..0000000000000 --- a/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="misc_hfc" -verbosity_level=2 -EXECUTE_TIMEOUT=240 - -cd ${BSIM_OUT_PATH}/bin - -bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_hfc_prj_conf - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=dut -rs=420 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peer -rs=69 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml index b8d24f8d18f26..a714a62e6e1d3 100644 --- a/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml @@ -1,10 +1,15 @@ tests: bluetooth.host.mics.hfc: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 240 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_misc_hfc_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_devices: + - test_id: dut + - test_id: peer diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml index 2cb24db1258aa..9666e79d52433 100644 --- a/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.misc.hfc_multilink.dut: + bluetooth.host.misc.hfc_multilink.build_dut: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh deleted file mode 100755 index c71b125d52589..0000000000000 --- a/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" - -simulation_id=${test_name} -verbosity_level=2 - -# Simulated test runtime (as seen by Zephyr and the PHY) -# The test will be terminated much earlier if it passes -SIM_LEN_US=$((10 * 1000 * 1000)) - -tester_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_tester_prj_conf" -dut_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_dut_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=4 -sim_length=${SIM_LEN_US} $@ - -Execute "${dut_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=dut - -Execute "${tester_exe}" -s=${simulation_id} -d=1 -rs=100 -testid=tester -Execute "${tester_exe}" -s=${simulation_id} -d=2 -rs=200 -testid=tester -Execute "${tester_exe}" -s=${simulation_id} -d=3 -rs=300 -testid=tester - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc_multilink/testcase.yaml new file mode 100644 index 0000000000000..c0c314bf7464d --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/testcase.yaml @@ -0,0 +1,21 @@ +tests: + bluetooth.host.misc.hfc_multilink.test: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + timeout: 30 + harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 10e6 + bsim_devices: + - test_id: dut + exe: tests_bsim_bluetooth_host_misc_hfc_multilink_dut_prj_conf + - test_id: tester + exe: tests_bsim_bluetooth_host_misc_hfc_multilink_tester_prj_conf + - test_id: tester + exe: tests_bsim_bluetooth_host_misc_hfc_multilink_tester_prj_conf + - test_id: tester + exe: tests_bsim_bluetooth_host_misc_hfc_multilink_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml index b9dd7b87913e3..5e52bfd8a7116 100644 --- a/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.misc.hfc_multilink.tester: + bluetooth.host.misc.hfc_multilink.build_tester: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh deleted file mode 100755 index cf96e025b2dc2..0000000000000 --- a/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -# Provides common functions for bsim tests. -# Mainly `Execute`, and `wait_for_background_jobs`. -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -# Helper variable. Expands to "tests_bsim_bluetooth_host_misc_sample_test". -test_name="$(guess_test_long_name)" - -# Use a unique simulation id per test script. It is a necessity as the CI runner -# will run all the test scripts in parallel. If multiple simulations share the -# same ID, they will step on each other's toes in unpredictable ways. -simulation_id=${test_name} - -# This controls the verbosity of the simulator. It goes up to 9 (not 11, sorry) -# and is useful for figuring out what is happening on the PHYsical layer (e.g. -# device 1 starts listening at T=100us) among other things. -# `2` is the default value if not specified. -verbosity_level=2 - -# This sets the watchdog timeout for the `Execute` function. -# -# Although all simulations are started with a bounded end (the `sim_length` -# option), something very wrong can still happen and this additional time-out -# will ensure all executables started by the current script are killed. -# -# It measures wall-clock time, not simulated time. E.g. a test that simulates 5 -# hours might actually complete (have a runtime of) 10 seconds. -# -# The default is set in `sh_common.source`. -# Guidelines to set this value: -# - Do not set it to a value lower or equal to the default. -# - If the test takes over 5 seconds of runtime, set `EXECUTE_TIMEOUT` to at -# least 5 times the run-time on your machine. -EXECUTE_TIMEOUT=120 - -# Set simulation length, in microseconds. The PHY will run for this amount of -# simulated time, unless both devices exit. -# -# If you are not early-exiting the devices (e.g. using `TEST_PASS_AND_EXIT()`), -# please run the test once and set the simulation time in the same ballpark. No -# need to simulate hours of runtime if the test finishes in 10 seconds. -# -SIM_LEN_US=$((2 * 1000 * 1000)) - -# This is the final path of the test executable. -# -# Some tests may have different executable images for each device in the test. -# -# In our case, both test cases are compiled in the same image, and the right one -# will be run depending on what arguments we give the executable. -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -# BabbleSim will by default search for its shared libraries assuming it is -# running in the bin/ directory. Test results will also be placed in -# `${BSIM_OUT_PATH}/results` if not specified. -cd ${BSIM_OUT_PATH}/bin - -# Instantiate all devices in the simulation. -# The `testid` parameter is used to run the right role or procedure (here "dut" vs "tester"). -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -rs=420 -testid=dut \ - -argstest log_level 3 -Execute "${test_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -rs=69 -testid=peer \ - -argstest log_level 3 - -# Start the PHY. Double-check the `-D` parameter: it has to match the number of -# devices started in the lines above. -# -# Also set a maximum simulation length. If the devices have not set a special -# variable indicating they have passed before the simulation runs out of time, -# the test will be reported as "in progress (not passed)". -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=${SIM_LEN_US} $@ - -# Wait until all executables started above have returned. -# The exit code returned will be != 0 if any of them have failed. -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml b/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml index a5e18ce68c37b..7616ad19bf919 100644 --- a/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml @@ -1,10 +1,19 @@ tests: bluetooth.host.mics.sample_test: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_misc_sample_test_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 2e6 + bsim_devices: + - test_id: dut + - test_id: peer + bsim_options: + - -argstest + - log_level + - '3' diff --git a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml index 34deeb368f9e9..aa1798ff927bb 100644 --- a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml +++ b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml @@ -1,11 +1,16 @@ tests: bluetooth.host.mics.unregister_conn_cb: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native - nrf5340bsim/nrf5340/cpunet + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_misc_unregister_conn_cb_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 30e6 + bsim_devices: + - test_id: central + - test_id: peripheral diff --git a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh deleted file mode 100755 index ad2b4dc0bb517..0000000000000 --- a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2024 NXP -# Copyright (c) 2024 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -#Unregister connection callbacks : A central device scans for and connects to a peripheral -#after registered connection callbacks.When the connection state changes, few printing -#will be printed and the flag_is_connected will be changed by the callback function. -#After unregister the connection callbacks, reconnect to peer device, then no printing -#neither flag change can be found, callback function was unregistered as expected -simulation_id="unregister_conn_cb" -verbosity_level=2 - -bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_unregister_conn_cb_prj_conf - -cd ${BSIM_OUT_PATH}/bin - -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=420 -Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -rs=100 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} -D=2 -sim_length=30e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh deleted file mode 100755 index 52a4109788362..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -EXECUTE_TIMEOUT=100 -verbosity_level=2 -simulation_id="$(guess_test_long_name)" - -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh deleted file mode 100755 index 5e15e78517839..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -EXECUTE_TIMEOUT=100 -verbosity_level=2 - -# Test that connection establishment times out when RPA -# timeout is shorter than the connection establishment timeout -simulation_id="test_central_connect_fails_with_short_rpa_timeout" - -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 \ - -testid=central_connect_fails_with_short_rpa_timeout -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=1 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh deleted file mode 100755 index 0ed76b2f86ac2..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -EXECUTE_TIMEOUT=100 -verbosity_level=2 - -# Test connection establishment when the RPA times out before -# we expect the connection to be established -simulation_id="test_central_connect_short_rpa_timeout" - -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 \ - -testid=central_connect_short_rpa_timeout -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 \ - -testid=periph_delayed_start_of_conn_adv -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/central/testcase.yaml b/tests/bsim/bluetooth/host/privacy/central/testcase.yaml index 5c988c2f26fea..b6e14b614588f 100644 --- a/tests/bsim/bluetooth/host/privacy/central/testcase.yaml +++ b/tests/bsim/bluetooth/host/privacy/central/testcase.yaml @@ -1,11 +1,37 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + - nrf5340bsim/nrf5340/cpunet + timeout: 100 + harness: bsim + no_build: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_central_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + tests: - bluetooth.host.privacy.central: + bluetooth.host.privacy.build_central: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - - nrf5340bsim/nrf5340/cpunet - harness: bsim + no_build: false + + bluetooth.host.privacy.central: + harness_config: + bsim_devices: + - test_id: central + - test_id: peripheral + + bluetooth.host.privacy.central_short_conn_timeout: + harness_config: + bsim_devices: + - test_id: central_connect_fails_with_short_rpa_timeout + + bluetooth.host.privacy.central_short_rpa_timeout: harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_privacy_central_prj_conf + bsim_devices: + - test_id: central_connect_short_rpa_timeout + - test_id: periph_delayed_start_of_conn_adv diff --git a/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh b/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh deleted file mode 100755 index 171957b7163bc..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="$(guess_test_long_name)" -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -TEST_ARGS=( - "leg_conn_scan_active" - "leg_conn_nscan_passive" - "ext_nconn_scan_active" - "ext_conn_nscan_passive" -) -TEST_ADDR_TYPE=("identity" "rpa") - -sim_id_count=0 -for args in ${TEST_ARGS[@]}; do - args=($(echo "${args}" | sed 's/_/ /g')) - - use_ext_adv=0 - if [ "${args[0]}" == "ext" ]; then - use_ext_adv=1 - fi - - connectable=0 - if [ "${args[1]}" == "conn" ]; then - connectable=1 - fi - - scannable=0 - if [ "${args[2]}" == "scan" ]; then - scannable=1 - fi - - use_active_scan=0 - if [ "${args[3]}" == "active" ]; then - use_active_scan=1 - fi - - for addr_type in "${TEST_ADDR_TYPE[@]}"; do - echo "Starting iteration $sim_id_count: ${args[@]} $addr_type" - echo "################################################" - - Execute "$test_exe" \ - -v=${verbosity_level} -s="${simulation_id}_${sim_id_count}" -d=0 -testid=central \ - -RealEncryption=1 -argstest sim-id=${sim_id_count} connection-test=${connectable} \ - active-scan=${use_active_scan} addr-type="${addr_type}" - - Execute "$test_exe" \ - -v=${verbosity_level} -s="${simulation_id}_${sim_id_count}" -d=1 -testid=peripheral \ - -RealEncryption=1 -argstest sim-id=${sim_id_count} addr-type="${addr_type}" \ - use-ext-adv=${use_ext_adv} scannable=${scannable} connectable=${connectable} - - Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}_${sim_id_count}" \ - -D=2 -sim_length=20e6 $@ - - wait_for_background_jobs - - sim_id_count=$(( sim_id_count + 1 )) - done -done diff --git a/tests/bsim/bluetooth/host/privacy/device/testcase.yaml b/tests/bsim/bluetooth/host/privacy/device/testcase.yaml index 926f8ad59f9e5..b488267c019a4 100644 --- a/tests/bsim/bluetooth/host/privacy/device/testcase.yaml +++ b/tests/bsim/bluetooth/host/privacy/device/testcase.yaml @@ -1,10 +1,155 @@ +common: + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + no_build: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_device_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + - -argstest + tests: - bluetooth.host.privacy.device: + bluetooth.host.privacy.build_device: build_only: true - tags: - - bluetooth - platform_allow: - - nrf52_bsim/native - harness: bsim + no_build: false + bluetooth.host.privacy.leg_conn_scan_active_identity: harness_config: - bsim_exe_name: tests_bsim_bluetooth_host_privacy_device_prj_conf + bsim_devices: + - test_id: central + options: + - sim-id=0 + - addr-type=identity + - connection-test=1 + - active-scan=1 + - test_id: peripheral + options: + - sim-id=0 + - addr-type=identity + - use-ext-adv=0 + - scannable=1 + - connectable=1 + + bluetooth.host.privacy.leg_conn_scan_active_rpa: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=1 + - addr-type=rpa + - connection-test=1 + - active-scan=1 + - test_id: peripheral + options: + - sim-id=1 + - addr-type=rpa + - use-ext-adv=0 + - scannable=1 + - connectable=1 + + bluetooth.host.privacy.leg_conn_nscan_passive_identity: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=2 + - addr-type=identity + - connection-test=1 + - active-scan=0 + - test_id: peripheral + options: + - sim-id=2 + - addr-type=identity + - use-ext-adv=0 + - scannable=0 + - connectable=1 + + bluetooth.host.privacy.leg_conn_nscan_passive_rpa: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=3 + - addr-type=rpa + - connection-test=1 + - active-scan=0 + - test_id: peripheral + options: + - sim-id=3 + - addr-type=rpa + - use-ext-adv=0 + - scannable=0 + - connectable=1 + + bluetooth.host.privacy.ext_nconn_scan_active_identity: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=4 + - addr-type=identity + - connection-test=0 + - active-scan=1 + - test_id: peripheral + options: + - sim-id=4 + - addr-type=identity + - use-ext-adv=1 + - scannable=1 + - connectable=0 + + bluetooth.host.privacy.ext_nconn_scan_active_rpa: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=5 + - addr-type=rpa + - connection-test=0 + - active-scan=1 + - test_id: peripheral + options: + - sim-id=5 + - addr-type=rpa + - use-ext-adv=1 + - scannable=1 + - connectable=0 + + bluetooth.host.privacy.ext_conn_nscan_passive_identity: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=6 + - addr-type=identity + - connection-test=1 + - active-scan=0 + - test_id: peripheral + options: + - sim-id=6 + - addr-type=identity + - use-ext-adv=1 + - scannable=0 + - connectable=1 + + bluetooth.host.privacy.ext_conn_nscan_passive_rpa: + harness_config: + bsim_devices: + - test_id: central + options: + - sim-id=7 + - addr-type=rpa + - connection-test=1 + - active-scan=0 + - test_id: peripheral + options: + - sim-id=7 + - addr-type=rpa + - use-ext-adv=1 + - scannable=0 + - connectable=1 diff --git a/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh deleted file mode 100755 index 2e83ef3857a74..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="$(guess_test_long_name)" -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml b/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml index ba3d318e3722c..b09317d768502 100644 --- a/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml +++ b/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.privacy.legacy: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_privacy_legacy_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 70e6 + bsim_devices: + - test_id: central + - test_id: peripheral + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh deleted file mode 100755 index f813bf1d86f59..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="host_privacy_peripheral" -EXECUTE_TIMEOUT=240 - -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 \ - -flash="${simulation_id}.central.log.bin" -flash_erase - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 \ - -flash="${simulation_id}.peripheral.log.bin" -flash_erase - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id}.2 -d=0 -testid=central -RealEncryption=1 \ - -flash="${simulation_id}.central.log.bin" -flash_rm - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id}.2 -d=1 -testid=peripheral -RealEncryption=1 \ - -flash="${simulation_id}.peripheral.log.bin" -flash_rm - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id}.2 \ - -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh deleted file mode 100755 index 90cb146fe798f..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="rpa_expired" -EXECUTE_TIMEOUT=240 - -central_exe_rpa_expired="\ -${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_rpa_expired_conf" -peripheral_exe_rpa_expired="${central_exe_rpa_expired}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe_rpa_expired" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_rpa_check \ - -RealEncryption=1 -flash="${simulation_id}.central.log.bin" -flash_erase - -Execute "$peripheral_exe_rpa_expired" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_rpa_expired \ - -RealEncryption=1 -flash="${simulation_id}.peripheral.log.bin" -flash_erase - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh deleted file mode 100755 index 49daf4e5a86db..0000000000000 --- a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="$(guess_test_long_name)_rpa_sharing" -EXECUTE_TIMEOUT=240 - -central_exe_rpa_sharing="\ -${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_rpa_sharing_conf" -peripheral_exe_rpa_sharing="${central_exe_rpa_sharing}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe_rpa_sharing" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 \ - -flash="${simulation_id}.central.log.bin" - -Execute "$peripheral_exe_rpa_sharing" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 \ - -flash="${simulation_id}.peripheral.log.bin" - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs - -Execute "$central_exe_rpa_sharing" \ - -v=${verbosity_level} -s=${simulation_id}_2 -d=0 -testid=central -RealEncryption=1 \ - -flash="${simulation_id}.central.log.bin" -flash_rm - -Execute "$peripheral_exe_rpa_sharing" \ - -v=${verbosity_level} -s=${simulation_id}_2 -d=1 -testid=peripheral -RealEncryption=1 \ - -flash="${simulation_id}.peripheral.log.bin" -flash_rm - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id}_2 \ - -D=2 -sim_length=70e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml b/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml index fa308533568cd..dab342b96a411 100644 --- a/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml +++ b/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml @@ -1,22 +1,94 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 240 harness: bsim + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 70e6 + bsim_options: + - -RealEncryption=1 tests: - bluetooth.host.privacy.peripheral: + bluetooth.host.privacy.build_peripheral: + build_only: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_conf + + bluetooth.host.privacy.build_peripheral_rpa_sharing: + build_only: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_rpa_sharing_conf + extra_args: + EXTRA_CONF_FILE=prj_rpa_sharing.conf + + bluetooth.host.privacy.peripheral_1: + no_build: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_conf + bsim_devices: + - test_id: central + options: + - -flash=privacy_peripheral.central.log.bin + - -flash_erase + - test_id: peripheral + options: + - -flash=privacy_peripheral.peripheral.log.bin + - -flash_erase + + bluetooth.host.privacy.peripheral_2: + no_build: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_conf + bsim_devices: + - test_id: central + options: + - -flash=privacy_peripheral.central.log.bin + - -flash_rm + - test_id: peripheral + options: + - -flash=privacy_peripheral.peripheral.log.bin + - -flash_rm + bluetooth.host.privacy.peripheral_rpa_expired: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_rpa_expired_conf + bsim_devices: + - test_id: central_rpa_check + options: + - -flash=rpa_expired.central.log.bin + - -flash_erase + - test_id: peripheral_rpa_expired + options: + - -flash=rpa_expired.peripheral.log.bin + - -flash_erase extra_args: EXTRA_CONF_FILE=prj_rpa_expired.conf - bluetooth.host.privacy.peripheral_rpa_sharing: + + bluetooth.host.privacy.peripheral_rpa_sharing_1: + no_build: true harness_config: bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_rpa_sharing_conf - extra_args: - EXTRA_CONF_FILE=prj_rpa_sharing.conf + bsim_devices: + - test_id: central + options: + - -flash=rpa_sharing.central.log.bin + - test_id: peripheral + options: + - -flash=rpa_sharing.peripheral.log.bin + + bluetooth.host.privacy.peripheral_rpa_sharing_2: + no_build: true + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_rpa_sharing_conf + bsim_devices: + - test_id: central + options: + - -flash=rpa_sharing.central.log.bin + - -flash_rm + - test_id: peripheral + options: + - -flash=rpa_sharing.peripheral.log.bin + - -flash_rm diff --git a/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh b/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh deleted file mode 100755 index 0b893952d32e7..0000000000000 --- a/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name="$(guess_test_long_name)" -test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" - -simulation_id=${test_name} -verbosity_level=2 -zephyr_log_level=3 - -cd ${BSIM_OUT_PATH}/bin - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" \ - -D=2 -sim_length=100e6 - -Execute "${test_exe}" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 \ - -testid=peer -argstest log_level ${zephyr_log_level} - -Execute "${test_exe}" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 \ - -testid=dut -argstest log_level ${zephyr_log_level} - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/scan/slow/testcase.yaml b/tests/bsim/bluetooth/host/scan/slow/testcase.yaml index 348aaac15443d..010700dd197e4 100644 --- a/tests/bsim/bluetooth/host/scan/slow/testcase.yaml +++ b/tests/bsim/bluetooth/host/scan/slow/testcase.yaml @@ -1,10 +1,18 @@ tests: bluetooth.host.scan.slow: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_scan_slow_prj_conf + bsim_devices: + - test_id: dut + - test_id: peer + bsim_verbosity: 2 + bsim_sim_length: 100e6 + bsim_options: + - -argstest + - '3' diff --git a/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh b/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh deleted file mode 100755 index 2e172fdde7c97..0000000000000 --- a/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_scan_start_stop_prj_conf" -simulation_id="start_stop" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s="${simulation_id}" -d=0 -testid=scanner - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s="${simulation_id}" -d=1 -testid=periodic_adv - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" \ - -D=2 -sim_length=5e6 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml b/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml index e119d715a7f12..5823cdef7e8b2 100644 --- a/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml +++ b/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml @@ -1,10 +1,15 @@ tests: bluetooth.host.scan.start_stop: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_scan_start_stop_prj_conf + bsim_devices: + - test_id: scanner + - test_id: periodic_adv + bsim_verbosity: 2 + bsim_sim_length: 5e6 diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh deleted file mode 100755 index 1c84dda23ae47..0000000000000 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="security_bond_overwrite_allowed" -verbosity_level=2 - -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml index 37716b25446e3..24ce43c227fac 100644 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.security.bond_overwrite_allowed: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_bond_overwrite_allowed_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh deleted file mode 100755 index ea61a870aa26e..0000000000000 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -simulation_id="security_bond_overwrite_denied" -verbosity_level=2 -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml index a9e9ab835a513..2f3d995a98b47 100644 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.security.bond_overwrite_denied: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_bond_overwrite_denied_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh deleted file mode 100755 index d7c87b399c030..0000000000000 --- a/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 - -simulation_id="security_bond_per_connection" - -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" -peripheral_exe="${central_exe}" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml b/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml index a909fdc2a5c6b..2db04b0b86ff6 100644 --- a/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.security.bond_per_connection: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native + timeout: 30 harness: bsim harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_bond_per_connection_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_no_lazy_load.sh b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/_ccc_update.sh similarity index 61% rename from tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_no_lazy_load.sh rename to tests/bsim/bluetooth/host/security/ccc_update/test_scripts/_ccc_update.sh index 7dcda55ce497d..4a6296b539286 100755 --- a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_no_lazy_load.sh +++ b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/_ccc_update.sh @@ -5,30 +5,12 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_name='ccc_update' -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_overlay-no_lazy_load_conf" +test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_prj_conf" simulation_id="${test_name}_no_lazy_load" verbosity_level=2 cd ${BSIM_OUT_PATH}/bin -if [ "${1}" != 'debug0' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" != 'debug1' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \ - -flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" != 'debug2' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -fi - Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ -D=3 -sim_length=60e6 diff --git a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh deleted file mode 100755 index bb4aab2b0dcc3..0000000000000 --- a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name='ccc_update' -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_prj_conf" -simulation_id="${test_name}" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -if [ "${1}" != 'debug0' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" != 'debug1' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \ - -flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" != 'debug2' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -fi - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=3 -sim_length=60e6 - -if [ "${1}" == 'debug0' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" == 'debug1' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \ - -flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" == 'debug2' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -fi - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_no_long_wq.sh b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_no_long_wq.sh deleted file mode 100755 index 425494e429499..0000000000000 --- a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_no_long_wq.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2025 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name='ccc_update' -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_overlay-no_long_wq_conf" -simulation_id="${test_name}_no_long_wq" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -if [ "${1}" != 'debug0' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" != 'debug1' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \ - -flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" != 'debug2' ]; then - Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -fi - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=3 -sim_length=60e6 - -if [ "${1}" == 'debug0' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \ - -flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" == 'debug1' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \ - -flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1 -fi - -if [ "${1}" == 'debug2' ]; then - gdb --args "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \ - -flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1 -fi - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml b/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml index de00313058415..e60a961197e44 100644 --- a/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml @@ -1,22 +1,60 @@ common: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 + harness_config: + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 + - -flash_rm tests: bluetooth.host.security.ccc_update: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_ccc_update_prj_conf + bsim_devices: + - test_id: central + options: + - -flash=ccc_update_client.log.bin + - test_id: bad_central + options: + - -flash=ccc_update_bad_client.log.bin + - test_id: peripheral + options: + - -flash=ccc_update_server.log.bin + bluetooth.host.security.ccc_update_no_lazy_load: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_ccc_update_overlay-no_lazy_load_conf + bsim_devices: + - test_id: central + options: + - -flash=ccc_update_no_lazy_load_client.log.bin + - test_id: bad_central + options: + - -flash=ccc_update_no_lazy_load_bad_client.log.bin + - test_id: peripheral + options: + - -flash=ccc_update_no_lazy_load_server.log.bin extra_args: EXTRA_CONF_FILE=overlay-no_lazy_load.conf + bluetooth.host.security.ccc_update_no_long_wq: harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_ccc_update_overlay-no_long_wq_conf + bsim_devices: + - test_id: central + options: + - -flash=ccc_update_no_long_wq_client.log.bin + - test_id: bad_central + options: + - -flash=ccc_update_no_long_wq_bad_client.log.bin + - test_id: peripheral + options: + - -flash=ccc_update_no_long_wq_server.log.bin extra_args: EXTRA_CONF_FILE=overlay-no_long_wq.conf diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml b/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml index 69d4c329808f7..fd4eec7461e82 100644 --- a/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.security.id_addr_update.central: + bluetooth.host.security.id_addr_update.build_central: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml b/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml index 4b15bf3890ad9..97fdc31595ce6 100644 --- a/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml @@ -1,5 +1,5 @@ tests: - bluetooth.host.security.id_addr_update.peripheral: + bluetooth.host.security.id_addr_update.build_peripheral: build_only: true tags: - bluetooth diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh deleted file mode 100755 index 3ff3d35db0ec5..0000000000000 --- a/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -verbosity_level=2 -simulation_id="id_addr_update" - -test_path="$(guess_test_long_name)" -central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_path}_central_prj_conf" -peripheral_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_path}_peripheral_prj_conf" - -cd ${BSIM_OUT_PATH}/bin - -Execute "$central_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "$peripheral_exe" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 -rs=200 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 $@ - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/testcase.yaml b/tests/bsim/bluetooth/host/security/id_addr_update/testcase.yaml new file mode 100644 index 0000000000000..31fbe6c7dc461 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/id_addr_update/testcase.yaml @@ -0,0 +1,19 @@ +tests: + bluetooth.host.security.id_addr_update.test: + no_build: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim/native + harness: bsim + timeout: 30 + harness_config: + bsim_devices: + - test_id: central + exe: tests_bsim_bluetooth_host_security_id_addr_update_central_prj_conf + - test_id: peripheral + exe: tests_bsim_bluetooth_host_security_id_addr_update_peripheral_prj_conf + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh b/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh deleted file mode 100755 index 287eeeee152dd..0000000000000 --- a/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -source ${ZEPHYR_BASE}/tests/bsim/sh_common.source - -test_name='security_changed_callback' -test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_prj_conf" -simulation_id="${test_name}" -verbosity_level=2 - -cd ${BSIM_OUT_PATH}/bin - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_disconnect_in_sec_cb \ - -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 - -wait_for_background_jobs - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 - -Execute "./${test_exe}" \ - -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_unpair_in_sec_cb \ - -RealEncryption=1 - -Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ - -D=2 -sim_length=60e6 - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml b/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml index a3b2f3a8082c9..417a7367d40ac 100644 --- a/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml +++ b/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml @@ -1,10 +1,17 @@ tests: bluetooth.host.security.security_changed_callback: - build_only: true tags: - bluetooth platform_allow: - nrf52_bsim/native harness: bsim + timeout: 30 harness_config: bsim_exe_name: tests_bsim_bluetooth_host_security_security_changed_callback_prj_conf + bsim_devices: + - test_id: central + - test_id: peripheral_disconnect_in_sec_cb + bsim_verbosity: 2 + bsim_sim_length: 60e6 + bsim_options: + - -RealEncryption=1 diff --git a/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt b/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt index aa326918c904d..1d9d73630db5c 100644 --- a/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt +++ b/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt @@ -2,15 +2,3 @@ # built in the net core) # This file is used in CI to select which tests are run tests/bsim/bluetooth/ll/ -tests/bsim/bluetooth/host/att/eatt_notif -tests/bsim/bluetooth/host/misc/disable -tests/bsim/bluetooth/host/misc/unregister_conn_cb -tests/bsim/bluetooth/host/adv/periodic -tests/bsim/bluetooth/host/adv/extended -tests/bsim/bluetooth/host/adv/chain -tests/bsim/bluetooth/host/l2cap/send_on_connect -tests/bsim/bluetooth/host/central -tests/bsim/bluetooth/host/privacy/central -tests/bsim/bluetooth/host/gatt/authorization -tests/bsim/bluetooth/host/gatt/general -tests/bsim/bluetooth/host/gatt/caching diff --git a/tests/bsim/ci.bt.sh b/tests/bsim/ci.bt.sh index cce0d6364d691..8716d808b32b9 100755 --- a/tests/bsim/ci.bt.sh +++ b/tests/bsim/ci.bt.sh @@ -19,6 +19,8 @@ RESULTS_FILE=${ZEPHYR_BASE}/bsim_out/bsim_results.bt.52.xml \ TESTS_FILE=tests/bsim/bluetooth/tests.nrf52bsim.txt \ tests/bsim/run_parallel.sh +west twister -T ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/ -p nrf52_bsim/native + # nrf5340bsim/nrf5340/cpunet set: nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh @@ -27,6 +29,8 @@ RESULTS_FILE=${ZEPHYR_BASE}/bsim_out/bsim_results.bt.53_cpunet.xml \ TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt \ tests/bsim/run_parallel.sh +west twister -T ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/ -p nrf5340bsim/nrf5340/cpunet + # nrf5340 split stack set: nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh