diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 249636e9b5f3c2..a11e2786477b52 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -24,31 +24,8 @@ concurrency: jobs: - validate_zzz: - name: Chef - Validate cached ZAP output - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - container: - image: connectedhomeip/chip-build:0.5.79 - options: --user root - steps: - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Chef validate zzz - shell: bash - run: | - cd examples/chef - python3 chef.py --validate_zzz - chef_linux: name: Chef - Linux CI Examples - needs: validate_zzz runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -72,7 +49,6 @@ jobs: chef_esp32: name: Chef - ESP32 CI Examples - needs: validate_zzz runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -96,7 +72,6 @@ jobs: chef_nrfconnect: name: Chef - NRFConnect CI Examples - needs: validate_zzz runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/rebase.yaml b/.github/workflows/rebase.yaml deleted file mode 100644 index 6e4e361310ba5b..00000000000000 --- a/.github/workflows/rebase.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Automatic Rebase -on: - issue_comment: - types: [created] -jobs: - rebase: - name: Rebase - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') - runs-on: ubuntu-latest - steps: - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - fetch-depth: 0 - token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Automatic Rebase - uses: cirrus-actions/rebase@1.4 - env: - GITHUB_TOKEN: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} diff --git a/examples/chef/README.md b/examples/chef/README.md index 91da0db5201682..cacd895b2c0342 100644 --- a/examples/chef/README.md +++ b/examples/chef/README.md @@ -61,61 +61,11 @@ Run `chef.py -h` to see the available commands ## CI -### zzz_generated - -To eliminate a dependency on ZAP in CI jobs, all chef examples found in -`examples/chef/devices` must have their output from the ZAP tool cached in -`examples/chef/zzz_generated`. - -To generate the cache, one may execute chef with the option `--generate_zzz`. -This will run ZAP for all devices in `examples/chef/devices` and place the -output into the appropriate directory structure. - -Other than the output from the ZAP tool, the cache directory contains two -additional files for each device: - -- `INPUTMD5.txt` contains the md5 hex digest of the ZAP file used to generate - the directory. -- `ZAPSHA.txt` contains the commit of ZAP in the user's tree when the - directory was generated. - -``` -zzz_generated/ -└── lighting-app - ├── INPUTMD5.txt - ├── zap-generated - │   ├── access.h - │   ├── af-gen-event.h - │   └── ... - └── ZAPSHA.txt -``` - -These additional files will be used by the CI jobs to validate whether the cache -must be regenerated i.e. regeneration is needed when ZAP or the input ZAP files -change. - -### Workflow - All CI jobs for chef can be found in `.github/workflows/chef.yaml`. -#### Validate - -The workflow begins by calling chef with `--validate_zzz`. - -`--validate_zzz` will recalculate the current ZAP commit and the md5 of all -example ZAP files and compare with what is committed to `zzz_generated`. - -If the validation job fails, it will provide instructions to repair -`zzz_generated` and no builds will run. - -#### Build - -Once the validation job is complete, there is a separate job for each platform, -which run in parallel. - These jobs use a platform-specific image with base `chip-build`. -The build jobs call chef with the options `--ci -t `. The `--ci` -option will execute builds for all devices specified in `_CI_ALLOW_LIST` defined -in `chef.py` (so long as these devices are also in `/devices`) on the specified -platform. +CI jobs call chef with the options `--ci -t `. The `--ci` option will +execute builds for all devices specified in `cicd_config["ci_allow_list"]` +defined in `chef.py` (so long as these devices are also in `/devices`) on the +specified platform. diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 9ce08f86fb02b6..3f6b093a9a66bb 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -29,6 +29,7 @@ import constants import stateful_shell +from sample_app_util import zap_file_parser TermColors = constants.TermColors @@ -38,11 +39,8 @@ _REPO_BASE_PATH = os.path.join(_CHEF_SCRIPT_PATH, "../../") _DEVICE_FOLDER = os.path.join(_CHEF_SCRIPT_PATH, "devices") _DEVICE_LIST = [file[:-4] for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap")] -_CHEF_ZZZ_ROOT = os.path.join(_CHEF_SCRIPT_PATH, "zzz_generated") -_CI_DEVICE_MANIFEST_NAME = "INPUTMD5.txt" -_CI_ZAP_MANIFEST_NAME = "ZAPSHA.txt" -_CICD_CONFIG_FILE_NAME = os.path.join(_CHEF_SCRIPT_PATH, "cicd_meta.json") -_CI_ALLOW_LIST = ["rootnode_dimmablelight_gY80DaqEUL"] +_CICD_CONFIG_FILE_NAME = os.path.join(_CHEF_SCRIPT_PATH, "cicd_config.json") +_CD_STAGING_DIR = os.path.join(_CHEF_SCRIPT_PATH, "staging") gen_dir = "" # Filled in after sample app type is read from args. @@ -98,64 +96,9 @@ def check_python_version() -> None: exit(1) -def check_zap() -> str: - """Produces SHA of ZAP submodule for current HEAD. - - Returns: - SHA of zap submodule. - """ - shell.run_cmd(f"cd {_REPO_BASE_PATH}") - branch = shell.run_cmd("git rev-parse --abbrev-ref HEAD", - return_cmd_output=True) - branch = branch.replace("\n", "") - command = f"git ls-tree {branch} third_party/zap/repo" - zap_commit = shell.run_cmd(command, return_cmd_output=True) - zap_commit = zap_commit.split(" ")[2] - zap_commit = zap_commit[:zap_commit.index("\t")] - flush_print(f"Found zap commit: {zap_commit}") - return zap_commit - - -def generate_device_manifest( - write_manifest_file: bool = False) -> Dict[str, Any]: - """Produces dictionary containing md5 of device dir zap files. - - Args: - write_manifest_file: Serialize manifest in tree. - Returns: - Dict containing MD5 of device dir zap files. - """ - ci_manifest = {"devices": {}} - devices_manifest = ci_manifest["devices"] - zap_sha = check_zap() - ci_manifest["zap_commit"] = zap_sha - for device_name in _DEVICE_LIST: - device_file_path = os.path.join(_DEVICE_FOLDER, device_name + ".zap") - with open(device_file_path, "rb") as device_file: - device_file_data = device_file.read() - device_file_md5 = hashlib.md5(device_file_data).hexdigest() - devices_manifest[device_name] = device_file_md5 - flush_print(f"Current digest for {device_name} : {device_file_md5}") - if write_manifest_file: - device_zzz_dir = os.path.join(_CHEF_ZZZ_ROOT, device_name) - device_zzz_md5_file = os.path.join(device_zzz_dir, _CI_DEVICE_MANIFEST_NAME) - with open(device_zzz_md5_file, "w+") as md5_file: - md5_file.write(device_file_md5) - device_zzz_zap_sha_file = os.path.join(device_zzz_dir, _CI_ZAP_MANIFEST_NAME) - with open(device_zzz_zap_sha_file, "w+") as zap_sha_file: - zap_sha_file.write(zap_sha) - return ci_manifest - - def load_cicd_config() -> Dict[str, Any]: with open(_CICD_CONFIG_FILE_NAME) as config_file: config = json.loads(config_file.read()) - for platform_name, platform_config in config.items(): - has_build_dir = "build_dir" in platform_config - has_plat_label = "platform_label" in platform_config - if not has_build_dir or not has_plat_label: - flush_print(f"{platform_name} CICD config missing build_dir or platform_label") - exit(1) return config @@ -169,11 +112,134 @@ def flush_print( with_border: Add boarder above and below to_print. """ if with_border: - border = ('-' * 64) + '\n' + border = ('-' * len(to_print)) + '\n' to_print = f"{border}{to_print}\n{border}" print(to_print, flush=True) +def unwrap_cmd(cmd: str) -> str: + """Dedent and replace new line with space.""" + return textwrap.dedent(cmd).replace("\n", " ") + + +def bundle(platform: str, device_name: str) -> None: + """Filters files from the build output folder for CD. + Clears _CD_STAGING_DIR. + Calls bundle_{platform}(device_name). + exit(1) for missing bundle_{platform}. + Adds .matter files into _CD_STAGING_DIR. + Generates metadata for device in _CD_STAGING_DIR. + + Args: + platform: The platform to bundle. + device_name: The example to bundle. + """ + matter_file = f"{device_name}.matter" + zap_file = os.path.join(_DEVICE_FOLDER, f"{device_name}.zap") + flush_print(f"Bundling {platform}", with_border=True) + flush_print(f"Cleaning {_CD_STAGING_DIR}") + shutil.rmtree(_CD_STAGING_DIR, ignore_errors=True) + os.mkdir(_CD_STAGING_DIR) + if platform == "linux": + bundle_linux(device_name) + elif platform == "nrfconnect": + bundle_nrfconnect(device_name) + elif platform == "esp32": + bundle_esp32(device_name) + else: + flush_print(f"No bundle function for {platform}!") + exit(1) + flush_print(f"Copying {matter_file}") + src_item = os.path.join(_REPO_BASE_PATH, + "zzz_generated", + "chef-"+device_name, + "zap-generated", + matter_file) + dest_item = os.path.join(_CD_STAGING_DIR, matter_file) + shutil.copy(src_item, dest_item) + flush_print(f"Generating metadata for {device_name}") + metadata_file = zap_file_parser.generate_hash_metadata_file(zap_file) + metadata_dest = os.path.join(_CD_STAGING_DIR, + os.path.basename(metadata_file)) + shutil.copy(metadata_file, metadata_dest) + + +# +# Per-platform bundle functions +# + + +def bundle_linux(device_name: str) -> None: + linux_root = os.path.join(_CHEF_SCRIPT_PATH, + "linux", + "out") + map_file_name = f"{device_name}.map" + src_item = os.path.join(linux_root, device_name) + dest_item = os.path.join(_CD_STAGING_DIR, device_name) + shutil.copy(src_item, dest_item) + src_item = os.path.join(linux_root, map_file_name) + dest_item = os.path.join(_CD_STAGING_DIR, map_file_name) + shutil.copy(src_item, dest_item) + + +def bundle_nrfconnect(device_name: str) -> None: + zephyr_exts = ["elf", "map", "hex"] + script_files = ["firmware_utils.py", + "nrfconnect_firmware_utils.py"] + nrf_root = os.path.join(_CHEF_SCRIPT_PATH, + "nrfconnect", + "build", + "zephyr") + scripts_root = os.path.join(_REPO_BASE_PATH, + "scripts", + "flashing") + gen_script_path = os.path.join(scripts_root, + "gen_flashing_script.py") + sub_dir = os.path.join(_CD_STAGING_DIR, device_name) + os.mkdir(sub_dir) + for zephyr_ext in zephyr_exts: + input_base = f"zephyr.{zephyr_ext}" + output_base = f"{device_name}.{zephyr_ext}" + src_item = os.path.join(nrf_root, input_base) + if zephyr_ext == "hex": + dest_item = os.path.join(sub_dir, output_base) + else: + dest_item = os.path.join(_CD_STAGING_DIR, output_base) + shutil.copy(src_item, dest_item) + for script_file in script_files: + src_item = os.path.join(scripts_root, script_file) + dest_item = os.path.join(sub_dir, script_file) + shutil.copy(src_item, dest_item) + shell.run_cmd(f"cd {sub_dir}") + command = f"""\ + python3 {gen_script_path} nrfconnect + --output {device_name}.flash.py + --application {device_name}.hex""" + shell.run_cmd(unwrap_cmd(command)) + + +def bundle_esp32(device_name: str) -> None: + """Reference example for bundle_{platform} + functions, which should copy/move files from a build + output dir into _CD_STAGING_DIR to be archived. + + Args: + device_name: The device to bundle. + """ + esp_root = os.path.join(_CHEF_SCRIPT_PATH, + "esp32", + "build") + manifest_file = os.path.join(esp_root, + "chip-shell.flashbundle.txt") + with open(manifest_file) as manifest: + for item in manifest: + item = item.strip() + src_item = os.path.join(esp_root, item) + dest_item = os.path.join(_CD_STAGING_DIR, item) + os.makedirs(os.path.dirname(dest_item), exist_ok=True) + shutil.copy(src_item, dest_item) + + def main(argv: Sequence[str]) -> None: check_python_version() config = load_config() @@ -252,67 +318,17 @@ def main(argv: Sequence[str]) -> None: action="store_true", dest="do_rpc_console") parser.add_option("-y", "--tty", help="Enumerated USB tty/serial interface enumerated for your physical device. E.g.: /dev/ACM0", dest="tty", metavar="TTY", default=None) - parser.add_option("", "--generate_zzz", help="Populates zzz_generated/chef//zap-generated with output of ZAP tool for every device in examples/chef/devices. If this flag is set, all other arguments are ignored except for --bootstrap_zap and --validate_zzz.", - dest="generate_zzz", action="store_true") - parser.add_option("", "--validate_zzz", help="Checks if cached ZAP output needs to be regenrated, for use in CI. If this flag is set, all other arguments are ignored.", - dest="validate_zzz", action="store_true") parser.add_option("", "--use_zzz", help="Use pre generated output from the ZAP tool found in the zzz_generated folder. Used to decrease execution time of CI/CD jobs", dest="use_zzz", action="store_true") parser.add_option("", "--build_all", help="For use in CD only. Builds and bundles all chef examples for the specified platform. Uses --use_zzz. Chef exits after completion.", dest="build_all", action="store_true") parser.add_option( - "", "--ci", help="Builds Chef examples defined in _CI_ALLOW_LIST. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true") + "", "--ci", help="Builds Chef examples defined in cicd_config. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true") options, _ = parser.parse_args(argv) splash() - # - # Validate zzz_generated - # - - if options.validate_zzz: - flush_print(f"Validating\n{_CHEF_ZZZ_ROOT}\n", - with_border=True) - fix_instructions = textwrap.dedent("""\ - Cached files out of date! - Please: - ./scripts/bootstrap.sh - source ./scripts/activate.sh - cd ./third_party/zap/repo - npm install - cd ../../.. - ./examples/chef/chef.py --generate_zzz - git add examples/chef/zzz_generated - Ensure you are running with the latest version of ZAP from master!""") - ci_manifest = generate_device_manifest() - current_zap = ci_manifest["zap_commit"] - for device, device_md5 in ci_manifest["devices"].items(): - zzz_dir = os.path.join(_CHEF_ZZZ_ROOT, device) - device_zap_sha_file = os.path.join(zzz_dir, _CI_ZAP_MANIFEST_NAME) - device_md5_file = os.path.join(zzz_dir, _CI_DEVICE_MANIFEST_NAME) - help_msg = f"{device}: {fix_instructions}" - if not os.path.exists(device_zap_sha_file): - flush_print(f"ZAP VERSION MISSING {help_msg}") - exit(1) - else: - with open(device_zap_sha_file) as zap_file: - output_cached_zap_sha = zap_file.read() - if output_cached_zap_sha != current_zap: - flush_print(f"ZAP VERSION MISMATCH {help_msg}") - exit(1) - if not os.path.exists(device_md5_file): - flush_print(f"INPUT MD5 MISSING {help_msg}") - exit(1) - else: - with open(device_md5_file) as md5_file: - output_cached_md5 = md5_file.read() - if output_cached_md5 != device_md5: - flush_print(f"INPUT MD5 MISMATCH {help_msg}") - exit(1) - flush_print("Cached ZAP output is up to date!") - exit(0) - # # ZAP bootstrapping # @@ -320,12 +336,11 @@ def main(argv: Sequence[str]) -> None: if options.do_bootstrap_zap: if sys.platform == "linux" or sys.platform == "linux2": flush_print("Installing ZAP OS package dependencies") - install_deps_cmd = textwrap.dedent("""\ + install_deps_cmd = """\ sudo apt-get install node node-yargs npm libpixman-1-dev libcairo2-dev libpango1.0-dev node-pre-gyp - libjpeg9-dev libgif-dev node-typescript""") - install_deps_cmd = install_deps_cmd.replace("\n", " ") - shell.run_cmd(install_deps_cmd) + libjpeg9-dev libgif-dev node-typescript""" + shell.run_cmd(unwrap_cmd(install_deps_cmd)) if sys.platform == "darwin": flush_print("Installation of ZAP OS packages not supported on MacOS") if sys.platform == "win32": @@ -336,50 +351,23 @@ def main(argv: Sequence[str]) -> None: shell.run_cmd( f"cd {_REPO_BASE_PATH}/third_party/zap/repo/ && npm install") - # - # Populate zzz_generated - # - - if options.generate_zzz: - flush_print(f"Cleaning {_CHEF_ZZZ_ROOT}") - if not os.path.exists(_CHEF_ZZZ_ROOT): - flush_print(f"{_CHEF_ZZZ_ROOT} doesn't exist; creating") - os.mkdir(_CHEF_ZZZ_ROOT) - else: - flush_print(f"Deleting and recreating existing {_CHEF_ZZZ_ROOT}") - shutil.rmtree(_CHEF_ZZZ_ROOT) - os.mkdir(_CHEF_ZZZ_ROOT) - flush_print(f"Generating files in {_CHEF_ZZZ_ROOT} for all devices") - for device_name in _DEVICE_LIST: - flush_print(f"Generating files for {device_name}") - device_out_dir = os.path.join(_CHEF_ZZZ_ROOT, - device_name, - "zap-generated") - os.makedirs(device_out_dir) - shell.run_cmd(textwrap.dedent(f"""\ - {_REPO_BASE_PATH}/scripts/tools/zap/generate.py \ - {_CHEF_SCRIPT_PATH}/devices/{device_name}.zap -o {device_out_dir}""")) - shell.run_cmd(f"touch {device_out_dir}/af-gen-event.h") - generate_device_manifest(write_manifest_file=True) - exit(0) - # # CI # if options.ci: - for device_name in [d for d in _DEVICE_LIST if d in _CI_ALLOW_LIST]: + for device_name in [d for d in _DEVICE_LIST if d in cicd_config["ci_allow_list"]]: if options.build_target == "nrfconnect": shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"") shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") command = f"./chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}" flush_print(f"Building {command}", with_border=True) shell.run_cmd(command) - # TODO call per-platform bundle function for extra validation + bundle(options.build_target, device_name) exit(0) # - # Build all + # CD # if options.build_all: @@ -387,22 +375,42 @@ def main(argv: Sequence[str]) -> None: archive_prefix = "/workspace/artifacts/" archive_suffix = ".tar.gz" os.makedirs(archive_prefix, exist_ok=True) + failed_builds = [] for device_name in _DEVICE_LIST: - for platform, platform_meta in cicd_config.items(): - directory = platform_meta['build_dir'] - label = platform_meta['platform_label'] - output_dir = os.path.join(_CHEF_SCRIPT_PATH, directory) + for platform, label in cicd_config["cd_platforms"].items(): command = f"./chef.py -cbr --use_zzz -d {device_name} -t {platform}" flush_print(f"Building {command}", with_border=True) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"") - shell.run_cmd(command) - # TODO Needs to call per-platform bundle function + try: + shell.run_cmd(command) + except RuntimeError as build_fail_error: + failed_builds.append((device_name, platform, "build")) + flush_print(str(build_fail_error)) + break + try: + bundle(platform, device_name) + except FileNotFoundError as bundle_fail_error: + failed_builds.append((device_name, platform, "bundle")) + flush_print(str(bundle_fail_error)) + break archive_name = f"{label}-{device_name}" archive_full_name = archive_prefix + archive_name + archive_suffix flush_print(f"Adding build output to archive {archive_full_name}") + if os.path.exists(archive_full_name): + os.remove(archive_full_name) with tarfile.open(archive_full_name, "w:gz") as tar: - tar.add(output_dir, arcname=".") + tar.add(_CD_STAGING_DIR, arcname=".") + if len(failed_builds) == 0: + flush_print("No build failures", with_border=True) + else: + flush_print("Logging build failures", with_border=True) + for failed_build in failed_builds: + fail_log = f"""\ + Device: {failed_build[0]}, + Platform: {failed_build[1]}, + Phase: {failed_build[2]}""" + flush_print(unwrap_cmd(fail_log)) exit(0) # @@ -511,19 +519,15 @@ def main(argv: Sequence[str]) -> None: if options.use_zzz: flush_print("Using pre-generated ZAP output") - zzz_dir = os.path.join(_CHEF_SCRIPT_PATH, + zzz_dir = os.path.join(_REPO_BASE_PATH, "zzz_generated", - options.sample_device_type_name, + "chef-"+options.sample_device_type_name, "zap-generated") if not os.path.exists(zzz_dir): flush_print(textwrap.dedent(f"""\ You have specified --use_zzz for device {options.sample_device_type_name} which does not exist in the cached ZAP output. - To cache ZAP output for this device: - ensure {options.sample_device_type_name}.zap - is placed in {_DEVICE_FOLDER} - run chef with the option --generate_zzz """)) exit(1) shutil.rmtree(gen_dir, ignore_errors=True) diff --git a/examples/chef/cicd_config.json b/examples/chef/cicd_config.json new file mode 100644 index 00000000000000..a8b7ca99bad84f --- /dev/null +++ b/examples/chef/cicd_config.json @@ -0,0 +1,8 @@ +{ + "ci_allow_list": ["rootnode_dimmablelight_gY80DaqEUL"], + "cd_platforms": { + "linux": "linux_x86", + "esp32": "m5stack", + "nrfconnect": "nrf52840dk" + } +} diff --git a/examples/chef/cicd_meta.json b/examples/chef/cicd_meta.json deleted file mode 100644 index 34cabcb530a302..00000000000000 --- a/examples/chef/cicd_meta.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "linux": { - "build_dir": "linux/out", - "platform_label": "linux_x86" - }, - "esp32": { - "build_dir": "esp32/build", - "platform_label": "esp32-m5stack" - }, - "nrfconnect": { - "build_dir": "nrfconnect/build", - "platform_label": "nrf-nrf52840dk" - } -} diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/INPUTMD5.txt deleted file mode 100644 index df26011d3f1567..00000000000000 --- a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -de97c937bf519ecc46bf43912799a7c7 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/INPUTMD5.txt deleted file mode 100644 index a97fd894b1ee58..00000000000000 --- a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -065e9334527a21bab8cb3a3dd24ff135 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/INPUTMD5.txt deleted file mode 100644 index c2a2b6fe0db123..00000000000000 --- a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -ea021cad6e2ccc4f67e4dbeeb4ca9288 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/INPUTMD5.txt deleted file mode 100644 index 59ce2038be669a..00000000000000 --- a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -c31f5d478acdf1cffe218788559cf2af \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/INPUTMD5.txt deleted file mode 100644 index 4161e3f6bb76f3..00000000000000 --- a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -8f86b354d5a8eee7ea019e65a64eb8cb \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/INPUTMD5.txt deleted file mode 100644 index d7c549c3cf4f28..00000000000000 --- a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -278e7ee5dd14e648844e75934e4d4302 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/INPUTMD5.txt deleted file mode 100644 index 78b2ae53a63f8e..00000000000000 --- a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -d7e83aa5dfc0d2939fd1d4c6fa869b3f \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/INPUTMD5.txt deleted file mode 100644 index 1044618a0c23da..00000000000000 --- a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -7d462526927251ecf6841784ca3dca9a \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/INPUTMD5.txt deleted file mode 100644 index 58fc5d49e7db6d..00000000000000 --- a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -61a2657bb47c1a836b5d657f5bb452f8 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/INPUTMD5.txt deleted file mode 100644 index 4e54d2ed874141..00000000000000 --- a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -fa2b7db458e1330b1d2a079965c26d93 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/INPUTMD5.txt deleted file mode 100644 index fb87cd34ace89f..00000000000000 --- a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -8b338275f9ff4e14f99896b083b0debc \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/INPUTMD5.txt deleted file mode 100644 index b3a83af6563ab6..00000000000000 --- a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -d538157c8174fec70905dc9580dd0b58 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/INPUTMD5.txt b/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/INPUTMD5.txt deleted file mode 100644 index 935d9013f264db..00000000000000 --- a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/INPUTMD5.txt +++ /dev/null @@ -1 +0,0 @@ -1ca223c176344ab1387c70db782a7210 \ No newline at end of file diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/ZAPSHA.txt b/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/ZAPSHA.txt deleted file mode 100644 index 16cb68bb9c22eb..00000000000000 --- a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/ZAPSHA.txt +++ /dev/null @@ -1 +0,0 @@ -9a4e455c3a4956842d11971148b2d5ee0ccead53 \ No newline at end of file diff --git a/examples/darwin-framework-tool/templates/tests/tests.js b/examples/darwin-framework-tool/templates/tests/tests.js index 0a557afa9535cf..7469964c5e96df 100644 --- a/examples/darwin-framework-tool/templates/tests/tests.js +++ b/examples/darwin-framework-tool/templates/tests/tests.js @@ -66,6 +66,15 @@ function getTests() { // TODO: Test_TC_CC_9_3 does not work on Darwin for now. tests.disable('Test_TC_CC_9_3'); + // TODO: Test_TC_MC_3_7 does not work on Darwin for now. + tests.disable('Test_TC_MC_3_7'); + + // TODO: Test_TC_MC_3_8 does not work on Darwin for now. + tests.disable('Test_TC_MC_3_8'); + + // TODO: Test_TC_MC_3_9 does not work on Darwin for now. + tests.disable('Test_TC_MC_3_9'); + return tests; } diff --git a/examples/placeholder/linux/apps/app1/tests.js b/examples/placeholder/linux/apps/app1/tests.js index 56cc1921bb748f..134085e4c85367 100644 --- a/examples/placeholder/linux/apps/app1/tests.js +++ b/examples/placeholder/linux/apps/app1/tests.js @@ -18,9 +18,7 @@ function getTests() { const tests = [ - "Test_TC_DM_1_3_Simulated", - "Test_TC_DM_3_3_Simulated", - "Test_TC_DM_2_3_Simulated", + "Test_TC_BINFO_2_3_Simulated", ]; return tests.join(', '); diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 4fee975ddb6dbc..27fa08e6289224 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -66,6 +66,13 @@ def generate(self): cmd = self.build_cmd() logging.info("Generating target: %s" % " ".join(cmd)) subprocess.check_call(cmd) + if "chef" in self.zap_config: + af_gen_event = os.path.join(self.output_dir, "af-gen-event.h") + with open(af_gen_event, "w+"): # Empty file needed for linux + pass + idl_path = self.zap_config.replace(".zap", ".matter") + target_path = os.path.join(self.output_dir, os.path.basename(idl_path)) + os.rename(idl_path, target_path) def checkPythonVersion(): @@ -116,7 +123,9 @@ def getGlobalTemplatesTargets(): continue if example_name == "chef": - continue + if os.path.join("chef", "devices") not in str(filepath): + continue + example_name = "chef-"+os.path.basename(filepath)[:-len(".zap")] logging.info("Found example %s (via %s)" % (example_name, str(filepath))) diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index ab15d05a79c9e3..4f0cc3c2991636 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -754,9 +754,34 @@ PICS: SupportedStreamingProtocols attribute?" id: MC_CONTENTLAUNCHER.S.A0001 + #Pressure Measurement + - label: "Does the device implement the MeasuredValue attribute?" + id: PRS.S.A0000 + + - label: "Does the device implement the MinMeasuredValue attribute?" + id: PRS.S.A0001 + + - label: "Does the device implement the MaxMeasuredValue attribute?" + id: PRS.S.A0002 + - label: "Does the device implement the Tolerance attribute?" id: PRS.S.A0003 + - label: "Does the device implement the ScaledValue attribute?" + id: PRS.S.A0010 + + - label: "Does the device implement the MinScaledValue attribute?" + id: PRS.S.A0011 + + - label: "Does the device implement the MaxScaledValue attribute?" + id: PRS.S.A0012 + + - label: "Does the device implement the ScaledTolerance attribute?" + id: PRS.S.A0013 + + - label: "Does the device implement the Scale attribute?" + id: PRS.S.A0014 + - label: "Does the device implement the Occupancy attribute?" id: OCC.S.A0000 diff --git a/src/app/tests/suites/certification/Test_TC_DM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_1_1.yaml rename to src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml index 6151bf5c8d09b4..49f8f09ad68fda 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.1.1. [TC-DM-1.1] Global Attributes for Basic Information Cluster + 11.1.1. [TC-BINFO-1.1] Global Attributes for Basic Information Cluster [DUT-Server] config: diff --git a/src/app/tests/suites/certification/Test_TC_DM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_2_1.yaml rename to src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml index a4b344e1f38870..62e28c3b30be6d 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 10.2.1. [TC-DM-2.1] Basic Information Cluster Server Attributes +name: 11.2.1. [TC-BINFO-2.1] Attributes [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_2_2.yaml rename to src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml index 92777da7006dd4..22d01fe22491db 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 10.2.2. [TC-DM-2.2] Basic Information Cluster Events +name: 11.2.2. [TC-BINFO-2.2] Events [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_1_3_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_3_Simulated.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_1_3_Simulated.yaml rename to src/app/tests/suites/certification/Test_TC_BINFO_2_3_Simulated.yaml index af1a7ae9078826..7609c2f6d357a2 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_1_3_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_3_Simulated.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 10.1.3. [TC-DM-1.3] Basic Cluster Server Attributes [DUT - Controller] +name: 11.2.3. [TC-BINFO-2.3] Attributes [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_2_4.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_4.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_2_4.yaml rename to src/app/tests/suites/certification/Test_TC_BINFO_2_4.yaml index c53bc44662b465..a2f19292153ded 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_4.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.1.4. [TC-DM-2.4] Basic Information Cluster Events [DUT - Controller] +name: 11.2.4. [TC-BINFO-2.4] Events [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml index 3531674a3def17..f17724fcec3317 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml @@ -59,6 +59,14 @@ tests: - name: "optionsOverride" value: 0 + - label: "Wait for 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.C44.Rsp @@ -194,11 +202,10 @@ tests: response: value: 1 - #Issue 18848 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: PICS_SKIP_SAMPLE_APP && CC.S.A4006 + PICS: CC.S.A4006 response: value: 16384 @@ -344,11 +351,10 @@ tests: response: value: 1 - #Issue 18848 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: PICS_SKIP_SAMPLE_APP && CC.S.A4006 + PICS: CC.S.A4006 response: value: 16384 @@ -446,7 +452,7 @@ tests: arguments: values: - name: "enhancedHue" - value: 40960 + value: 16384 - name: "direction" value: 0 - name: "transitionTime" @@ -456,20 +462,20 @@ tests: - name: "optionsOverride" value: 0 - - label: "Wait 2000ms" + - label: "Wait 1000ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 2000 + value: 1000 - label: "Read EnhancedCurrentHue attribute from DUT" command: "readAttribute" attribute: "EnhancedCurrentHue" PICS: CC.S.A4000 response: - value: 40960 + value: 16384 - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" @@ -525,11 +531,10 @@ tests: response: value: 1 - #Issue 18848 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: PICS_SKIP_SAMPLE_APP && CC.S.A4006 + PICS: CC.S.A4006 response: value: 16384 @@ -675,11 +680,10 @@ tests: response: value: 1 - #Issue 18848 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT" command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: PICS_SKIP_SAMPLE_APP && CC.S.A4006 + PICS: CC.S.A4006 response: value: 16384 diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml index 4f55258eb479b3..0260d8aadc90a0 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml @@ -60,6 +60,14 @@ tests: - name: "optionsOverride" value: 0 + - label: "Wait for 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.C44.Rsp @@ -135,11 +143,10 @@ tests: response: value: 1 - #Issue 18848 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: PICS_SKIP_SAMPLE_APP && CC.S.A4006 + PICS: CC.S.A4006 response: value: 16384 diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml index b0f9f953ab7127..d9d163b9bcc6a1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml @@ -59,6 +59,14 @@ tests: - name: "optionsOverride" value: 0 + - label: "Wait for 1000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 + - label: "Sends ColorLoopSet Command - Set all Attributes" command: "ColorLoopSet" PICS: CC.S.C44.Rsp @@ -134,11 +142,10 @@ tests: response: value: 1 - #Issue 18848 - label: "Read ColorLoopStoredEnhancedHue attribute from DUT." command: "readAttribute" attribute: "ColorLoopStoredEnhancedHue" - PICS: PICS_SKIP_SAMPLE_APP && CC.S.A4006 + PICS: CC.S.A4006 response: value: 16384 diff --git a/src/app/tests/suites/certification/Test_TC_DM_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_1_3.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml index 0c0905ff2cd7a4..15e324a4e7903b 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.1.3. [TC-DM-1.3] Global Attributes for Networking commissioning cluster + 11.1.3. [TC-CNET-1.3] Global Attributes for Networking commissioning cluster [DUT-Server] config: diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_1.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DM_4_1.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_1.yaml index c51a3503268236..7f31633837528d 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_1.yaml @@ -14,8 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.1. [TC-DM-4.1] [WiFi] Verification for attributes check [DUT - - Commissionee] + 11.4.1. [TC-CNET-4.1] [Wi-Fi] Verification for attributes check [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_10.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_4_10.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml index a4ad9e8e51edc7..8d52163a532311 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.10. [TC-DM-4.10] [Thread] Verification for RemoveNetwork Command - [DUT-Commissionee] + 11.4.10. [TC-CNET-4.10] [Thread] Verification for RemoveNetwork Command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_11.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_11.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml index b22a0e4502fb0b..f57f04ac25d546 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.11. [TC-DM-4.11] [WiFi] Verification for ConnectNetwork Command - [DUT-Commissionee] + 11.4.11. [TC-CNET-4.11] [Wi-Fi] Verification for ConnectNetwork Command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_12.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_12.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml index 21673517513655..982938e0f89032 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.12. [TC-DM-4.12] [Thread]Verification for ConnectNetwork Command - [DUT-Commissionee] + 11.4.12. [TC-CNET-4.12] [Thread]Verification for ConnectNetwork Command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_13.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml similarity index 96% rename from src/app/tests/suites/certification/Test_TC_DM_4_13.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml index 5cba69fd7257c7..2b848a0d4413a6 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.13. [TC-DM-4.13] [WiFi] Verification for ReorderNetwork command - [DUT-Commissionee] + 11.4.13. [TC-CNET-4.13] [Wi-Fi] Verification for ReorderNetwork command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_14.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml similarity index 94% rename from src/app/tests/suites/certification/Test_TC_DM_4_14.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml index de94eff81de9df..afcd318ba5d34d 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.14. [TC-DM-4.14] [Thread] Verification for ReorderNetwork command - [DUT-Commissionee] + 11.4.14. [TC-CNET-4.14] [Thread] Verification for ReorderNetwork command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_15.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_4_15.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml index 83d8bbf5b18578..337ebd7fb20382 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.15. [TC-DM-4.15] [WiFi] NetworkIDNotFound value as LastNetworkingStatus - argument validation [DUT-Commissionee] + 11.4.15. [TC-CNET-4.15] [Wi-Fi] NetworkIDNotFound value as + LastNetworkingStatus argument validation [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_16.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_4_16.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml index 6926e14de28ee9..6c35a36430c95a 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.16. [TC-DM-4.16] [Thread] NetworkIDNotFound value as - LastNetworkingStatus argument validation [DUT-Commissionee] + 11.4.16. [TC-CNET-4.16] [Thread] NetworkIDNotFound value as + LastNetworkingStatus argument validation [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_17.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_17.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml index b3526be525b11a..72b47ccc53e5b0 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.17. [TC-DM-4.17] [WiFi] Verification for attributes check - [DUT-Commissioner] + 11.4.17. [TC-CNET-4.17] [Wi-Fi] Verification for attributes check + [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_18.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_18.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml index 5ce962852935df..d365de2cdef840 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.18. [TC-DM-4.18] [Thread] Verification for attributes check - [DUT-Commissioner] + 11.4.18. [TC-CNET-4.18] [Thread] Verification for attributes check + [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_19.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_19.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml index 644b6ba9f1be77..3c7d7c7b4abb91 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.19. [TC-DM-4.19] [Ethernet] Verification for attributes check - [DUT-Commissioner] + 11.4.19. [TC-CNET-4.19] [Ethernet] Verification for attributes check + [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_2.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DM_4_2.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_2.yaml index 6302d2cfc7926e..339a877845e19b 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_2.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.2. [TC-DM-4.2] [Thread] Verification for attributes check [DUT - - Commissionee] + 11.4.2. [TC-CNET-4.2] [Thread] Verification for attributes check + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_20.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DM_4_20.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml index c50477e78e0334..fddffc9757f124 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_20.yaml @@ -14,8 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.20. [TC-DM-4.20] [WiFi] Verification for commands check - [DUT-Commissioner] + 11.4.20. [TC-CNET-4.20] [Wi-Fi] Verification for commands check [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_21.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DM_4_21.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml index 01b958e5247a99..d24fc4c5169754 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_21.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.21. [TC-DM-4.21] [Thread] Verification for commands check - [DUT-Commissioner] + 11.4.21. [TC-CNET-4.21] [Thread] Verification for commands check + [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_3.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_3.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_3.yaml index 0b457cb5934d26..6cabf317932c25 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_3.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.3. [TC-DM-4.3] [Ethernet] Verification for attributes check [DUT - - Commissionee] + 11.4.3. [TC-CNET-4.3] [Ethernet] Verification for attributes check + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DM_4_4.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml index db23be3e48f84d..aad5a67962655c 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.4. [TC-DM-4.4] [WiFi]Verification for ScanNetworks command - [DUT-Commissionee] + 11.4.4. [TC-CNET-4.4] [Wi-Fi]Verification for ScanNetworks command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_5.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_4_5.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml index 22cc50794822da..9224040c109c7a 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.5. [TC-DM-4.5] [WiFi] UNSUPPORTED_ACCESS message Validation - [DUT-Commissionee] + 11.4.5. [TC-CNET-4.5] [Wi-Fi] UNSUPPORTED_ACCESS message Validation + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_6.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_4_6.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml index 1d58f4faa54a63..86600ae438a2da 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.6. [TC-DM-4.6] [Thread] UNSUPPORTED_ACCESS message Validation - [DUT-Commissionee] + 11.4.6. [TC-CNET-4.6] [Thread] UNSUPPORTED_ACCESS message Validation + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_7.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_7.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_4_7.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_7.yaml index b2e500498edc92..5865379d590bb7 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_7.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.7. [TC-DM-4.7] [WiFi] Verification for AddOrUpdateWiFiNetwork command - [DUT-Commissionee] + 11.4.7. [TC-CNET-4.7] [Wi-Fi] Verification for AddOrUpdateWiFiNetwork + command [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_8.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_8.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_8.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_8.yaml index ee3679aae370dd..f74862a644b580 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_8.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.8. [TC-DM-4.8] [Thread] Verification for AddOrUpdateThreadNetwork - command [DUT-Commissionee] + 11.4.8. [TC-CNET-4.8] [Thread] Verification for AddOrUpdateThreadNetwork + command [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_4_9.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_4_9.yaml rename to src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml index 84ef9ae662a150..0b333824a0f316 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.4.9. [TC-DM-4.9] [WiFi] Verification for RemoveNetwork Command - [DUT-Commissionee] + 11.4.9. [TC-CNET-4.9] [Wi-Fi] Verification for RemoveNetwork Command + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_1_1.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DL_1_1.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_1_1.yaml index eb2fc772ae1fa2..b76564984b3317 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_1_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 113.1.1. [TC-DL-1.1] Global Attributes [DUT-Server] +name: 111.1.1. [TC-DRLK-1.1] Global Attributes [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_1.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DL_2_1.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_1.yaml index bbc8fd53b58d72..e9ded02a970861 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 112.2.1. [TC-DL-2.1] Attributes check [DUT - Server] +name: 111.2.1. [TC-DRLK-2.1] Attributes check [DUT - Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_10.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_10.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DL_2_10.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_10.yaml index 3be10079689d3d..11e66ae90be8a1 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_10.yaml @@ -13,7 +13,8 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 112.2.10. [TC-DL-2.10] Verification for the Door Lock Events [DUT-Server] +name: + 111.2.10. [TC-DRLK-2.10] Verification for the Door Lock Events [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_2.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DL_2_2.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_2.yaml index e3f23f75f8e1a0..4e273822297e17 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 108.2.2. [TC-DL-2.2] Verification for Door lock command[DUT-Server] +name: 111.2.2. [TC-DRLK-2.2] Verification for Door lock command[DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_3.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DL_2_3.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_3.yaml index 49d08213ff8195..6ed9635996210c 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_3.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 108.2.3. [TC-DL-2.3] Verification for Unlock Door command [DUT-Server] +name: 111.2.3. [TC-DRLK-2.3] Verification for Unlock Door command [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_4.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DL_2_4.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_4.yaml index d208014d345629..ac62b26e234f63 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_4.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: - 108.2.4. [TC-DL-2.4] Verification for Unlock with Timeout command + 111.2.4. [TC-DRLK-2.4] Verification for Unlock with Timeout command [DUT-Server] config: diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_5.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_5.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DL_2_5.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_5.yaml index ba2ac69428a0d8..e3c5746656c504 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_5.yaml @@ -13,9 +13,9 @@ # limitations under the License. name: - 112.2.5. [TC-DL-2.5] Verification for the following Commands - Set Week Day - Schedule, Get Week Day Schedule , Get Week Day Schedule Response, Clear Week - Day Schedule [DUT-Server] + 111.2.5. [TC-DRLK-2.5] Verification for the following Commands - Set Week + Day Schedule, Get Week Day Schedule , Get Week Day Schedule Response, Clear + Week Day Schedule [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_6.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_6.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DL_2_6.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_6.yaml index b74e96d588cee4..ed23c52b57ba3e 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_6.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 112.2.6. [TC-DL-2.6] Verification for the following Commands - Set Holiday + 111.2.6. [TC-DRLK-2.6] Verification for the following Commands - Set Holiday Schedule, Get Holiday Schedule, Get Holiday Schedule Response , Clear Holiday Schedule [DUT-Server] diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DL_2_7.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml index 494880db149e72..bfd7a8bd86a437 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: - 112.2.7. [TC-DL-2.7] Verification for the following Commands - Set Year + 111.2.7. [TC-DRLK-2.7] Verification for the following Commands - Set Year Schedule, Get Year Schedule, Get Year Day Schedule Response and Clear Year Day Schedule[DUT-Server] diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_8.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DL_2_8.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_8.yaml index 9aadd347ac1b3e..cff90ff3af2037 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_8.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 112.2.8. [TC-DL-2.8] Verification for the following Commands - Set User, Get - User, Get User Response, Clear User [DUT-Server] + 111.2.8. [TC-DRLK-2.8] Verification for the following Commands - Set User, + Get User, Get User Response, Clear User [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DL_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_9.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DL_2_9.yaml rename to src/app/tests/suites/certification/Test_TC_DLRK_2_9.yaml index b5fcbf1a42ef47..f8f80abc488cd0 100644 --- a/src/app/tests/suites/certification/Test_TC_DL_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_9.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: - 112.2.9. [TC-DL-2.9] Verification for the following Commands - Set + 111.2.9. [TC-DRLK-2.9] Verification for the following Commands - Set Credential , Set Credential Response, Get Credential Status, Get Credential Status Response, Clear Credential [DUT-Server] diff --git a/src/app/tests/suites/certification/Test_TC_DM_2_3_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DM_2_3_Simulated.yaml deleted file mode 100644 index 2f50455b8bb285..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DM_2_3_Simulated.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 10.2.3. [TC-DM-2.3] Basic Information Cluster Server Attributes [DUT - - Controller] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "Log OnOff Test Startup" - cluster: "LogCommands" - command: "Log" - arguments: - values: - - name: "message" - value: "*** Basic Cluster Tests Ready" - - - label: "Query Data Model Revision" - wait: "readAttribute" - attribute: "DataModelRevision" - - - label: "Query Vendor Name" - wait: "readAttribute" - attribute: "VendorName" - - - label: "Query VendorID" - wait: "readAttribute" - attribute: "VendorID" - - - label: "Query Product Name" - wait: "readAttribute" - attribute: "ProductName" - - - label: "Query ProductID" - wait: "readAttribute" - attribute: "ProductID" - - - label: "Query Node Label" - wait: "readAttribute" - attribute: "NodeLabel" - - - label: "Query User Location" - wait: "readAttribute" - attribute: "Location" - - - label: "Query HardwareVersion" - wait: "readAttribute" - attribute: "HardwareVersion" - - - label: "Query HardwareVersionString" - wait: "readAttribute" - attribute: "HardwareVersionString" - - - label: "Query SoftwareVersion" - wait: "readAttribute" - attribute: "SoftwareVersion" - - - label: "Query SoftwareVersionString" - wait: "readAttribute" - attribute: "SoftwareVersionString" - - - label: "Query ManufacturingDate" - wait: "readAttribute" - attribute: "ManufacturingDate" - - - label: "Query PartNumber" - wait: "readAttribute" - attribute: "PartNumber" - - - label: "Query ProductURL" - wait: "readAttribute" - attribute: "ProductURL" - - - label: "Query ProductLabel" - wait: "readAttribute" - attribute: "ProductLabel" - - - label: "Query SerialNumber" - wait: "readAttribute" - attribute: "SerialNumber" - - - label: "Query LocalConfigDisabled" - wait: "readAttribute" - attribute: "LocalConfigDisabled" - - - label: "Query Reachable" - wait: "readAttribute" - attribute: "Reachable" - - - label: "Query UniqueID" - wait: "readAttribute" - attribute: "UniqueID" diff --git a/src/app/tests/suites/certification/Test_TC_DM_3_3_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DM_3_3_Simulated.yaml deleted file mode 100644 index bfd75ff3487fb8..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DM_3_3_Simulated.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: 10.3.3. [TC-DM-3.3] Network Commissioning Commands [DUT - Commissioner] - -config: - nodeId: 0x12344321 - cluster: "Network Commissioning" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "Wait for Scan Network Command" - wait: "ScanNetworks" - - - label: "Wait for Add Wifi Network Command" - wait: "AddOrUpdateWiFiNetwork" - PICS: WIFI - - - label: "Wait for Update Thread Network Command" - wait: "AddOrUpdateThreadNetwork" - PICS: THREAD - - - label: "Wait for Enable Network Command" - wait: "ConnectNetwork" - - - label: "Wait for Remove Network Command" - wait: "RemoveNetwork" - PICS: WIFI | THREAD diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml new file mode 100644 index 00000000000000..7a0edb276d23c1 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml @@ -0,0 +1,449 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 111.3.1. [TC-DRLK-3.1] Attributes check [DUT - Client] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "DUT reads LockState from the TH." + verification: | + ./chip-tool doorlock read lock-state 2 1 + + + [1653566768690] [97762:2821906] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0000 DataVersion: 1270966907 + [1653566768690] [97762:2821906] CHIP: [TOO] LockState: 1 + disabled: true + + - label: "DUT reads LockType from the TH." + verification: | + ./chip-tool doorlock read lock-type 2 1 + + [1653557001176] [96842:2780856] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0001 DataVersion: 1270966903 + [1653557001177] [96842:2780856] CHIP: [TOO] LockType: 0 + disabled: true + + - label: "DUT reads ActuatorEnabled from the TH." + verification: | + ./chip-tool doorlock read actuator-enabled 2 1 + + [1653557110279] [96856:2781527] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0002 DataVersion: 1270966903 + [1653557110280] [96856:2781527] CHIP: [TOO] ActuatorEnabled: TRUE + disabled: true + + - label: "DUT reads DoorState from the TH." + verification: | + ./chip-tool doorlock read door-state 2 1 + + [1653557181974] [96865:2781967] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0003 DataVersion: 1270966903 + [1653557181975] [96865:2781967] CHIP: [TOO] DoorState: 0 + disabled: true + + - label: "DUT reads DoorOpenEvents from the TH." + verification: | + ./chip-tool doorlock read door-open-events 2 1 + + [1653557245987] [96873:2782380] CHIP: [DMG] StatusIB = + [1653557245987] [96873:2782380] CHIP: [DMG] { + [1653557245987] [96873:2782380] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653557245987] [96873:2782380] CHIP: [DMG] }, + [1653557245987] [96873:2782380] CHIP: [DMG] + [1653557245987] [96873:2782380] CHIP: [DMG] }, + [1653557245987] [96873:2782380] CHIP: [DMG] + [1653557245987] [96873:2782380] CHIP: [DMG] }, + [1653557245987] [96873:2782380] CHIP: [DMG] + [1653557245987] [96873:2782380] CHIP: [DMG] ], + [1653557245987] [96873:2782380] CHIP: [DMG] + [1653557245987] [96873:2782380] CHIP: [DMG] SuppressResponse = true, + [1653557245987] [96873:2782380] CHIP: [DMG] InteractionModelRevision = 1 + [1653557245987] [96873:2782380] CHIP: [DMG] } + [1653557245988] [96873:2782380] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads DoorClosedEvents from the TH." + verification: | + ./chip-tool doorlock read door-closed-events 2 1 + + [1653557334387] [96884:2782901] CHIP: [DMG] + [1653557334387] [96884:2782901] CHIP: [DMG] StatusIB = + [1653557334387] [96884:2782901] CHIP: [DMG] { + [1653557334387] [96884:2782901] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653557334387] [96884:2782901] CHIP: [DMG] }, + [1653557334387] [96884:2782901] CHIP: [DMG] + [1653557334387] [96884:2782901] CHIP: [DMG] }, + [1653557334387] [96884:2782901] CHIP: [DMG] + [1653557334387] [96884:2782901] CHIP: [DMG] }, + [1653557334387] [96884:2782901] CHIP: [DMG] + [1653557334387] [96884:2782901] CHIP: [DMG] ], + [1653557334387] [96884:2782901] CHIP: [DMG] + [1653557334387] [96884:2782901] CHIP: [DMG] SuppressResponse = true, + [1653557334387] [96884:2782901] CHIP: [DMG] InteractionModelRevision = 1 + [1653557334387] [96884:2782901] CHIP: [DMG] } + [1653557334387] [96884:2782901] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads OpenPeriod from the TH." + verification: | + ./chip-tool doorlock read open-period 2 1 + + [1653557427423] [96896:2783488] CHIP: [DMG] + [1653557427423] [96896:2783488] CHIP: [DMG] StatusIB = + [1653557427423] [96896:2783488] CHIP: [DMG] { + [1653557427423] [96896:2783488] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653557427423] [96896:2783488] CHIP: [DMG] }, + [1653557427423] [96896:2783488] CHIP: [DMG] + [1653557427423] [96896:2783488] CHIP: [DMG] }, + [1653557427423] [96896:2783488] CHIP: [DMG] + [1653557427423] [96896:2783488] CHIP: [DMG] }, + [1653557427423] [96896:2783488] CHIP: [DMG] + [1653557427423] [96896:2783488] CHIP: [DMG] ], + [1653557427423] [96896:2783488] CHIP: [DMG] + [1653557427423] [96896:2783488] CHIP: [DMG] SuppressResponse = true, + [1653557427423] [96896:2783488] CHIP: [DMG] InteractionModelRevision = 1 + [1653557427423] [96896:2783488] CHIP: [DMG] } + [1653557427424] [96896:2783488] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads NumberofTotalUsers from the TH." + verification: | + ./chip-tool doorlock read number-of-total-users-supported 2 1 + + [1653557554721] [96912:2784329] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0011 DataVersion: 1270966903 + [1653557554722] [96912:2784329] CHIP: [TOO] NumberOfTotalUsersSupported: 10 + disabled: true + + - label: "DUT reads NumberofPINUsersSupported from the TH." + verification: | + ./chip-tool doorlock read number-of-pinusers-supported 2 1 + + [1653557614482] [96920:2784717] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0012 DataVersion: 1270966903 + [1653557614482] [96920:2784717] CHIP: [TOO] NumberOfPINUsersSupported: 10 + disabled: true + + - label: "DUT reads NumberofRFIDUsersSupported from the TH." + verification: | + ./chip-tool doorlock read number-of-rfidusers-supported 2 1 + + [1653557683021] [96929:2785154] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0013 DataVersion: 1270966903 + [1653557683021] [96929:2785154] CHIP: [TOO] NumberOfRFIDUsersSupported: 10 + disabled: true + + - label: "DUT reads NumberofWeekDaysSchedulesSupported from the TH." + verification: | + ./chip-tool doorlock read number-of-week-day-schedules-supported-per-user 2 1 + + [1653557757736] [96938:2785638] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0014 DataVersion: 1270966903 + [1653557757736] [96938:2785638] CHIP: [TOO] NumberOfWeekDaySchedulesSupportedPerUser: 10 + disabled: true + + - label: "DUT reads NumberofYearDaysSchedulesSupported from the TH." + verification: | + ./chip-tool doorlock read number-of-year-day-schedules-supported-per-user 2 1 + + [1653557813575] [96946:2785955] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0015 DataVersion: 1270966903 + [1653557813575] [96946:2785955] CHIP: [TOO] NumberOfYearDaySchedulesSupportedPerUser: 10 + disabled: true + + - label: "DUT reads NumberofHolidaySchedulesSupported from the TH." + verification: | + ./chip-tool doorlock read number-of-holiday-schedules-supported 2 1 + + [1653558166707] [96986:2787832] CHIP: [DMG] { + [1653558166707] [96986:2787832] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653558166707] [96986:2787832] CHIP: [DMG] }, + [1653558166707] [96986:2787832] CHIP: [DMG] + [1653558166707] [96986:2787832] CHIP: [DMG] }, + [1653558166707] [96986:2787832] CHIP: [DMG] + [1653558166707] [96986:2787832] CHIP: [DMG] }, + [1653558166707] [96986:2787832] CHIP: [DMG] + [1653558166707] [96986:2787832] CHIP: [DMG] ], + [1653558166707] [96986:2787832] CHIP: [DMG] + [1653558166707] [96986:2787832] CHIP: [DMG] SuppressResponse = true, + [1653558166707] [96986:2787832] CHIP: [DMG] InteractionModelRevision = 1 + [1653558166707] [96986:2787832] CHIP: [DMG] } + [1653558166707] [96986:2787832] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads MaxPINCodedLength from the TH." + verification: | + ./chip-tool doorlock read max-pincode-length 2 1 + + [1653558250199] [96996:2788480] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0017 DataVersion: 1270966903 + [1653558250200] [96996:2788480] CHIP: [TOO] MaxPINCodeLength: 8 + disabled: true + + - label: "DUT reads MinPINCodedLength from the TH." + verification: | + ./chip-tool doorlock read min-pincode-length 2 1 + + [1653558306130] [97004:2788867] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0018 DataVersion: 1270966903 + [1653558306131] [97004:2788867] CHIP: [TOO] MinPINCodeLength: 6 + disabled: true + + - label: "DUT reads MaxRFIDCodedLength from the TH." + verification: | + ./chip-tool doorlock read max-rfidcode-length 2 1 + + [1653558377727] [97016:2789381] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0019 DataVersion: 1270966903 + [1653558377727] [97016:2789381] CHIP: [TOO] MaxRFIDCodeLength: 20 + disabled: true + + - label: "DUT reads MinRFIDCodedLength from the TH." + verification: | + ./chip-tool doorlock read min-rfidcode-length 2 1 + + [1653558476349] [97028:2789914] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_001A DataVersion: 1270966903 + [1653558476349] [97028:2789914] CHIP: [TOO] MinRFIDCodeLength: 10 + disabled: true + + - label: "DUT reads CredentialRulesSupport from the TH." + verification: | + ./chip-tool doorlock read credential-rules-support 2 1 + + [1653558675807] [97052:2791014] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_001B DataVersion: 1270966903 + [1653558675808] [97052:2791014] CHIP: [TOO] CredentialRulesSupport: 1 + disabled: true + + - label: "DUT reads Language from the TH." + verification: | + ./chip-tool doorlock read language 2 1 + + [1653558811338] [97071:2791862] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0021 DataVersion: 1270966903 + [1653558811339] [97071:2791862] CHIP: [TOO] Language: en + disabled: true + + - label: "DUT reads LEDSettings from the TH." + verification: | + ./chip-tool doorlock read ledsettings 2 1 + + [1653558909452] [97084:2792466] CHIP: [DMG] + [1653558909452] [97084:2792466] CHIP: [DMG] StatusIB = + [1653558909452] [97084:2792466] CHIP: [DMG] { + [1653558909452] [97084:2792466] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653558909452] [97084:2792466] CHIP: [DMG] }, + [1653558909452] [97084:2792466] CHIP: [DMG] + [1653558909452] [97084:2792466] CHIP: [DMG] }, + [1653558909452] [97084:2792466] CHIP: [DMG] + [1653558909452] [97084:2792466] CHIP: [DMG] }, + [1653558909452] [97084:2792466] CHIP: [DMG] + [1653558909452] [97084:2792466] CHIP: [DMG] ], + [1653558909452] [97084:2792466] CHIP: [DMG] + [1653558909452] [97084:2792466] CHIP: [DMG] SuppressResponse = true, + [1653558909452] [97084:2792466] CHIP: [DMG] InteractionModelRevision = 1 + [1653558909452] [97084:2792466] CHIP: [DMG] } + [1653558909452] [97084:2792466] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads AutoRelockTime from the TH." + verification: | + ./chip-tool doorlock read auto-relock-time 2 1 + + [1653559021633] [97097:2793104] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0023 DataVersion: 1270966903 + [1653559021633] [97097:2793104] CHIP: [TOO] AutoRelockTime: 60 + disabled: true + + - label: "DUT reads SoundVolume from the TH." + verification: | + ./chip-tool doorlock read sound-volume 2 1 + + [1653559070969] [97105:2793415] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0024 DataVersion: 1270966903 + [1653559070969] [97105:2793415] CHIP: [TOO] SoundVolume: 0 + disabled: true + + - label: "DUT reads OperatingMode from the TH." + verification: | + ./chip-tool doorlock read operating-mode 2 1 + + [1653561847889] [97233:2799025] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0025 DataVersion: 1270966903 + [1653561847889] [97233:2799025] CHIP: [TOO] OperatingMode: 0 + disabled: true + + - label: "DUT reads SupportedOperatingModes from the TH." + verification: | + ./chip-tool doorlock read supported-operating-modes 2 1 + + [1653562101060] [97267:2800456] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0026 DataVersion: 1270966903 + [1653562101060] [97267:2800456] CHIP: [TOO] SupportedOperatingModes: 65526 + disabled: true + + - label: "DUT reads DefaultConfigurationRegister from the TH." + verification: | + ./chip-tool doorlock read default-configuration-register 2 1 + + [1653562351425] [97303:2802026] CHIP: [DMG] + [1653562351425] [97303:2802026] CHIP: [DMG] StatusIB = + [1653562351425] [97303:2802026] CHIP: [DMG] { + [1653562351425] [97303:2802026] CHIP: [DMG] status = 0x7e (UNSUPPORTED_ACCESS), + [1653562351425] [97303:2802026] CHIP: [DMG] }, + [1653562351425] [97303:2802026] CHIP: [DMG] + [1653562351425] [97303:2802026] CHIP: [DMG] }, + [1653562351425] [97303:2802026] CHIP: [DMG] + [1653562351425] [97303:2802026] CHIP: [DMG] }, + [1653562351425] [97303:2802026] CHIP: [DMG] + [1653562351425] [97303:2802026] CHIP: [DMG] ], + [1653562351425] [97303:2802026] CHIP: [DMG] + [1653562351425] [97303:2802026] CHIP: [DMG] SuppressResponse = true, + [1653562351425] [97303:2802026] CHIP: [DMG] InteractionModelRevision = 1 + [1653562351425] [97303:2802026] CHIP: [DMG] } + [1653562351426] [97303:2802026] CHIP: [TOO] Response Failure: IM Error 0x0000057E: General error: 0x7e (UNSUPPORTED_ACCESS) + disabled: true + + - label: "DUT reads EnableLocalProgramming from the TH." + verification: | + ./chip-tool doorlock read enable-local-programming 2 1 + + [1653562243987] [97289:2801329] CHIP: [DMG] StatusIB = + [1653562243987] [97289:2801329] CHIP: [DMG] { + [1653562243987] [97289:2801329] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653562243987] [97289:2801329] CHIP: [DMG] }, + [1653562243987] [97289:2801329] CHIP: [DMG] + [1653562243987] [97289:2801329] CHIP: [DMG] }, + [1653562243987] [97289:2801329] CHIP: [DMG] + [1653562243987] [97289:2801329] CHIP: [DMG] }, + [1653562243987] [97289:2801329] CHIP: [DMG] + [1653562243987] [97289:2801329] CHIP: [DMG] ], + [1653562243987] [97289:2801329] CHIP: [DMG] + [1653562243987] [97289:2801329] CHIP: [DMG] SuppressResponse = true, + [1653562243987] [97289:2801329] CHIP: [DMG] InteractionModelRevision = 1 + [1653562243987] [97289:2801329] CHIP: [DMG] } + [1653562243988] [97289:2801329] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads EnableOneTouchLocking from the TH." + verification: | + ./chip-tool doorlock read enable-one-touch-locking 2 1 + + [1653562656949] [97344:2803565] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0029 DataVersion: 1270966903 + [1653562656950] [97344:2803565] CHIP: [TOO] EnableOneTouchLocking: FALSE + disabled: true + + - label: "DUT reads EnableInsideStatusLED from the TH." + verification: | + ./chip-tool doorlock read enable-inside-status-led 2 1 + [1653564760853] [97504:2810705] CHIP: [DMG] StatusIB = + [1653564760853] [97504:2810705] CHIP: [DMG] { + [1653564760853] [97504:2810705] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653564760853] [97504:2810705] CHIP: [DMG] }, + [1653564760853] [97504:2810705] CHIP: [DMG] + [1653564760853] [97504:2810705] CHIP: [DMG] }, + [1653564760853] [97504:2810705] CHIP: [DMG] + [1653564760853] [97504:2810705] CHIP: [DMG] }, + [1653564760853] [97504:2810705] CHIP: [DMG] + [1653564760853] [97504:2810705] CHIP: [DMG] ], + [1653564760853] [97504:2810705] CHIP: [DMG] + [1653564760853] [97504:2810705] CHIP: [DMG] SuppressResponse = true, + [1653564760853] [97504:2810705] CHIP: [DMG] InteractionModelRevision = 1 + [1653564760853] [97504:2810705] CHIP: [DMG] } + [1653564760853] [97504:2810705] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads EnablePrivacyModeButton from the TH." + verification: | + ./chip-tool doorlock read enable-privacy-mode-button 2 1 + + [1653565002030] [97532:2812421] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_002B DataVersion: 1270966903 + [1653565002030] [97532:2812421] CHIP: [TOO] EnablePrivacyModeButton: FALSE + disabled: true + + - label: "DUT reads LocalProgrammingFeatures from the TH." + verification: | + ./chip-tool doorlock read local-programming-features 2 1 + + [1653565062564] [97540:2812800] CHIP: [DMG] StatusIB = + [1653565062564] [97540:2812800] CHIP: [DMG] { + [1653565062564] [97540:2812800] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653565062564] [97540:2812800] CHIP: [DMG] }, + [1653565062564] [97540:2812800] CHIP: [DMG] + [1653565062564] [97540:2812800] CHIP: [DMG] }, + [1653565062564] [97540:2812800] CHIP: [DMG] + [1653565062564] [97540:2812800] CHIP: [DMG] }, + [1653565062564] [97540:2812800] CHIP: [DMG] + [1653565062564] [97540:2812800] CHIP: [DMG] ], + [1653565062564] [97540:2812800] CHIP: [DMG] + [1653565062564] [97540:2812800] CHIP: [DMG] SuppressResponse = true, + [1653565062564] [97540:2812800] CHIP: [DMG] InteractionModelRevision = 1 + [1653565062564] [97540:2812800] CHIP: [DMG] } + [1653565062565] [97540:2812800] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads WrongCodeEntryLimit from the TH." + verification: | + ./chip-tool doorlock read wrong-code-entry-limit 2 1 + + [1653565170557] [97553:2813460] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0030 DataVersion: 1270966903 + [1653565170557] [97553:2813460] CHIP: [TOO] WrongCodeEntryLimit: 3 + disabled: true + + - label: "DUT reads UserCodedTemporaryDisableTime from the TH." + verification: | + ./chip-tool doorlock read user-code-temporary-disable-time 2 1 + + [1653565211864] [97559:2813719] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0031 DataVersion: 1270966903 + [1653565211864] [97559:2813719] CHIP: [TOO] UserCodeTemporaryDisableTime: 10 + disabled: true + + - label: "DUT reads SendPINOverTheAir from the TH." + verification: | + ./chip-tool doorlock read send-pinover-the-air 2 1 + + [1653565253344] [97565:2813967] CHIP: [DMG] StatusIB = + [1653565253344] [97565:2813967] CHIP: [DMG] { + [1653565253344] [97565:2813967] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653565253344] [97565:2813967] CHIP: [DMG] }, + [1653565253344] [97565:2813967] CHIP: [DMG] + [1653565253344] [97565:2813967] CHIP: [DMG] }, + [1653565253344] [97565:2813967] CHIP: [DMG] + [1653565253344] [97565:2813967] CHIP: [DMG] }, + [1653565253344] [97565:2813967] CHIP: [DMG] + [1653565253344] [97565:2813967] CHIP: [DMG] ], + [1653565253344] [97565:2813967] CHIP: [DMG] + [1653565253344] [97565:2813967] CHIP: [DMG] SuppressResponse = true, + [1653565253344] [97565:2813967] CHIP: [DMG] InteractionModelRevision = 1 + [1653565253344] [97565:2813967] CHIP: [DMG] } + [1653565253344] [97565:2813967] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: "DUT reads RequirePINForRemoteOperation from the TH." + verification: | + ./chip-tool doorlock read require-pinfor-remote-operation 2 1 + + [1653565326678] [97576:2814467] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0033 DataVersion: 1270966903 + [1653565326678] [97576:2814467] CHIP: [TOO] RequirePINforRemoteOperation: FALSE + disabled: true + + - label: "DUT reads ExpiringUserTimeOut from the TH." + verification: | + ./chip-tool doorlock read expiring-user-timeout 2 1 + + [1653565409419] [97586:2814887] CHIP: [DMG] + [1653565409419] [97586:2814887] CHIP: [DMG] StatusIB = + [1653565409419] [97586:2814887] CHIP: [DMG] { + [1653565409419] [97586:2814887] CHIP: [DMG] status = 0x86 (UNSUPPORTED_ATTRIBUTE), + [1653565409419] [97586:2814887] CHIP: [DMG] }, + [1653565409419] [97586:2814887] CHIP: [DMG] + [1653565409419] [97586:2814887] CHIP: [DMG] }, + [1653565409419] [97586:2814887] CHIP: [DMG] + [1653565409419] [97586:2814887] CHIP: [DMG] }, + [1653565409419] [97586:2814887] CHIP: [DMG] + [1653565409419] [97586:2814887] CHIP: [DMG] ], + [1653565409419] [97586:2814887] CHIP: [DMG] + [1653565409419] [97586:2814887] CHIP: [DMG] SuppressResponse = true, + [1653565409419] [97586:2814887] CHIP: [DMG] InteractionModelRevision = 1 + [1653565409419] [97586:2814887] CHIP: [DMG] } + [1653565409420] [97586:2814887] CHIP: [TOO] Response Failure: IM Error 0x00000586: General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml new file mode 100644 index 00000000000000..952722d1f91646 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml @@ -0,0 +1,433 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 111.3.2. [TC-DRLK-3.2] Commands [DUT - Client] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "DUT sends Lock Door command to TH." + verification: | + ./chip-tool doorlock lock-door 2 1 --timedInteractionTimeoutMs 1000 + + [1653565713556] [97626:2816537] CHIP: [DMG] StatusIB = + [1653565713556] [97626:2816537] CHIP: [DMG] { + [1653565713556] [97626:2816537] CHIP: [DMG] status = 0x00 (SUCCESS), + [1653565713556] [97626:2816537] CHIP: [DMG] }, + [1653565713556] [97626:2816537] CHIP: [DMG] + [1653565713556] [97626:2816537] CHIP: [DMG] }, + [1653565713556] [97626:2816537] CHIP: [DMG] + [1653565713556] [97626:2816537] CHIP: [DMG] }, + [1653565713556] [97626:2816537] CHIP: [DMG] + [1653565713556] [97626:2816537] CHIP: [DMG] ], + [1653565713556] [97626:2816537] CHIP: [DMG] + [1653565713556] [97626:2816537] CHIP: [DMG] InteractionModelRevision = 1 + [1653565713556] [97626:2816537] CHIP: [DMG] }, + [1653565713556] [97626:2816537] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 Status=0x0 + disabled: true + + - label: "DUT sends Unlock Door command to TH." + verification: | + ./chip-tool doorlock unlock-door 2 1 --timedInteractionTimeoutMs 1000 + + + + [1653565812529] [97638:2817194] CHIP: [DMG] StatusIB = + [1653565812529] [97638:2817194] CHIP: [DMG] { + [1653565812529] [97638:2817194] CHIP: [DMG] status = 0x00 (SUCCESS), + [1653565812529] [97638:2817194] CHIP: [DMG] }, + [1653565812529] [97638:2817194] CHIP: [DMG] + [1653565812529] [97638:2817194] CHIP: [DMG] }, + [1653565812529] [97638:2817194] CHIP: [DMG] + [1653565812529] [97638:2817194] CHIP: [DMG] }, + [1653565812529] [97638:2817194] CHIP: [DMG] + [1653565812529] [97638:2817194] CHIP: [DMG] ], + [1653565812529] [97638:2817194] CHIP: [DMG] + [1653565812529] [97638:2817194] CHIP: [DMG] InteractionModelRevision = 1 + [1653565812530] [97638:2817194] CHIP: [DMG] }, + [1653565812530] [97638:2817194] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x0 + disabled: true + + - label: "DUT sends Unlock with Timeout command to TH." + verification: | + ./chip-tool doorlock unlock-with-timeout 60 2 1 --timedInteractionTimeoutMs 1000 + + [1653570206475] [98169:2839194] CHIP: [DMG] StatusIB = + [1653570206475] [98169:2839194] CHIP: [DMG] { + [1653570206475] [98169:2839194] CHIP: [DMG] status = 0x00 (SUCCESS), + [1653570206475] [98169:2839194] CHIP: [DMG] }, + [1653570206475] [98169:2839194] CHIP: [DMG] + [1653570206475] [98169:2839194] CHIP: [DMG] }, + [1653570206475] [98169:2839194] CHIP: [DMG] + [1653570206475] [98169:2839194] CHIP: [DMG] }, + [1653570206475] [98169:2839194] CHIP: [DMG] + [1653570206475] [98169:2839194] CHIP: [DMG] ], + [1653570206475] [98169:2839194] CHIP: [DMG] + [1653570206475] [98169:2839194] CHIP: [DMG] InteractionModelRevision = 1 + [1653570206475] [98169:2839194] CHIP: [DMG] }, + [1653570206475] [98169:2839194] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0003 Status=0x0 + disabled: true + + - label: "DUT sends Set Week Day Schedule command to TH." + verification: | + ./chip-tool doorlock set-week-day-schedule 3 2 2 8 15 9 15 2 1 + + [1653574623277] [98633:2860387] CHIP: [DMG] { + [1653574623277] [98633:2860387] CHIP: [DMG] suppressResponse = false, + [1653574623277] [98633:2860387] CHIP: [DMG] InvokeResponseIBs = + [1653574623277] [98633:2860387] CHIP: [DMG] [ + [1653574623277] [98633:2860387] CHIP: [DMG] InvokeResponseIB = + [1653574623277] [98633:2860387] CHIP: [DMG] { + [1653574623277] [98633:2860387] CHIP: [DMG] CommandStatusIB = + [1653574623277] [98633:2860387] CHIP: [DMG] { + [1653574623277] [98633:2860387] CHIP: [DMG] CommandPathIB = + [1653574623277] [98633:2860387] CHIP: [DMG] { + [1653574623277] [98633:2860387] CHIP: [DMG] EndpointId = 0x1, + [1653574623277] [98633:2860387] CHIP: [DMG] ClusterId = 0x101, + [1653574623277] [98633:2860387] CHIP: [DMG] CommandId = 0xb, + [1653574623277] [98633:2860387] CHIP: [DMG] }, + [1653574623277] [98633:2860387] CHIP: [DMG] + [1653574623277] [98633:2860387] CHIP: [DMG] StatusIB = + [1653574623277] [98633:2860387] CHIP: [DMG] { + [1653574623277] [98633:2860387] CHIP: [DMG] status = 0x8b (NOT_FOUND), + [1653574623277] [98633:2860387] CHIP: [DMG] }, + [1653574623277] [98633:2860387] CHIP: [DMG] + [1653574623277] [98633:2860387] CHIP: [DMG] }, + [1653574623277] [98633:2860387] CHIP: [DMG] + [1653574623277] [98633:2860387] CHIP: [DMG] }, + [1653574623277] [98633:2860387] CHIP: [DMG] + [1653574623277] [98633:2860387] CHIP: [DMG] ], + [1653574623277] [98633:2860387] CHIP: [DMG] + [1653574623277] [98633:2860387] CHIP: [DMG] InteractionModelRevision = 1 + [1653574623278] [98633:2860387] CHIP: [DMG] }, + [1653574623278] [98633:2860387] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000B Status=0x8b + [1653574623278] [98633:2860387] CHIP: [TOO] Error: IM Error 0x0000058B: General error: 0x8b (NOT_FOUND) + disabled: true + + - label: "DUT sends Get Week Day Schedule command to TH." + verification: | + ./chip-tool doorlock get-week-day-schedule 1 1 2 1 + + [1653570513049] [98210:2841024] CHIP: [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000C + [1653570513049] [98210:2841024] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_000C + [1653570513050] [98210:2841024] CHIP: [TOO] GetWeekDayScheduleResponse: { + [1653570513050] [98210:2841024] CHIP: [TOO] weekDayIndex: 1 + [1653570513050] [98210:2841024] CHIP: [TOO] userIndex: 1 + [1653570513050] [98210:2841024] CHIP: [TOO] status: 139 + [1653570513050] [98210:2841024] CHIP: [TOO] } + disabled: true + + - label: "DUT sends Clear Week Day Schedule command to TH." + verification: | + ./chip-tool doorlock clear-week-day-schedule 1 1 2 1 + + + [1653574836808] [98658:2861574] CHIP: [DMG] { + [1653574836808] [98658:2861574] CHIP: [DMG] suppressResponse = false, + [1653574836808] [98658:2861574] CHIP: [DMG] InvokeResponseIBs = + [1653574836808] [98658:2861574] CHIP: [DMG] [ + [1653574836808] [98658:2861574] CHIP: [DMG] InvokeResponseIB = + [1653574836808] [98658:2861574] CHIP: [DMG] { + [1653574836808] [98658:2861574] CHIP: [DMG] CommandStatusIB = + [1653574836808] [98658:2861574] CHIP: [DMG] { + [1653574836808] [98658:2861574] CHIP: [DMG] CommandPathIB = + [1653574836808] [98658:2861574] CHIP: [DMG] { + [1653574836808] [98658:2861574] CHIP: [DMG] EndpointId = 0x1, + [1653574836808] [98658:2861574] CHIP: [DMG] ClusterId = 0x101, + [1653574836808] [98658:2861574] CHIP: [DMG] CommandId = 0xd, + [1653574836808] [98658:2861574] CHIP: [DMG] }, + [1653574836808] [98658:2861574] CHIP: [DMG] + [1653574836808] [98658:2861574] CHIP: [DMG] StatusIB = + [1653574836808] [98658:2861574] CHIP: [DMG] { + [1653574836808] [98658:2861574] CHIP: [DMG] status = 0x8b (NOT_FOUND), + [1653574836808] [98658:2861574] CHIP: [DMG] }, + [1653574836808] [98658:2861574] CHIP: [DMG] + [1653574836808] [98658:2861574] CHIP: [DMG] }, + [1653574836808] [98658:2861574] CHIP: [DMG] + [1653574836808] [98658:2861574] CHIP: [DMG] }, + [1653574836808] [98658:2861574] CHIP: [DMG] + [1653574836808] [98658:2861574] CHIP: [DMG] ], + [1653574836808] [98658:2861574] CHIP: [DMG] + [1653574836808] [98658:2861574] CHIP: [DMG] InteractionModelRevision = 1 + [1653574836808] [98658:2861574] CHIP: [DMG] }, + [1653574836808] [98658:2861574] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000D Status=0x8b + [1653574836809] [98658:2861574] CHIP: [TOO] Error: IM Error 0x0000058B: General error: 0x8b (NOT_FOUND) + disabled: true + + - label: "DUT sends Set Year Day Schedule command to TH." + verification: | + ./chip-tool doorlock set-year-day-schedule 3 3 6 21 2 1 + + + [1653570399532] [98193:2840338] CHIP: [DMG] suppressResponse = false, + [1653570399532] [98193:2840338] CHIP: [DMG] InvokeResponseIBs = + [1653570399532] [98193:2840338] CHIP: [DMG] [ + [1653570399532] [98193:2840338] CHIP: [DMG] InvokeResponseIB = + [1653570399532] [98193:2840338] CHIP: [DMG] { + [1653570399532] [98193:2840338] CHIP: [DMG] CommandStatusIB = + [1653570399532] [98193:2840338] CHIP: [DMG] { + [1653570399532] [98193:2840338] CHIP: [DMG] CommandPathIB = + [1653570399532] [98193:2840338] CHIP: [DMG] { + [1653570399532] [98193:2840338] CHIP: [DMG] EndpointId = 0x1, + [1653570399532] [98193:2840338] CHIP: [DMG] ClusterId = 0x101, + [1653570399532] [98193:2840338] CHIP: [DMG] CommandId = 0xe, + [1653570399532] [98193:2840338] CHIP: [DMG] }, + [1653570399532] [98193:2840338] CHIP: [DMG] + [1653570399532] [98193:2840338] CHIP: [DMG] StatusIB = + [1653570399532] [98193:2840338] CHIP: [DMG] { + [1653570399532] [98193:2840338] CHIP: [DMG] status = 0x8b (NOT_FOUND), + [1653570399532] [98193:2840338] CHIP: [DMG] }, + [1653570399532] [98193:2840338] CHIP: [DMG] + [1653570399532] [98193:2840338] CHIP: [DMG] }, + [1653570399532] [98193:2840338] CHIP: [DMG] + [1653570399532] [98193:2840338] CHIP: [DMG] }, + [1653570399532] [98193:2840338] CHIP: [DMG] + [1653570399532] [98193:2840338] CHIP: [DMG] ], + [1653570399532] [98193:2840338] CHIP: [DMG] + [1653570399532] [98193:2840338] CHIP: [DMG] InteractionModelRevision = 1 + [1653570399532] [98193:2840338] CHIP: [DMG] }, + [1653570399533] [98193:2840338] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000E Status=0x8b + [1653570399533] [98193:2840338] CHIP: [TOO] Error: IM Error 0x0000058B: General error: 0x8b (NOT_FOUND) + disabled: true + + - label: "DUT sends Get Year Day Schedule command to TH." + verification: | + ./chip-tool doorlock get-year-day-schedule 1 1 2 1 + + [1653571215196] [98290:2844606] CHIP: [DMG] }, + [1653571215196] [98290:2844606] CHIP: [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_000F + [1653571215196] [98290:2844606] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_000F + [1653571215197] [98290:2844606] CHIP: [TOO] GetYearDayScheduleResponse: { + [1653571215197] [98290:2844606] CHIP: [TOO] yearDayIndex: 1 + [1653571215197] [98290:2844606] CHIP: [TOO] userIndex: 1 + [1653571215197] [98290:2844606] CHIP: [TOO] status: 139 + [1653571215197] [98290:2844606] CHIP: [TOO] } + disabled: true + + - label: "DUT sends Clear Year Day Schedule command to TH." + verification: | + ./chip-tool doorlock clear-year-day-schedule 1 1 2 1 + + [1653571338968] [98305:2845475] CHIP: [DMG] { + [1653571338968] [98305:2845475] CHIP: [DMG] suppressResponse = false, + [1653571338968] [98305:2845475] CHIP: [DMG] InvokeResponseIBs = + [1653571338968] [98305:2845475] CHIP: [DMG] [ + [1653571338968] [98305:2845475] CHIP: [DMG] InvokeResponseIB = + [1653571338968] [98305:2845475] CHIP: [DMG] { + [1653571338968] [98305:2845475] CHIP: [DMG] CommandStatusIB = + [1653571338968] [98305:2845475] CHIP: [DMG] { + [1653571338968] [98305:2845475] CHIP: [DMG] CommandPathIB = + [1653571338968] [98305:2845475] CHIP: [DMG] { + [1653571338968] [98305:2845475] CHIP: [DMG] EndpointId = 0x1, + [1653571338968] [98305:2845475] CHIP: [DMG] ClusterId = 0x101, + [1653571338968] [98305:2845475] CHIP: [DMG] CommandId = 0x10, + [1653571338968] [98305:2845475] CHIP: [DMG] }, + [1653571338968] [98305:2845475] CHIP: [DMG] + [1653571338968] [98305:2845475] CHIP: [DMG] StatusIB = + [1653571338968] [98305:2845475] CHIP: [DMG] { + [1653571338968] [98305:2845475] CHIP: [DMG] status = 0x8b (NOT_FOUND), + [1653571338968] [98305:2845475] CHIP: [DMG] }, + [1653571338968] [98305:2845475] CHIP: [DMG] + [1653571338968] [98305:2845475] CHIP: [DMG] }, + [1653571338968] [98305:2845475] CHIP: [DMG] + [1653571338968] [98305:2845475] CHIP: [DMG] }, + [1653571338968] [98305:2845475] CHIP: [DMG] + [1653571338968] [98305:2845475] CHIP: [DMG] ], + [1653571338968] [98305:2845475] CHIP: [DMG] + [1653571338968] [98305:2845475] CHIP: [DMG] InteractionModelRevision = 1 + [1653571338968] [98305:2845475] CHIP: [DMG] }, + [1653571338968] [98305:2845475] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0010 Status=0x8b + [1653571338969] [98305:2845475] CHIP: [TOO] Error: IM Error 0x0000058B: General error: 0x8b (NOT_FOUND) + disabled: true + + - label: "DUT sends Set Holiday Day Schedule command to TH." + verification: | + ./chip-tool doorlock set-holiday-schedule 1 20 30 0 2 1 + + + [1653571428686] [98317:2846062] CHIP: [DMG] StatusIB = + [1653571428686] [98317:2846062] CHIP: [DMG] { + [1653571428686] [98317:2846062] CHIP: [DMG] status = 0x81 (UNSUPPORTED_COMMAND), + [1653571428686] [98317:2846062] CHIP: [DMG] }, + [1653571428686] [98317:2846062] CHIP: [DMG] + [1653571428686] [98317:2846062] CHIP: [DMG] }, + [1653571428686] [98317:2846062] CHIP: [DMG] + [1653571428686] [98317:2846062] CHIP: [DMG] }, + [1653571428686] [98317:2846062] CHIP: [DMG] + [1653571428686] [98317:2846062] CHIP: [DMG] ], + [1653571428687] [98317:2846062] CHIP: [DMG] + [1653571428687] [98317:2846062] CHIP: [DMG] InteractionModelRevision = 1 + [1653571428687] [98317:2846062] CHIP: [DMG] }, + [1653571428687] [98317:2846062] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0011 Status=0x81 + [1653571428687] [98317:2846062] CHIP: [TOO] Error: IM Error 0x00000581: General error: 0x81 (UNSUPPORTED_COMMAND) + disabled: true + + - label: "DUT sends Get Holiday Day Schedule command to TH." + verification: | + ./chip-tool doorlock get-holiday-schedule 1 2 1 + + [1653571509242] [98327:2846565] CHIP: [DMG] StatusIB = + [1653571509242] [98327:2846565] CHIP: [DMG] { + [1653571509242] [98327:2846565] CHIP: [DMG] status = 0x81 (UNSUPPORTED_COMMAND), + [1653571509242] [98327:2846565] CHIP: [DMG] }, + [1653571509242] [98327:2846565] CHIP: [DMG] + [1653571509242] [98327:2846565] CHIP: [DMG] }, + [1653571509242] [98327:2846565] CHIP: [DMG] + [1653571509242] [98327:2846565] CHIP: [DMG] }, + [1653571509242] [98327:2846565] CHIP: [DMG] + [1653571509242] [98327:2846565] CHIP: [DMG] ], + [1653571509242] [98327:2846565] CHIP: [DMG] + [1653571509242] [98327:2846565] CHIP: [DMG] InteractionModelRevision = 1 + [1653571509242] [98327:2846565] CHIP: [DMG] }, + [1653571509242] [98327:2846565] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0012 Status=0x81 + [1653571509242] [98327:2846565] CHIP: [TOO] Error: IM Error 0x00000581: General error: 0x81 (UNSUPPORTED_COMMAND) + disabled: true + + - label: "DUT sends Clear Holiday Day Schedule command to TH." + verification: | + ./chip-tool doorlock clear-holiday-schedule 1 2 1 + + [1653571579201] [98335:2847019] CHIP: [DMG] + [1653571579201] [98335:2847019] CHIP: [DMG] StatusIB = + [1653571579201] [98335:2847019] CHIP: [DMG] { + [1653571579201] [98335:2847019] CHIP: [DMG] status = 0x81 (UNSUPPORTED_COMMAND), + [1653571579201] [98335:2847019] CHIP: [DMG] }, + [1653571579201] [98335:2847019] CHIP: [DMG] + [1653571579201] [98335:2847019] CHIP: [DMG] }, + [1653571579201] [98335:2847019] CHIP: [DMG] + [1653571579201] [98335:2847019] CHIP: [DMG] }, + [1653571579201] [98335:2847019] CHIP: [DMG] + [1653571579201] [98335:2847019] CHIP: [DMG] ], + [1653571579201] [98335:2847019] CHIP: [DMG] + [1653571579201] [98335:2847019] CHIP: [DMG] InteractionModelRevision = 1 + [1653571579201] [98335:2847019] CHIP: [DMG] }, + [1653571579201] [98335:2847019] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0013 Status=0x81 + [1653571579201] [98335:2847019] CHIP: [TOO] Error: IM Error 0x00000581: General error: 0x81 (UNSUPPORTED_COMMAND) + disabled: true + + - label: "DUT sends Set USer command to TH." + verification: | + ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 2 1 --timedInteractionTimeoutMs 1000 + + [1653569395226] [98073:2834901] CHIP: [DMG] StatusIB = + [1653569395226] [98073:2834901] CHIP: [DMG] { + [1653569395226] [98073:2834901] CHIP: [DMG] status = 0x00 (SUCCESS), + [1653569395226] [98073:2834901] CHIP: [DMG] }, + [1653569395226] [98073:2834901] CHIP: [DMG] + [1653569395226] [98073:2834901] CHIP: [DMG] }, + [1653569395226] [98073:2834901] CHIP: [DMG] + [1653569395226] [98073:2834901] CHIP: [DMG] }, + [1653569395226] [98073:2834901] CHIP: [DMG] + [1653569395226] [98073:2834901] CHIP: [DMG] ], + [1653569395226] [98073:2834901] CHIP: [DMG] + [1653569395226] [98073:2834901] CHIP: [DMG] InteractionModelRevision = 1 + [1653569395226] [98073:2834901] CHIP: [DMG] }, + [1653569395226] [98073:2834901] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001A Status=0x0 + disabled: true + + - label: "DUT sends Get User to TH." + verification: | + ./chip-tool doorlock get-user 1 2 1 --timedInteractionTimeoutMs 1000 + + [1653569533887] [98089:2835720] CHIP: [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001C + [1653569533888] [98089:2835720] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_001C + [1653569533888] [98089:2835720] CHIP: [TOO] GetUserResponse: { + [1653569533888] [98089:2835720] CHIP: [TOO] userIndex: 1 + [1653569533888] [98089:2835720] CHIP: [TOO] userName: xxx + [1653569533888] [98089:2835720] CHIP: [TOO] userUniqueId: 6452 + [1653569533888] [98089:2835720] CHIP: [TOO] userStatus: 1 + [1653569533888] [98089:2835720] CHIP: [TOO] userType: 0 + [1653569533888] [98089:2835720] CHIP: [TOO] credentialRule: 0 + [1653569533888] [98089:2835720] CHIP: [TOO] credentials: null + [1653569533888] [98089:2835720] CHIP: [TOO] creatorFabricIndex: 1 + [1653569533888] [98089:2835720] CHIP: [TOO] lastModifiedFabricIndex: 1 + [1653569533888] [98089:2835720] CHIP: [TOO] nextUserIndex: 2 + [1653569533888] [98089:2835720] CHIP: [TOO] } + disabled: true + + - label: "DUT sends Clear User command to TH." + verification: | + ./chip-tool doorlock clear-user 1 2 1 --timedInteractionTimeoutMs 1000 + + [1653569601813] [98098:2836198] CHIP: [DMG] StatusIB = + [1653569601813] [98098:2836198] CHIP: [DMG] { + [1653569601813] [98098:2836198] CHIP: [DMG] status = 0x00 (SUCCESS), + [1653569601813] [98098:2836198] CHIP: [DMG] }, + [1653569601813] [98098:2836198] CHIP: [DMG] + [1653569601813] [98098:2836198] CHIP: [DMG] }, + [1653569601813] [98098:2836198] CHIP: [DMG] + [1653569601813] [98098:2836198] CHIP: [DMG] }, + [1653569601813] [98098:2836198] CHIP: [DMG] + [1653569601813] [98098:2836198] CHIP: [DMG] ], + [1653569601813] [98098:2836198] CHIP: [DMG] + [1653569601813] [98098:2836198] CHIP: [DMG] InteractionModelRevision = 1 + [1653569601813] [98098:2836198] CHIP: [DMG] }, + [1653569601813] [98098:2836198] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_001D Status=0x0 + disabled: true + + - label: "DUT sends Set Credential command to TH." + verification: | + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 2 1 --timedInteractionTimeoutMs 1000 + + + [1653568770797] [97999:2831494] CHIP: [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 + [1653568770797] [97999:2831494] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 + [1653568770799] [97999:2831494] CHIP: [TOO] SetCredentialResponse: { + [1653568770799] [97999:2831494] CHIP: [TOO] status: 133 + [1653568770799] [97999:2831494] CHIP: [TOO] userIndex: null + [1653568770799] [97999:2831494] CHIP: [TOO] nextCredentialIndex: 2 + [1653568770799] [97999:2831494] CHIP: [TOO] } + disabled: true + + - label: "DUT sends Get Credential to TH." + verification: | + ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 2 1 --timedInteractionTimeoutMs 1000 + + [1653568987537] [98026:2832630] CHIP: [DMG] }, + [1653568987537] [98026:2832630] CHIP: [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0025 + [1653568987538] [98026:2832630] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0025 + [1653568987538] [98026:2832630] CHIP: [TOO] GetCredentialStatusResponse: { + [1653568987538] [98026:2832630] CHIP: [TOO] credentialExists: FALSE + [1653568987538] [98026:2832630] CHIP: [TOO] userIndex: null + [1653568987538] [98026:2832630] CHIP: [TOO] creatorFabricIndex: null + [1653568987538] [98026:2832630] CHIP: [TOO] lastModifiedFabricIndex: null + [1653568987538] [98026:2832630] CHIP: [TOO] nextCredentialIndex: 2 + [1653568987538] [98026:2832630] CHIP: [TOO] } + disabled: true + + - label: "DUT sends Clear Credential command to TH." + verification: | + ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 2 1 --timedInteractionTimeoutMs 1000 + + [1653569124023] [98041:2833531] CHIP: [DMG] }, + [1653569124023] [98041:2833531] CHIP: [DMG] + [1653569124023] [98041:2833531] CHIP: [DMG] StatusIB = + [1653569124023] [98041:2833531] CHIP: [DMG] { + [1653569124023] [98041:2833531] CHIP: [DMG] status = 0x00 (SUCCESS), + [1653569124023] [98041:2833531] CHIP: [DMG] }, + [1653569124023] [98041:2833531] CHIP: [DMG] + [1653569124023] [98041:2833531] CHIP: [DMG] }, + [1653569124023] [98041:2833531] CHIP: [DMG] + [1653569124023] [98041:2833531] CHIP: [DMG] }, + [1653569124023] [98041:2833531] CHIP: [DMG] + [1653569124023] [98041:2833531] CHIP: [DMG] ], + [1653569124023] [98041:2833531] CHIP: [DMG] + [1653569124023] [98041:2833531] CHIP: [DMG] InteractionModelRevision = 1 + [1653569124023] [98041:2833531] CHIP: [DMG] }, + [1653569124023] [98041:2833531] CHIP: [DMG] Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0026 Status=0x0 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml new file mode 100644 index 00000000000000..ad6fda5fa0d4e7 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml @@ -0,0 +1,1270 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 111.3.3. [TC-DRLK-3.3] Verification for the Door Lock Events [DUT - Client] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 0" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 1" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 3" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 4" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 5" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 6" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 7" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorLockAlarm Event by setting the AlarmCode to 8" + verification: | + ./chip-tool doorlock read-event door-lock-alarm 2 1 + + [1653571709030] [98353:2847768] CHIP: [DMG] ReportDataMessage = + [1653571709030] [98353:2847768] CHIP: [DMG] { + [1653571709030] [98353:2847768] CHIP: [DMG] SuppressResponse = true, + [1653571709030] [98353:2847768] CHIP: [DMG] InteractionModelRevision = 1 + [1653571709030] [98353:2847768] CHIP: [DMG] } + [1653571709030] [98353:2847768] CHIP: [EM] Sending Standalone Ack for MessageCounter:4015518 on exchange 47229i + disabled: true + + - label: "Simulate a DoorStateChange event by setting the DoorState to 0" + verification: | + ./chip-tool doorlock read-event door-state-change 2 1 + + [1653571783958] [98363:2848274] CHIP: [DMG] ReportDataMessage = + [1653571783958] [98363:2848274] CHIP: [DMG] { + [1653571783958] [98363:2848274] CHIP: [DMG] SuppressResponse = true, + [1653571783958] [98363:2848274] CHIP: [DMG] InteractionModelRevision = 1 + [1653571783958] [98363:2848274] CHIP: [DMG] } + [1653571783958] [98363:2848274] CHIP: [EM] Sending Standalone Ack for MessageCounter:11677624 on exchange 14436i + disabled: true + + - label: "Simulate a DoorStateChange event by setting the DoorState to 1" + verification: | + "./chip-tool doorlock read-event door-state-change 2 1 + + [1653571783958] [98363:2848274] CHIP: [DMG] ReportDataMessage = + [1653571783958] [98363:2848274] CHIP: [DMG] { + [1653571783958] [98363:2848274] CHIP: [DMG] SuppressResponse = true, + [1653571783958] [98363:2848274] CHIP: [DMG] InteractionModelRevision = 1 + [1653571783958] [98363:2848274] CHIP: [DMG] } + [1653571783958] [98363:2848274] CHIP: [EM] Sending Standalone Ack for MessageCounter:11677624 on exchange 14436i" + disabled: true + + - label: "Simulate a DoorStateChange event by setting the DoorState to 2" + verification: | + "./chip-tool doorlock read-event door-state-change 2 1 + + [1653571783958] [98363:2848274] CHIP: [DMG] ReportDataMessage = + [1653571783958] [98363:2848274] CHIP: [DMG] { + [1653571783958] [98363:2848274] CHIP: [DMG] SuppressResponse = true, + [1653571783958] [98363:2848274] CHIP: [DMG] InteractionModelRevision = 1 + [1653571783958] [98363:2848274] CHIP: [DMG] } + [1653571783958] [98363:2848274] CHIP: [EM] Sending Standalone Ack for MessageCounter:11677624 on exchange 14436i" + disabled: true + + - label: "Simulate a DoorStateChange event by setting the DoorState to 3" + verification: | + "./chip-tool doorlock read-event door-state-change 2 1 + + [1653571783958] [98363:2848274] CHIP: [DMG] ReportDataMessage = + [1653571783958] [98363:2848274] CHIP: [DMG] { + [1653571783958] [98363:2848274] CHIP: [DMG] SuppressResponse = true, + [1653571783958] [98363:2848274] CHIP: [DMG] InteractionModelRevision = 1 + [1653571783958] [98363:2848274] CHIP: [DMG] } + [1653571783958] [98363:2848274] CHIP: [EM] Sending Standalone Ack for MessageCounter:11677624 on exchange 14436i" + disabled: true + + - label: "Simulate a DoorStateChange event by setting the DoorState to 4" + verification: | + "./chip-tool doorlock read-event door-state-change 2 1 + + [1653571783958] [98363:2848274] CHIP: [DMG] ReportDataMessage = + [1653571783958] [98363:2848274] CHIP: [DMG] { + [1653571783958] [98363:2848274] CHIP: [DMG] SuppressResponse = true, + [1653571783958] [98363:2848274] CHIP: [DMG] InteractionModelRevision = 1 + [1653571783958] [98363:2848274] CHIP: [DMG] } + [1653571783958] [98363:2848274] CHIP: [EM] Sending Standalone Ack for MessageCounter:11677624 on exchange 14436i" + disabled: true + + - label: "Simulate a DoorStateChange event by setting the DoorState to 5" + verification: | + "./chip-tool doorlock read-event door-state-change 2 1 + + [1653571783958] [98363:2848274] CHIP: [DMG] ReportDataMessage = + [1653571783958] [98363:2848274] CHIP: [DMG] { + [1653571783958] [98363:2848274] CHIP: [DMG] SuppressResponse = true, + [1653571783958] [98363:2848274] CHIP: [DMG] InteractionModelRevision = 1 + [1653571783958] [98363:2848274] CHIP: [DMG] } + [1653571783958] [98363:2848274] CHIP: [EM] Sending Standalone Ack for MessageCounter:11677624 on exchange 14436i" + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 0" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 1" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 2" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 3" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 4" + verification: | + "./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 5" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 6" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 7" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 8" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockOperation event by setting OperationSource to 9" + verification: | + ./chip-tool doorlock read-event lock-operation 2 1 + + + [1653572803263] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803263] [98482:2853531] CHIP: [TOO] Event number: 5 + [1653572803263] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803263] [98482:2853531] CHIP: [TOO] Timestamp: 15352644 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803264] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803264] [98482:2853531] CHIP: [TOO] Event number: 6 + [1653572803264] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803264] [98482:2853531] CHIP: [TOO] Timestamp: 15451617 + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803264] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803264] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803264] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803264] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803264] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803264] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15511623 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 8 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 15818987 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 9 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 18179000 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 12 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19845592 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 7 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: 1 + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: 112233 + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + [1653572803265] [98482:2853531] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002 + [1653572803265] [98482:2853531] CHIP: [TOO] Event number: 13 + [1653572803265] [98482:2853531] CHIP: [TOO] Priority: Critical + [1653572803265] [98482:2853531] CHIP: [TOO] Timestamp: 19905596 + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperation: { + [1653572803265] [98482:2853531] CHIP: [TOO] LockOperationType: 0 + [1653572803265] [98482:2853531] CHIP: [TOO] OperationSource: 4 + [1653572803265] [98482:2853531] CHIP: [TOO] UserIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] FabricIndex: null + [1653572803265] [98482:2853531] CHIP: [TOO] SourceNode: null + [1653572803265] [98482:2853531] CHIP: [TOO] Credentials: null + [1653572803265] [98482:2853531] CHIP: [TOO] } + disabled: true + + - label: + "Simulate a LockOperationError Event by setting OperationError as 0" + verification: | + ./chip-tool doorlock read-event lock-operation-error 2 1 + + + [1653572299057] [98420:2850836] CHIP: [DMG] ReportDataMessage = + [1653572299057] [98420:2850836] CHIP: [DMG] { + [1653572299057] [98420:2850836] CHIP: [DMG] SuppressResponse = true, + [1653572299057] [98420:2850836] CHIP: [DMG] InteractionModelRevision = 1 + [1653572299057] [98420:2850836] CHIP: [DMG] } + [1653572299057] [98420:2850836] CHIP: [EM] Sending Standalone Ack for MessageCounter:13024512 on exchange 29986i + disabled: true + + - label: + "Simulate a LockOperationError Event by setting OperationError as 1" + verification: | + ./chip-tool doorlock read-event lock-operation-error 2 1 + + + [1653572299057] [98420:2850836] CHIP: [DMG] ReportDataMessage = + [1653572299057] [98420:2850836] CHIP: [DMG] { + [1653572299057] [98420:2850836] CHIP: [DMG] SuppressResponse = true, + [1653572299057] [98420:2850836] CHIP: [DMG] InteractionModelRevision = 1 + [1653572299057] [98420:2850836] CHIP: [DMG] } + [1653572299057] [98420:2850836] CHIP: [EM] Sending Standalone Ack for MessageCounter:13024512 on exchange 29986i + disabled: true + + - label: + "Simulate a LockOperationError Event by setting OperationError as 2" + verification: | + ./chip-tool doorlock read-event lock-operation-error 2 1 + + + [1653572299057] [98420:2850836] CHIP: [DMG] ReportDataMessage = + [1653572299057] [98420:2850836] CHIP: [DMG] { + [1653572299057] [98420:2850836] CHIP: [DMG] SuppressResponse = true, + [1653572299057] [98420:2850836] CHIP: [DMG] InteractionModelRevision = 1 + [1653572299057] [98420:2850836] CHIP: [DMG] } + [1653572299057] [98420:2850836] CHIP: [EM] Sending Standalone Ack for MessageCounter:13024512 on exchange 29986i + disabled: true + + - label: + "Simulate a LockOperationError Event by setting OperationError as 3" + verification: | + ./chip-tool doorlock read-event lock-operation-error 2 1 + + + [1653572299057] [98420:2850836] CHIP: [DMG] ReportDataMessage = + [1653572299057] [98420:2850836] CHIP: [DMG] { + [1653572299057] [98420:2850836] CHIP: [DMG] SuppressResponse = true, + [1653572299057] [98420:2850836] CHIP: [DMG] InteractionModelRevision = 1 + [1653572299057] [98420:2850836] CHIP: [DMG] } + [1653572299057] [98420:2850836] CHIP: [EM] Sending Standalone Ack for MessageCounter:13024512 on exchange 29986i + disabled: true + + - label: + "Simulate a LockOperationError Event by setting OperationError as 4" + verification: | + ./chip-tool doorlock read-event lock-operation-error 2 1 + + + [1653572299057] [98420:2850836] CHIP: [DMG] ReportDataMessage = + [1653572299057] [98420:2850836] CHIP: [DMG] { + [1653572299057] [98420:2850836] CHIP: [DMG] SuppressResponse = true, + [1653572299057] [98420:2850836] CHIP: [DMG] InteractionModelRevision = 1 + [1653572299057] [98420:2850836] CHIP: [DMG] } + [1653572299057] [98420:2850836] CHIP: [EM] Sending Standalone Ack for MessageCounter:13024512 on exchange 29986i + disabled: true + + - label: "Simulate a LockUserChange event by changing the Lock User" + verification: | + ./chip-tool doorlock read-event lock-user-change 2 1 + + + [1653572384473] [98430:2851349] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1653572384473] [98430:2851349] CHIP: [TOO] Event number: 10 + [1653572384473] [98430:2851349] CHIP: [TOO] Priority: Info + [1653572384473] [98430:2851349] CHIP: [TOO] Timestamp: 19034354 + [1653572384474] [98430:2851349] CHIP: [TOO] LockUserChange: { + [1653572384474] [98430:2851349] CHIP: [TOO] LockDataType: 2 + [1653572384474] [98430:2851349] CHIP: [TOO] DataOperationType: 0 + [1653572384474] [98430:2851349] CHIP: [TOO] OperationSource: 7 + [1653572384474] [98430:2851349] CHIP: [TOO] UserIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] FabricIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] SourceNode: 112233 + [1653572384474] [98430:2851349] CHIP: [TOO] DataIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] } + [1653572384474] [98430:2851349] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1653572384474] [98430:2851349] CHIP: [TOO] Event number: 11 + [1653572384474] [98430:2851349] CHIP: [TOO] Priority: Info + [1653572384474] [98430:2851349] CHIP: [TOO] Timestamp: 19240944 + [1653572384474] [98430:2851349] CHIP: [TOO] LockUserChange: { + [1653572384474] [98430:2851349] CHIP: [TOO] LockDataType: 2 + [1653572384474] [98430:2851349] CHIP: [TOO] DataOperationType: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] OperationSource: 7 + [1653572384474] [98430:2851349] CHIP: [TOO] UserIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] FabricIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] SourceNode: 112233 + [1653572384474] [98430:2851349] CHIP: [TOO] DataIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockUserChange event by changing the Schedule" + verification: | + ./chip-tool doorlock read-event lock-user-change 2 1 + + + [1653572384473] [98430:2851349] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1653572384473] [98430:2851349] CHIP: [TOO] Event number: 10 + [1653572384473] [98430:2851349] CHIP: [TOO] Priority: Info + [1653572384473] [98430:2851349] CHIP: [TOO] Timestamp: 19034354 + [1653572384474] [98430:2851349] CHIP: [TOO] LockUserChange: { + [1653572384474] [98430:2851349] CHIP: [TOO] LockDataType: 2 + [1653572384474] [98430:2851349] CHIP: [TOO] DataOperationType: 0 + [1653572384474] [98430:2851349] CHIP: [TOO] OperationSource: 7 + [1653572384474] [98430:2851349] CHIP: [TOO] UserIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] FabricIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] SourceNode: 112233 + [1653572384474] [98430:2851349] CHIP: [TOO] DataIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] } + [1653572384474] [98430:2851349] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1653572384474] [98430:2851349] CHIP: [TOO] Event number: 11 + [1653572384474] [98430:2851349] CHIP: [TOO] Priority: Info + [1653572384474] [98430:2851349] CHIP: [TOO] Timestamp: 19240944 + [1653572384474] [98430:2851349] CHIP: [TOO] LockUserChange: { + [1653572384474] [98430:2851349] CHIP: [TOO] LockDataType: 2 + [1653572384474] [98430:2851349] CHIP: [TOO] DataOperationType: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] OperationSource: 7 + [1653572384474] [98430:2851349] CHIP: [TOO] UserIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] FabricIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] SourceNode: 112233 + [1653572384474] [98430:2851349] CHIP: [TOO] DataIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] } + disabled: true + + - label: "Simulate a LockUserChange event by changing the Credential" + verification: | + ./chip-tool doorlock read-event lock-user-change 2 1 + + + [1653572384473] [98430:2851349] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1653572384473] [98430:2851349] CHIP: [TOO] Event number: 10 + [1653572384473] [98430:2851349] CHIP: [TOO] Priority: Info + [1653572384473] [98430:2851349] CHIP: [TOO] Timestamp: 19034354 + [1653572384474] [98430:2851349] CHIP: [TOO] LockUserChange: { + [1653572384474] [98430:2851349] CHIP: [TOO] LockDataType: 2 + [1653572384474] [98430:2851349] CHIP: [TOO] DataOperationType: 0 + [1653572384474] [98430:2851349] CHIP: [TOO] OperationSource: 7 + [1653572384474] [98430:2851349] CHIP: [TOO] UserIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] FabricIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] SourceNode: 112233 + [1653572384474] [98430:2851349] CHIP: [TOO] DataIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] } + [1653572384474] [98430:2851349] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 + [1653572384474] [98430:2851349] CHIP: [TOO] Event number: 11 + [1653572384474] [98430:2851349] CHIP: [TOO] Priority: Info + [1653572384474] [98430:2851349] CHIP: [TOO] Timestamp: 19240944 + [1653572384474] [98430:2851349] CHIP: [TOO] LockUserChange: { + [1653572384474] [98430:2851349] CHIP: [TOO] LockDataType: 2 + [1653572384474] [98430:2851349] CHIP: [TOO] DataOperationType: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] OperationSource: 7 + [1653572384474] [98430:2851349] CHIP: [TOO] UserIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] FabricIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] SourceNode: 112233 + [1653572384474] [98430:2851349] CHIP: [TOO] DataIndex: 1 + [1653572384474] [98430:2851349] CHIP: [TOO] } + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index 47820d47c17a6c..9bed6bf9b5f47d 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -147,6 +147,7 @@ tests: transitioning." - label: "Reads CurrentLevel attribute from DUT" + disabled: true # https://github.com/project-chip/connectedhomeip/issues/19869 PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "current level" diff --git a/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml index 8d7950b9a6a399..a5be84a8267911 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_2_1.yaml @@ -30,3 +30,5 @@ tests: - label: "TH sends Sleep command to DUT" command: "Sleep" + response: + error: 0 diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml index f9e8006a5f6448..312048b65c4e23 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_11.yaml @@ -35,18 +35,14 @@ tests: constraints: type: list - #Issue 17985 - label: "Select Input Command" - PICS: PICS_SKIP_SAMPLE_APP command: "SelectInput" arguments: values: - name: "index" value: 1 - #skipped due to above command failure - label: "Read current input list" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentInput" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_12.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_12.yaml index c80c24b083151e..1476f161606e5a 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_12.yaml @@ -30,9 +30,11 @@ tests: value: nodeId - label: "Hide Input Status Command" - PICS: PICS_SKIP_SAMPLE_APP command: "HideInputStatus" + response: + error: 0 - label: "Show Input Status Command" - PICS: PICS_SKIP_SAMPLE_APP command: "ShowInputStatus" + response: + error: 0 diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml index ad696fedce8e53..0f5e547bc8fc7e 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml @@ -37,7 +37,6 @@ tests: type: list - label: "Rename Input Command" - PICS: PICS_SKIP_SAMPLE_APP command: "RenameInput" arguments: values: @@ -46,16 +45,6 @@ tests: - name: "name" value: "A1" - - label: "Rename Input Command" - PICS: PICS_SKIP_SAMPLE_APP - command: "RenameInput" - arguments: - values: - - name: "index" - value: 1 - - name: "name" - value: "A2" - - label: "Read attribute media input list" command: "readAttribute" attribute: "InputList" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml index cfda8f5224bc35..61efb27f743291 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_2.yaml @@ -28,9 +28,7 @@ tests: - name: "nodeId" value: nodeId - #Issue 17510 - label: "TH sends CEC Settings Keys(0x0A) to DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -38,7 +36,6 @@ tests: value: 0x0A - label: "TH sends CEC Home Keys(0x09) to DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml index f0b1557b961252..d2be6d0455b44c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_3.yaml @@ -28,9 +28,7 @@ tests: - name: "nodeId" value: nodeId - #Issue 17510 - label: "Send Numbers1" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -38,7 +36,6 @@ tests: value: 0x21 - label: "Send Numbers2" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -46,7 +43,6 @@ tests: value: 0x22 - label: "Send Numbers3" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -54,7 +50,6 @@ tests: value: 0x23 - label: "Send Numbers4" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -62,7 +57,6 @@ tests: value: 0x24 - label: "Send Numbers5" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -70,7 +64,6 @@ tests: value: 0x25 - label: "Send Numbers6" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -78,7 +71,6 @@ tests: value: 0x26 - label: "Send Numbers7" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -86,7 +78,6 @@ tests: value: 0x27 - label: "Send Numbers8" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: @@ -94,7 +85,6 @@ tests: value: 0x28 - label: "Send Numbers9" - PICS: PICS_SKIP_SAMPLE_APP command: "SendKey" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml index 7f624150024411..5027001840d9e9 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_5.yaml @@ -28,9 +28,23 @@ tests: - name: "nodeId" value: nodeId - - label: "Read CatalogList attribute." - command: "readAttribute" - attribute: "CatalogList" - response: - constraints: - type: list + # Issue 13029 + - label: + "TH reads CatalogList attribute from the DUT and where each entry in + the list is a CSA-issued Vendor Id of type unsigned 16 bit integer + ranging between 0-65536 for the catalog" + verification: | + ./chip-tool applicationlauncher read catalog-list 1 1 + [1651053952.328482][155084:155089] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050C Attribute 0x0000_0000 DataVersion: 3275104958 + [1651053952.328551][155084:155089] CHIP:TOO: CatalogList: 2 entries + [1651053952.328589][155084:155089] CHIP:TOO: [1]: 123 + [1651053952.328620][155084:155089] CHIP:TOO: [2]: 456 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml index 0dd39c2949ce11..4dc1c77dc491e8 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_6.yaml @@ -28,12 +28,23 @@ tests: - name: "nodeId" value: nodeId - #Issue 17967 - - label: "Read Current App ID attribute." - PICS: PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "CurrentApp" - response: - value: null - constraints: - type: ApplicationEP + # Issue 13029 + - label: + "TH reads CurrentApp attribute from the DUT and Verify the in-focus + application attributes, which should include the display Application + ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is no + current in-focus application" + verification: | + ./chip-tool applicationlauncher read current-app 1 1 + [1653909423.450195][16364:16369] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050C Attribute 0x0000_0001 DataVersion: 2386582479 + [1653909423.450227][16364:16369] CHIP:TOO: CurrentApp: null + [1653909423.450318][16364:16369] CHIP:EM: Sending Standalone Ack for MessageCounter:2071603 on exchange 4134i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml index 71a60cbee6a366..5d3fbac7aa92ab 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Application Launcher" endpoint: 1 + catalogVendorId: + type: INT16U + defaultValue: 123 + applicationId: + type: CHAR_STRING + defaultValue: "exampleid" tests: - label: "Wait for the commissioned device to be retrieved" @@ -28,27 +34,26 @@ tests: - name: "nodeId" value: nodeId - #Issue 17969 - label: "Launch an app with the provided a application ID" - PICS: PICS_SKIP_SAMPLE_APP command: "LaunchApp" arguments: values: - name: "Data" value: "Hello World" - name: "application" - value: { catalogVendorId: 1234, applicationId: "HelloWorldApp" } + value: + { + catalogVendorId: catalogVendorId, + applicationId: applicationId, + } response: values: - - name: "Status" - value: 1 - - name: "Data" - value: "Hello World" + - name: "status" + value: 0 - label: "TH sends a LaunchApp command to DUT to launch an app which is not available" - PICS: PICS_SKIP_SAMPLE_APP command: "LaunchApp" arguments: values: @@ -56,27 +61,11 @@ tests: value: "Hello World" - name: "application" value: - { catalogVendorId: 1234, applicationId: "NonAvailableApp" } + { + catalogVendorId: catalogVendorId, + applicationId: "NonAvailableApp", + } response: values: - - name: "Status" + - name: "status" value: 1 - - name: "Data" - value: "Hello World" - - - label: "Launch an app with the provided a application ID" - PICS: PICS_SKIP_SAMPLE_APP - command: "LaunchApp" - arguments: - values: - - name: "data" - value: "Hello World" - - name: "application" - value: - { catalogVendorId: 1234, applicationId: "HelloWorldApp2" } - response: - values: - - name: "Status" - value: 2 - - name: "Data" - value: "Hello World" diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_8.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_8.yaml index 6940867449f687..4b0605306f50e1 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_8.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Application Launcher" endpoint: 1 + catalogVendorId: + type: INT16U + defaultValue: 123 + applicationId: + type: CHAR_STRING + defaultValue: "exampleid" tests: - label: "Wait for the commissioned device to be retrieved" @@ -28,24 +34,24 @@ tests: - name: "nodeId" value: nodeId - #Issue 17968 - label: "Stop an app with the provided application ID" - PICS: PICS_SKIP_SAMPLE_APP command: "StopApp" arguments: values: - name: "application" - value: { catalogVendorId: 1234, applicationId: "HelloWorldApp" } + value: + { + catalogVendorId: catalogVendorId, + applicationId: applicationId, + } response: values: - - name: "Status" + - name: "status" value: 0 - - name: "Data" - value: "Hello World" - label: "Reads the Status attribute" - PICS: PICS_SKIP_SAMPLE_APP cluster: "Application Basic" + endpoint: 3 command: "readAttribute" attribute: "Status" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml index b5c0fd75a6a4aa..9e3901165493ee 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_9.yaml @@ -18,6 +18,12 @@ config: nodeId: 0x12344321 cluster: "Application Launcher" endpoint: 1 + catalogVendorId: + type: INT16U + defaultValue: 123 + applicationId: + type: CHAR_STRING + defaultValue: "exampleid" tests: - label: "Wait for the commissioned device to be retrieved" @@ -28,18 +34,20 @@ tests: - name: "nodeId" value: nodeId - #Issue 17968 - label: "TH sends HideApp command to DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "HideApp" arguments: values: - name: "application" - value: { catalogVendorId: 1234, applicationId: "HelloWorldApp" } + value: + { + catalogVendorId: catalogVendorId, + applicationId: applicationId, + } - label: "Reads the Status attribute" - PICS: PICS_SKIP_SAMPLE_APP cluster: "Application Basic" + endpoint: 3 command: "readAttribute" attribute: "Status" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_5_1.yaml index 6e6a3f8e8485e1..e281135bc6e017 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_5_1.yaml @@ -28,9 +28,48 @@ tests: - name: "nodeId" value: nodeId - - label: "Reads the ChannelList attribute from the DUT" - command: "readAttribute" - attribute: "ChannelList" - response: - constraints: - type: list + # Issue 13029 + - label: + "TH reads the ChannelList attribute from the DUT and Verify that the + response contains a list of the known TV channels" + verification: | + ./chip-tool channel read channel-list 1 1 + [1651056337.291422][155797:155802] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0504 Attribute 0x0000_0000 DataVersion: 2113505570 + [1651056337.291517][155797:155802] CHIP:TOO: ChannelList: 4 entries + [1651056337.291571][155797:155802] CHIP:TOO: [1]: { + [1651056337.291589][155797:155802] CHIP:TOO: MajorNumber: 6 + [1651056337.291605][155797:155802] CHIP:TOO: MinorNumber: 0 + [1651056337.291621][155797:155802] CHIP:TOO: Name: ABC + [1651056337.291637][155797:155802] CHIP:TOO: CallSign: KAAL-TV + [1651056337.291653][155797:155802] CHIP:TOO: AffiliateCallSign: KAAL + [1651056337.291670][155797:155802] CHIP:TOO: } + [1651056337.291697][155797:155802] CHIP:TOO: [2]: { + [1651056337.291713][155797:155802] CHIP:TOO: MajorNumber: 9 + [1651056337.291727][155797:155802] CHIP:TOO: MinorNumber: 1 + [1651056337.291741][155797:155802] CHIP:TOO: Name: PBS + [1651056337.291757][155797:155802] CHIP:TOO: CallSign: KCTS-TV + [1651056337.291772][155797:155802] CHIP:TOO: AffiliateCallSign: KCTS + [1651056337.291786][155797:155802] CHIP:TOO: } + [1651056337.291813][155797:155802] CHIP:TOO: [3]: { + [1651056337.291827][155797:155802] CHIP:TOO: MajorNumber: 9 + [1651056337.291842][155797:155802] CHIP:TOO: MinorNumber: 2 + [1651056337.291857][155797:155802] CHIP:TOO: Name: PBS Kids + [1651056337.291871][155797:155802] CHIP:TOO: CallSign: KCTS-TV + [1651056337.291885][155797:155802] CHIP:TOO: AffiliateCallSign: KCTS + [1651056337.291899][155797:155802] CHIP:TOO: } + [1651056337.291924][155797:155802] CHIP:TOO: [4]: { + [1651056337.291938][155797:155802] CHIP:TOO: MajorNumber: 9 + [1651056337.291952][155797:155802] CHIP:TOO: MinorNumber: 3 + [1651056337.291966][155797:155802] CHIP:TOO: Name: World Channel + [1651056337.291980][155797:155802] CHIP:TOO: CallSign: KCTS-TV + [1651056337.291994][155797:155802] CHIP:TOO: AffiliateCallSign: KCTS + [1651056337.292007][155797:155802] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_5_2.yaml index 5531f65a516a7d..fedfbdc259524c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_5_2.yaml @@ -20,10 +20,10 @@ config: endpoint: 1 majornumber: type: INT16U - defaultValue: 1 + defaultValue: 9 minornumber: type: INT16U - defaultValue: 2 + defaultValue: 1 tests: - label: "Wait for the commissioned device to be retrieved" @@ -41,9 +41,7 @@ tests: constraints: type: list - #Issue 18097 - label: "TH sends a ChangeChannelByNumber command" - PICS: PICS_SKIP_SAMPLE_APP command: "ChangeChannelByNumber" arguments: values: @@ -52,17 +50,18 @@ tests: - name: "minorNumber" value: minornumber - - label: "log a command" + - label: "Verify that the channel has changed on the device" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "verify that the channel has changed on the device." + value: "Please enter 'y' if channel has changed on the device" + - name: "expectedValue" + value: "y" - #Issue 18094 - label: "Reads the CurrentChannel attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentChannel" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_5_3.yaml b/src/app/tests/suites/certification/Test_TC_MC_5_3.yaml index c00ff521972080..7b05475c161df4 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_5_3.yaml @@ -20,10 +20,10 @@ config: endpoint: 1 majornumber: type: INT16U - defaultValue: 1 + defaultValue: 9 minornumber: type: INT16U - defaultValue: 2 + defaultValue: 1 tests: - label: "Wait for the commissioned device to be retrieved" @@ -41,37 +41,34 @@ tests: constraints: type: list - #Issue 18094 - label: "Reads the CurrentChannel attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentChannel" response: - saveAs: currentChannelvalue value: [majorNumber: majornumber, minorNumber: minornumber] - #Issue 13084 and 18098 - label: "Sends a SkipChannel command to the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "SkipChannel" arguments: values: - name: "Count" value: 1 - - label: "log a command" + - label: "Verify that the channel has changed on the device" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "verify that the channel has changed on the device" + value: "Please enter 'y' if channel has changed on the device" + - name: "expectedValue" + value: "y" - #Issue 18094 and 13029 - label: "Reads the CurrentChannel attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentChannel" response: + value: [majorNumber: majornumber, minorNumber: minornumber + 1] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_MC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_6_1.yaml index c4bdb724327103..f66734d78650fc 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_6_1.yaml @@ -28,43 +28,38 @@ tests: - name: "nodeId" value: nodeId - #issue #12884 Media cluster commands and precondition not supported - - label: "Precondition: Connect media content available for playback" - disabled: true - - #Issue 18109 - label: "Precondition: Media content in a paused state at the beginning of the content" - PICS: PICS_SKIP_SAMPLE_APP command: "Pause" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that media is paused" + - name: "status" + value: 0 - label: "Reads the CurrentState attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentState" response: value: 1 - - label: "sends a Play command" - PICS: PICS_SKIP_SAMPLE_APP + - label: "Sends a Play command" command: "Play" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media state is playing" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Physically verify that the media is playing" + value: "Please enter 'y' if media state is playing" + - name: "expectedValue" + value: "y" - label: "Reads the playback state attribute" command: "readAttribute" @@ -73,38 +68,48 @@ tests: value: 0 - label: "sends a Pause command" - PICS: PICS_SKIP_SAMPLE_APP command: "Pause" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media is paused" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Physically verify that the media is paused" + value: "Please enter 'y' if media state is paused" + - name: "expectedValue" + value: "y" - label: "Reads the playback state attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentState" response: value: 1 - - label: "sends a Stop command" - PICS: PICS_SKIP_SAMPLE_APP + - label: "Sends a Stop command" command: "StopPlayback" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media is stoped" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Physically verify that the media is stoped" + value: "Please enter 'y' if media state is stoped" + - name: "expectedValue" + value: "y" - label: "Reads the playback state attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentState" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_6_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_6_2.yaml index 093e38abc091cf..b2ee0285226589 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_6_2.yaml @@ -28,46 +28,38 @@ tests: - name: "nodeId" value: nodeId - #issue #12884 Media cluster commands and precondition not supported - - label: "Precondition: Connect media content available for playback" - disabled: true - - label: "Precondition: Media content in a paused state at the beginning of the content" - PICS: PICS_SKIP_SAMPLE_APP command: "Pause" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that media is paused" - - - label: "Precondition: At least 2 media items are queued" - disabled: true + - name: "status" + value: 0 - #Issue 18109 - label: "Reads the CurrentState attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentState" response: value: 1 - label: "Sends a Play command to the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "Play" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media state is playing" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Physically verify that the media is playing" + value: "Please enter 'y' if media state is playing" + - name: "expectedValue" + value: "y" - label: "Reads the CurrentState attribute" command: "readAttribute" @@ -76,85 +68,115 @@ tests: value: 0 - label: "Sends a StartOver command to the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "StartOver" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media is started over" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Physically verify that the media is started over" + value: "Please enter 'y' if media is started over" + - name: "expectedValue" + value: "y" - label: "Sends a Next command to the DUT" command: "Next" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the next media item in the queue has been loaded" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" value: - "Verify that the next media item in the queue has been - loaded" + "Please enter 'y' if media item in the queue has been loaded" + - name: "expectedValue" + value: "y" - label: "Sends a Previous command to the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "Previous" + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the previous media item in the queue has been loaded" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" value: - "Verify that the previous media item in the queue has been - loaded" + "Please enter 'y' if previous media item in the queue has + been loaded" + - name: "expectedValue" + value: "y" - label: "Sends a SkipForward command to the DUT " - PICS: PICS_SKIP_SAMPLE_APP command: "SkipForward" arguments: values: - name: "DeltaPositionMilliseconds" value: 10000 + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media has skipped forward 10 seconds" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Verify that the media has skipped forward 10 seconds" + value: + "Please enter 'y' if media has skipped forward 10 seconds" + - name: "expectedValue" + value: "y" - label: "Reads the SampledPosition attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "SampledPosition" response: value: 10000 - label: "Sends a SkipBackward command to the DUT " - PICS: PICS_SKIP_SAMPLE_APP command: "SkipBackward" arguments: values: - name: "DeltaPositionMilliseconds" value: 10000 + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: "Verify that the media has skipped backward 10 seconds" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Verify that the media has skipped backward 10 seconds" + value: + "Please enter 'y' if media has skipped backward 10 seconds" + - name: "expectedValue" + value: "y" - label: "Reads the SampledPosition attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "SampledPosition" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_MC_6_3.yaml index ef2b62209afe9c..bfca20621f527a 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_6_3.yaml @@ -18,6 +18,9 @@ config: nodeId: 0x12344321 cluster: "Media Playback" endpoint: 1 + SeekPosition: + type: INT64U + defaultValue: 100000000 tests: - label: "Wait for the commissioned device to be retrieved" @@ -28,76 +31,120 @@ tests: - name: "nodeId" value: nodeId - #issue #12884 Media cluster commands and precondition not supported - - label: "Precondition: Connect media content available for playback" - disabled: true - - #Issue 18109 - label: "Precondition: Media content in a paused state at the beginning of the content" - PICS: PICS_SKIP_SAMPLE_APP command: "Pause" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that media is paused" + - name: "status" + value: 0 - label: "Sends a Seek command" - PICS: PICS_SKIP_SAMPLE_APP command: "Seek" arguments: values: - name: "Position" value: 10000 + response: + values: + - name: "status" + value: 0 - - label: "log a command" + - label: + "Verify that the media has moved to 10 seconds from the starting point" cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" value: - "Verify that the media has moved to 10 seconds from the - starting point." + "Please enter 'y' if media has moved to 10 seconds from the + starting point" + - name: "expectedValue" + value: "y" - label: "Reads the SampledPosition attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "SampledPosition" response: value: 10000 - #Issue #11475 User action needed - - label: "log a command" + #Issue 10988 + - label: "TH reads the StartTime attribute from the DUT" + verification: | + ./chip-tool mediaplayback read start-time 1 1 + [1654001778189] [97015:7707437] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0001 DataVersion: 775839144 + [1654001778190] [97015:7707437] CHIP: [TOO] StartTime: 0 cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: - "User prompt needed to enter the value beyond the furthest - valid position" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 10988 + - label: "TH reads the SeekRangeEnd attribute from the DUT" + verification: | + ./chip-tool mediaplayback read seek-range-end 1 1 + [1654002119527] [97409:7712444] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0005 DataVersion: 775839144 + [1654002119527] [97409:7712444] CHIP: [TOO] SeekRangeEnd: 80000 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 10988 + - label: "TH reads the SeekRangeStart attribute from the DUT" + verification: | + ./chip-tool mediaplayback read seek-range-start 1 1 + [1654751320.161753][2491:2496] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0006 DataVersion: 1615951406 + [1654751320.161846][2491:2496] CHIP:TOO: SeekRangeStart: 10000 + [1654751320.161941][2491:2496] CHIP:EM: Sending Standalone Ack for MessageCounter:120565821 on exchange 1929 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + #Issue 10988 + - label: "TH reads the Duration attribute from the DUT" + verification: | + ./chip-tool mediaplayback read duration 1 1 + [1654001869267] [97168:7708957] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0002 DataVersion: 775839144 + [1654001869267] [97168:7708957] CHIP: [TOO] Duration: 80000 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - # todo : Need a user input - label: "Sends a Seek command Position value beyond the furthest valid position" - PICS: PICS_SKIP_SAMPLE_APP command: "Seek" arguments: values: - name: "position" - value: 10000 - - # response: SEEK_OUT_OF_RANGE - - label: "Reads the SampledPosition attribute" - PICS: PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "SampledPosition" + value: SeekPosition response: - error: 5 + values: + - name: "status" + value: 5 diff --git a/src/app/tests/suites/certification/Test_TC_MC_6_4.yaml b/src/app/tests/suites/certification/Test_TC_MC_6_4.yaml index 3dffe2f9952b14..8829b6d41cbff9 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_6_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_6_4.yaml @@ -28,27 +28,16 @@ tests: - name: "nodeId" value: nodeId - #issue #12884 Media cluster commands and precondition not supported - - label: "Precondition: Connect media content available for playback" - disabled: true - - #Issue 18109 - label: "Precondition: Media content in a paused state at the beginning of the content" - PICS: PICS_SKIP_SAMPLE_APP command: "Pause" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that media is paused" + - name: "status" + value: 0 - label: "Reads the CurrentState attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentState" response: @@ -61,16 +50,11 @@ tests: value: 0 - label: "Sends a FastForward command" - PICS: PICS_SKIP_SAMPLE_APP command: "FastForward" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that the media is playing" + - name: "status" + value: 0 - label: "Reads the CurrentState attribute" command: "readAttribute" @@ -79,42 +63,30 @@ tests: value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "PlaybackSpeed" response: value: 1 - label: "Sends a FastForward command" - PICS: PICS_SKIP_SAMPLE_APP command: "FastForward" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that the media play speed has increased" + - name: "status" + value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "PlaybackSpeed" response: value: 2 - label: "Sends a Rewind command to the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "Rewind" - - - label: "log a command" - cluster: "LogCommands" - command: "UserPrompt" - arguments: + response: values: - - name: "message" - value: "Verify that the media play has reversed direction" + - name: "status" + value: 0 - label: "Reads the CurrentState attribute" command: "readAttribute" @@ -122,59 +94,98 @@ tests: response: value: 0 + #Issue 19800 - label: "Reads the PlaybackSpeed attribute from the DUT" - command: "readAttribute" - attribute: "PlaybackSpeed" - response: - value: -1 - - - label: "Sends a Rewind command to the DUT" - PICS: PICS_SKIP_SAMPLE_APP - command: "Rewind" - - - label: "log a command" + verification: | + ./chip-tool mediaplayback read playback-speed 1 3 + [1655114487.018204][41855:41860] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0506 Attribute 0x0000_0004 DataVersion: 4174921750 + [1655114487.018302][41855:41860] CHIP:TOO: PlaybackSpeed: -1.000000 + [1655114487.018421][41855:41860] CHIP:EM: Sending Standalone Ack for MessageCounter:163883813 on exchange 24959 cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Verify that the media play has reversed direction" + value: "Please enter 'y' if PlaybackSpeed value is -2" + - name: "expectedValue" + value: "y" - - label: "Reads the PlaybackSpeed attribute from the DUT" - command: "readAttribute" - attribute: "PlaybackSpeed" + - label: "Sends a Rewind command to the DUT" + command: "Rewind" response: - value: -2 - - - label: "Sends a Play command" - PICS: PICS_SKIP_SAMPLE_APP - command: "Play" + values: + - name: "status" + value: 0 - - label: "log a command" + #Issue 19800 + - label: "Reads the PlaybackSpeed attribute from the DUT" + verification: | + ./chip-tool mediaplayback read playback-speed 1 3 + [1655114711.400529][41871:41876] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0506 Attribute 0x0000_0004 DataVersion: 4174921750 + [1655114711.400683][41871:41876] CHIP:TOO: PlaybackSpeed: -2.000000 + [1655114711.400853][41871:41876] CHIP:EM: Sending Standalone Ack for MessageCounter:17386470 on exchange 38376 cluster: "LogCommands" command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: - "Verify that the media is has resumed playing forward at the - default speed" + value: "Please enter 'y' if PlaybackSpeed value is -2" + - name: "expectedValue" + value: "y" + + - label: "Sends a Play command" + command: "Play" + response: + values: + - name: "status" + value: 0 - label: "Reads the PlaybackSpeed attribute from the DUT" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "PlaybackSpeed" response: value: 1 + #Issue 10988 - label: "Sends consecutive FastForward commands" - PICS: PICS_SKIP_SAMPLE_APP - command: "FastForward" - response: - error: 4 + verification: | + Send below command consecutively multiple times to get error code as 4 + ./chip-tool mediaplayback fast-forward 1 3 + [1655460522.133486][12273:12278] CHIP:DMG: }, + [1655460522.133550][12273:12278] CHIP:DMG: Received Command Response Data, Endpoint=3 Cluster=0x0000_0506 Command=0x0000_000A + [1655460522.133603][12273:12278] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0506 Command 0x0000_000A + [1655460522.133667][12273:12278] CHIP:TOO: PlaybackResponse: { + [1655460522.133704][12273:12278] CHIP:TOO: status: 4 + [1655460522.133729][12273:12278] CHIP:TOO: data: data response + [1655460522.133751][12273:12278] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Sends consecutive Rewind commands" - PICS: PICS_SKIP_SAMPLE_APP - command: "Rewind" - response: - error: 4 + verification: | + Send below command consecutively multiple times to get error code as 4 + ./chip-tool mediaplayback rewind 1 3 + [1655460483.177033][12225:12230] CHIP:DMG: Received Command Response Data, Endpoint=3 Cluster=0x0000_0506 Command=0x0000_000A + [1655460483.177083][12225:12230] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0506 Command 0x0000_000A + [1655460483.177146][12225:12230] CHIP:TOO: PlaybackResponse: { + [1655460483.177182][12225:12230] CHIP:TOO: status: 4 + [1655460483.177206][12225:12230] CHIP:TOO: data: data response + [1655460483.177228][12225:12230] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MC_7_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_7_1.yaml index fc1b9210edf0f8..bfbf3e0de02bfe 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_7_1.yaml @@ -35,9 +35,7 @@ tests: constraints: type: OutPutInfo - #Issue 18100 - label: "Sends a SelectAudioOutput command" - PICS: PICS_SKIP_SAMPLE_APP command: "SelectOutput" arguments: values: @@ -45,7 +43,6 @@ tests: value: 1 - label: "Reads the CurrentOutput attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentOutput" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_7_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_7_2.yaml index 3803946f5ce1b7..10742ca4e35827 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_7_2.yaml @@ -36,9 +36,7 @@ tests: constraints: type: OutPutInfo - #Issue 18102 - label: "Sends a RenameOutput command" - PICS: PICS_SKIP_SAMPLE_APP command: "RenameOutput" arguments: values: @@ -51,6 +49,15 @@ tests: - label: "Reads the OutputList attribute from the DUT Verify that the output at the index provided in step 2 has the name CertTest" + verification: | + ./chip-tool audiooutput read output-list 1 1 + [1651061821.366426][156898:156903] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_050B Attribute 0x0000_0000 DataVersion: 372822880 + [1651061821.366510][156898:156903] CHIP:TOO: OutputList: 3 entries + [1651061821.366575][156898:156903] CHIP:TOO: [1]: { + [1651061821.366603][156898:156903] CHIP:TOO: Index: 1 + [1651061821.366619][156898:156903] CHIP:TOO: OutputType: 0 + [1651061821.366635][156898:156903] CHIP:TOO: Name: CertTest + [1651061821.366651][156898:156903] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_MC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_8_1.yaml index c01cd9948c8b9c..80c639f11e238c 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_8_1.yaml @@ -41,8 +41,6 @@ tests: constraints: type: uint8 - #Below steps disabled due to issue- #13029 - #Disabled due to issue - #13087 - label: "Reads the TargetList attribute" command: "readAttribute" attribute: "TargetList" @@ -51,21 +49,14 @@ tests: constraints: type: list - #Issue 18205 - label: "Sends a NavigateTarget command" - PICS: PICS_SKIP_SAMPLE_APP command: "NavigateTarget" arguments: values: - name: "Target" value: targetvalue1 - response: - values: - - name: "status" - value: 0 - label: "Reads the CurrentTarget attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentTarget" response: @@ -78,21 +69,14 @@ tests: constraints: type: list - #Issue 18205 - label: "Sends a NavigateTarget command" - PICS: PICS_SKIP_SAMPLE_APP command: "NavigateTarget" arguments: values: - name: "Target" value: targetvalue2 - response: - values: - - name: "status" - value: 0 - label: "Reads the CurrentTarget attribute" - PICS: PICS_SKIP_SAMPLE_APP command: "readAttribute" attribute: "CurrentTarget" response: diff --git a/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml index cdd224c9d7744b..43d13e07d4ea57 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_9_1.yaml @@ -19,7 +19,6 @@ name: config: nodeId: 0x12344321 cluster: "Application Basic" - # Default endpoint is 3, since that's where tv-app has this cluster. endpoint: 3 tests: @@ -31,14 +30,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition" - cluster: "LogCommands" - command: "Log" - arguments: - values: - - name: "message" - value: "DUT has one or more Content Apps available" - - label: "Reads the VendorName attribute" command: "readAttribute" attribute: "VendorName" diff --git a/src/app/tests/suites/certification/Test_TC_DM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_1_2.yaml rename to src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml index 2e66c83c99b59e..fafeffaadf720a 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.1.2. [TC-DM-1.2] Global Attributes for Node Operational Credentials + 11.1.2. [TC-OPCREDS-1.2] Global Attributes for Node Operational Credentials Cluster [DUT-Server] config: diff --git a/src/app/tests/suites/certification/Test_TC_DM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml similarity index 99% rename from src/app/tests/suites/certification/Test_TC_DM_3_1.yaml rename to src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml index 0cb43fa8f9785a..38f7145814e170 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 3.2.1. [TC-DM-3.1] Attribute-NOCs, TrustedRootCertificates list validation - [DUT-Commissionee] + 11.3.1. [TC-OPCREDS-3.1] Attribute-NOCs, TrustedRootCertificates list + validation [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml similarity index 98% rename from src/app/tests/suites/certification/Test_TC_DM_3_2.yaml rename to src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml index aa9eab9a5b1ed0..6097b12a90964f 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_2.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 10.3.2. [TC-DM-3.2] Attribute-CurrentFabricIndex validation - [DUT-Commissionee] + 11.3.2. [TC-OPCREDS-3.2] Attribute-CurrentFabricIndex validation + [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_3_3.yaml rename to src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml index f3be978230a6aa..6d173773df2a03 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_3.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 10.3.3. [TC-DM-3.3] Attribute-NOCs, Commands [DUT-Commissioner] +name: 11.3.3. [TC-OPCREDS-3.3] Attribute-NOCs, Commands [DUT-Client] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_DM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml similarity index 97% rename from src/app/tests/suites/certification/Test_TC_DM_3_4.yaml rename to src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml index d7d3890ef1029b..2f56e16db934f7 100644 --- a/src/app/tests/suites/certification/Test_TC_DM_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_4.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 10.3.4. [TC-DM-3.4] UpdateNOC-Error Condition [DUT-Commissionee] +name: 11.3.4. [TC-OPCREDS-3.4] UpdateNOC-Error Condition [DUT-Server] config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index c42097cabe9196..86c74bfb54f6a6 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -29,6 +29,7 @@ tests: value: nodeId - label: "Read the mandatory attribute constraints: MeasuredValue" + PICS: PRS.S.A0000 command: "readAttribute" attribute: "MeasuredValue" response: @@ -38,6 +39,7 @@ tests: maxValue: 32767 - label: "Read the mandatory attribute constraints: MinMeasuredValue" + PICS: PRS.S.A0001 command: "readAttribute" attribute: "MinMeasuredValue" response: @@ -47,6 +49,7 @@ tests: maxValue: 32767 - label: "Read the mandatory attribute constraints: MaxMeasuredValue" + PICS: PRS.S.A0002 command: "readAttribute" attribute: "MaxMeasuredValue" response: @@ -55,9 +58,8 @@ tests: minValue: -32768 maxValue: 32767 - #Issue 18243 - label: "Read the optional attribute: Tolerance" - optional: true + PICS: PRS.S.A0003 command: "readAttribute" attribute: "Tolerance" response: @@ -67,7 +69,7 @@ tests: maxValue: 2048 - label: "Read the optional attribute: ScaledValue" - optional: true + PICS: PRS.S.A0010 command: "readAttribute" attribute: "ScaledValue" response: @@ -77,7 +79,7 @@ tests: maxValue: 32767 - label: "Read the optional attribute: MinScaledValue" - optional: true + PICS: PRS.S.A0011 command: "readAttribute" attribute: "MinScaledValue" response: @@ -87,7 +89,7 @@ tests: maxValue: 32767 - label: "Read the optional attribute: MaxScaledValue" - optional: true + PICS: PRS.S.A0012 command: "readAttribute" attribute: "MaxScaledValue" response: @@ -97,7 +99,7 @@ tests: maxValue: 32767 - label: "Read the optional attribute: ScaledTolerance" - optional: true + PICS: PRS.S.A0013 command: "readAttribute" attribute: "ScaledTolerance" response: @@ -107,7 +109,7 @@ tests: maxValue: 2048 - label: "Read the optional attribute: Scale" - optional: true + PICS: PRS.S.A0014 command: "readAttribute" attribute: "Scale" response: diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml index e3c20211297faf..e195c12ed22567 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_2.yaml @@ -473,20 +473,27 @@ tests: minValue: 1 #Negative scenarios not implemented in CI - - label: "Log commands" + - label: "TH adds an unknown key/value pair in the advertised data" cluster: "LogCommands" - command: "Log" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" value: - "TH adds an unknown key/value pair in the advertised data" + "Please enter 'y' if TH adds an unknown key/value pair in + the advertised data" + - name: "expectedValue" + value: "y" #Negative scenarios not implemented in CI - - label: "Log commands" + - label: "Scan for DNS-SD commissioner advertisements from TH" cluster: "LogCommands" - command: "Log" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - name: "message" - value: "Scan for DNS-SD commissioner advertisements from TH" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_4.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_4.yaml index 8c999b3b5819dd..1b93ee31ac4eb3 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_4.yaml @@ -30,11 +30,16 @@ tests: #Issue #10811 if condition is required, need YAML support for this - label: "Reads Type attribute from DUT" - command: "readAttribute" - attribute: "Type" - PICS: A_TYPE - response: - constraints: - type: enum8 - minValue: 0 - maxValue: 9 + verification: | + ./chip-tool windowcovering read type 1 1 + [1650882457.304607][8640:8645] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0102 Attribute 0x0000_0000 DataVersion: 366273182 + [1650882457.304694][8640:8645] CHIP:TOO: Type: enum8 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_5.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_5.yaml index e902b761b26a1c..a43bca37d0ce83 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_5.yaml @@ -28,12 +28,11 @@ tests: - name: "nodeId" value: nodeId - - label: "Reads EndProductType attribute from DUT" + - label: "TH reads EndProductType attribute from DUT" command: "readAttribute" attribute: "EndProductType" PICS: A_ENDPRODUCTTYPE response: - value: 0 constraints: type: enum8 minValue: 0 diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index cc48a21efb25dc..56661793643a69 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -232,3 +232,13 @@ MC_KEYPADINPUT.S.LK=0 MC_KEYPADINPUT.S.NK=0 MC_KEYPADINPUT.S.NV=0 MC_MEDIAINPUT.S.NU=0 +#PRS +PRS.S.A0000=1 +PRS.S.A0001=1 +PRS.S.A0002=1 +PRS.S.A0003=0 +PRS.S.A0010=0 +PRS.S.A0011=0 +PRS.S.A0012=0 +PRS.S.A0013=0 +PRS.S.A0014=0 diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index f0877b8ba9b300..df243341165990 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -112,36 +112,36 @@ function getManualTests() { ]; const DeviceManagement = [ - 'Test_TC_DM_1_1', - 'Test_TC_DM_1_2', - 'Test_TC_DM_1_3', - 'Test_TC_DM_2_2', - 'Test_TC_DM_2_4', - 'Test_TC_DM_3_1', - 'Test_TC_DM_3_2', - 'Test_TC_DM_3_3', - 'Test_TC_DM_3_4', - 'Test_TC_DM_4_1', - 'Test_TC_DM_4_2', - 'Test_TC_DM_4_3', - 'Test_TC_DM_4_4', - 'Test_TC_DM_4_5', - 'Test_TC_DM_4_6', - 'Test_TC_DM_4_7', - 'Test_TC_DM_4_8', - 'Test_TC_DM_4_9', - 'Test_TC_DM_4_10', - 'Test_TC_DM_4_11', - 'Test_TC_DM_4_12', - 'Test_TC_DM_4_13', - 'Test_TC_DM_4_14', - 'Test_TC_DM_4_15', - 'Test_TC_DM_4_16', - 'Test_TC_DM_4_17', - 'Test_TC_DM_4_18', - 'Test_TC_DM_4_19', - 'Test_TC_DM_4_20', - 'Test_TC_DM_4_21', + 'Test_TC_BINFO_1_1', + 'Test_TC_OPCREDS_1_2', + 'Test_TC_CNET_1_3', + 'Test_TC_BINFO_2_2', + 'Test_TC_BINFO_2_4', + 'Test_TC_OPCREDS_3_1', + 'Test_TC_OPCREDS_3_2', + 'Test_TC_OPCREDS_3_3', + 'Test_TC_OPCREDS_3_4', + 'Test_TC_CNET_4_1', + 'Test_TC_CNET_4_2', + 'Test_TC_CNET_4_3', + 'Test_TC_CNET_4_4', + 'Test_TC_CNET_4_5', + 'Test_TC_CNET_4_6', + 'Test_TC_CNET_4_7', + 'Test_TC_CNET_4_8', + 'Test_TC_CNET_4_9', + 'Test_TC_CNET_4_10', + 'Test_TC_CNET_4_11', + 'Test_TC_CNET_4_12', + 'Test_TC_CNET_4_13', + 'Test_TC_CNET_4_14', + 'Test_TC_CNET_4_15', + 'Test_TC_CNET_4_16', + 'Test_TC_CNET_4_17', + 'Test_TC_CNET_4_18', + 'Test_TC_CNET_4_19', + 'Test_TC_CNET_4_20', + 'Test_TC_CNET_4_21', ]; const DiagnosticsLogs = [ @@ -215,10 +215,6 @@ function getManualTests() { 'Test_TC_MC_5_4', 'Test_TC_MC_5_5', 'Test_TC_MC_5_6', - 'Test_TC_MC_6_1', - 'Test_TC_MC_6_2', - 'Test_TC_MC_6_3', - 'Test_TC_MC_6_4', 'Test_TC_MC_6_5', 'Test_TC_MC_6_7', 'Test_TC_MC_7_3', @@ -372,11 +368,11 @@ function getManualTests() { ]; const DoorLock = [ - 'Test_TC_DL_1_1', - 'Test_TC_DL_2_1', - 'Test_TC_DL_2_6', - 'Test_TC_DL_2_8', - 'Test_TC_DL_2_10', + 'Test_TC_DLRK_1_1', + 'Test_TC_DLRK_2_1', + 'Test_TC_DLRK_2_6', + 'Test_TC_DLRK_2_8', + 'Test_TC_DLRK_2_10', ]; const LocalizationConfiguration = [ @@ -568,7 +564,7 @@ function getTests() { ]; const DeviceManagement = [ - 'Test_TC_DM_2_1', + 'Test_TC_BINFO_2_1', ]; const Descriptor = [ @@ -663,6 +659,10 @@ function getTests() { 'Test_TC_MC_5_1', 'Test_TC_MC_5_2', 'Test_TC_MC_5_3', + 'Test_TC_MC_6_1', + 'Test_TC_MC_6_2', + 'Test_TC_MC_6_3', + 'Test_TC_MC_6_4', 'Test_TC_MC_7_1', 'Test_TC_MC_7_2', 'Test_TC_MC_8_1', @@ -835,12 +835,12 @@ function getTests() { 'DL_UsersAndCredentials', 'DL_LockUnlock', 'DL_Schedules', - 'Test_TC_DL_2_2', - 'Test_TC_DL_2_3', - 'Test_TC_DL_2_4', - 'Test_TC_DL_2_5', - 'Test_TC_DL_2_7', - 'Test_TC_DL_2_9', + 'Test_TC_DLRK_2_2', + 'Test_TC_DLRK_2_3', + 'Test_TC_DLRK_2_4', + 'Test_TC_DLRK_2_5', + 'Test_TC_DLRK_2_7', + 'Test_TC_DLRK_2_9', ]; const Groups = [ diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 09a0c732804336..f61e3f92170d1b 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -101,8 +101,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) if (mSystemState != nullptr) { - mSystemState->Release(); - chip::Platform::Delete(mSystemState); + Platform::Delete(mSystemState); mSystemState = nullptr; } @@ -154,14 +153,18 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) #endif )); - stateParams.sessionMgr = chip::Platform::New(); - SimpleSessionResumptionStorage * sessionResumptionStorage = chip::Platform::New(); - stateParams.sessionResumptionStorage = sessionResumptionStorage; - stateParams.certificateValidityPolicy = params.certificateValidityPolicy; - stateParams.unsolicitedStatusHandler = Platform::New(); - stateParams.exchangeMgr = chip::Platform::New(); - stateParams.messageCounterManager = chip::Platform::New(); - stateParams.groupDataProvider = params.groupDataProvider; + stateParams.sessionMgr = chip::Platform::New(); + stateParams.certificateValidityPolicy = params.certificateValidityPolicy; + stateParams.unsolicitedStatusHandler = Platform::New(); + stateParams.exchangeMgr = chip::Platform::New(); + stateParams.messageCounterManager = chip::Platform::New(); + stateParams.groupDataProvider = params.groupDataProvider; + + // This is constructed with a base class deleter so we can std::move it into + // stateParams without a manual conversion below. + auto sessionResumptionStorage = + std::unique_ptr>( + Platform::New()); // if no fabricTable was provided, create one and track it in stateParams for cleanup FabricTable * tempFabricTable = nullptr; @@ -172,6 +175,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) ReturnErrorOnFailure(stateParams.fabricTable->Init(params.fabricIndependentStorage, params.operationalKeystore)); } ReturnErrorOnFailure(sessionResumptionStorage->Init(params.fabricIndependentStorage)); + stateParams.sessionResumptionStorage = std::move(sessionResumptionStorage); auto delegate = chip::Platform::MakeUnique(); ReturnErrorOnFailure(delegate->Init(stateParams.sessionMgr, stateParams.groupDataProvider)); @@ -198,7 +202,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // Enable listening for session establishment messages. ReturnErrorOnFailure(stateParams.caseServer->ListenForSessionEstablishment( - stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, stateParams.sessionResumptionStorage, + stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, stateParams.sessionResumptionStorage.get(), stateParams.certificateValidityPolicy, stateParams.groupDataProvider)); // @@ -232,7 +236,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) DeviceProxyInitParams deviceInitParams = { .sessionManager = stateParams.sessionMgr, - .sessionResumptionStorage = stateParams.sessionResumptionStorage, + .sessionResumptionStorage = stateParams.sessionResumptionStorage.get(), .exchangeMgr = stateParams.exchangeMgr, .fabricTable = stateParams.fabricTable, .clientPool = stateParams.caseClientPool, @@ -250,7 +254,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) ReturnErrorOnFailure(stateParams.caseSessionManager->Init(stateParams.systemLayer, sessionManagerConfig)); // store the system state - mSystemState = chip::Platform::New(stateParams); + mSystemState = chip::Platform::New(std::move(stateParams)); mSystemState->SetTempFabricTable(tempFabricTable); ChipLogDetail(Controller, "System State Initialized..."); return CHIP_NO_ERROR; @@ -321,21 +325,20 @@ void DeviceControllerFactory::Shutdown() { if (mSystemState != nullptr) { - mSystemState->Release(); - chip::Platform::Delete(mSystemState); + Platform::Delete(mSystemState); mSystemState = nullptr; } mFabricIndependentStorage = nullptr; mOperationalKeystore = nullptr; } -CHIP_ERROR DeviceControllerSystemState::Shutdown() +void DeviceControllerSystemState::Shutdown() { - VerifyOrReturnError(mRefCount <= 1, CHIP_ERROR_INCORRECT_STATE); + VerifyOrDie(mRefCount == 0); if (mHaveShutDown) { // Nothing else to do here. - return CHIP_NO_ERROR; + return; } mHaveShutDown = true; @@ -405,7 +408,8 @@ CHIP_ERROR DeviceControllerSystemState::Shutdown() // Consumers are expected to call PlaformMgr().StopEventLoopTask() before calling // DeviceController::Shutdown() in the CONFIG_DEVICE_LAYER configuration // - ReturnErrorOnFailure(DeviceLayer::PlatformMgr().Shutdown()); + CHIP_ERROR error = DeviceLayer::PlatformMgr().Shutdown(); + VerifyOrDie(error == CHIP_NO_ERROR); #endif if (mExchangeMgr != nullptr) @@ -459,8 +463,6 @@ CHIP_ERROR DeviceControllerSystemState::Shutdown() // so that SetupController/Commissioner can use it mFabrics = nullptr; } - - return CHIP_NO_ERROR; } } // namespace Controller diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index 5acbd03fb1193b..b760d574272787 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -116,7 +116,12 @@ class DeviceControllerFactory } CHIP_ERROR Init(FactoryInitParams params); + + // Shuts down matter and frees the system state. + // + // Must not be called while any controllers are alive. void Shutdown(); + CHIP_ERROR SetupController(SetupParams params, DeviceController & controller); CHIP_ERROR SetupCommissioner(SetupParams params, DeviceCommissioner & commissioner); @@ -135,8 +140,9 @@ class DeviceControllerFactory // // Some clients do not prefer a complete shutdown of the stack being initiated if // all device controllers have ceased to exist. To avoid that, this method has been - // created to permit retention of the underlying system state to avoid that. + // created to permit retention of the underlying system state. // + // NB: The system state will still be freed in Shutdown() regardless of this call. void RetainSystemState() { (void) mSystemState->Retain(); } // @@ -212,7 +218,7 @@ class DeviceControllerFactory }; private: - DeviceControllerFactory(){}; + DeviceControllerFactory() {} void PopulateInitParams(ControllerInitParams & controllerParams, const SetupParams & params); CHIP_ERROR InitSystemState(FactoryInitParams params); CHIP_ERROR InitSystemState(); diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index 390339f7fc33ed..28c80b888e75b3 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -83,8 +83,8 @@ struct DeviceControllerSystemStateParams // Params that will be deallocated via Platform::Delete in // DeviceControllerSystemState::Shutdown. - DeviceTransportMgr * transportMgr = nullptr; - SessionResumptionStorage * sessionResumptionStorage = nullptr; + DeviceTransportMgr * transportMgr = nullptr; + Platform::UniquePtr sessionResumptionStorage; Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; SessionManager * sessionMgr = nullptr; Protocols::SecureChannel::UnsolicitedStatusHandler * unsolicitedStatusHandler = nullptr; @@ -97,9 +97,13 @@ struct DeviceControllerSystemStateParams FabricTable::Delegate * fabricTableDelegate = nullptr; }; -// A representation of the internal state maintained by the DeviceControllerFactory -// and refcounted by Device Controllers. -// Expects that the creator of this object is the last one to release it. +// A representation of the internal state maintained by the DeviceControllerFactory. +// +// This class automatically maintains a count of active device controllers and +// shuts down Matter when there are none remaining. +// +// NB: Lifetime of the object itself is not managed by reference counting; it is +// owned by DeviceControllerFactory. class DeviceControllerSystemState { using OperationalDevicePool = DeviceControllerSystemStateParams::OperationalDevicePool; @@ -113,6 +117,7 @@ class DeviceControllerSystemState // above 1. In that case we need to make sure we call Shutdown(). Shutdown(); }; + DeviceControllerSystemState(DeviceControllerSystemStateParams params) : mSystemLayer(params.systemLayer), mTCPEndPointManager(params.tcpEndPointManager), mUDPEndPointManager(params.udpEndPointManager), mTransportMgr(params.transportMgr), mSessionMgr(params.sessionMgr), @@ -120,13 +125,18 @@ class DeviceControllerSystemState mMessageCounterManager(params.messageCounterManager), mFabrics(params.fabricTable), mCASEServer(params.caseServer), mCASESessionManager(params.caseSessionManager), mOperationalDevicePool(params.operationalDevicePool), mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider), - mFabricTableDelegate(params.fabricTableDelegate) + mFabricTableDelegate(params.fabricTableDelegate), mSessionResumptionStorage(std::move(params.sessionResumptionStorage)) { #if CONFIG_NETWORK_LAYER_BLE mBleLayer = params.bleLayer; #endif + VerifyOrDie(IsInitialized()); }; + // Acquires a reference to the system state. + // + // While a reference is held, the shared state is kept alive. Release() + // should be called to release the reference once it is no longer needed. DeviceControllerSystemState * Retain() { VerifyOrDie(mRefCount < std::numeric_limits::max()); @@ -134,20 +144,20 @@ class DeviceControllerSystemState return this; }; + // Releases a reference to the system state. + // + // The stack will shut down when all references are released. + // + // NB: The system state is owned by the factory; Relase() will not free it + // but will free its members (Shutdown()). void Release() { VerifyOrDie(mRefCount > 0); - mRefCount--; - if (mRefCount == 1) + if (--mRefCount == 0) { - // Only the factory should have a ref now, shutdown and release the underlying objects Shutdown(); } - else if (mRefCount == 0) - { - this->~DeviceControllerSystemState(); - } }; bool IsInitialized() { @@ -173,7 +183,7 @@ class DeviceControllerSystemState void SetTempFabricTable(FabricTable * tempFabricTable) { mTempFabricTable = tempFabricTable; } private: - DeviceControllerSystemState(){}; + DeviceControllerSystemState() {} System::Layer * mSystemLayer = nullptr; Inet::EndPointManager * mTCPEndPointManager = nullptr; @@ -193,17 +203,18 @@ class DeviceControllerSystemState CASEClientPool * mCASEClientPool = nullptr; Credentials::GroupDataProvider * mGroupDataProvider = nullptr; FabricTable::Delegate * mFabricTableDelegate = nullptr; + Platform::UniquePtr mSessionResumptionStorage; // If mTempFabricTable is not null, it was created during // DeviceControllerFactory::InitSystemState and needs to be // freed during shutdown FabricTable * mTempFabricTable = nullptr; - std::atomic mRefCount{ 1 }; + std::atomic mRefCount{ 0 }; bool mHaveShutDown = false; - CHIP_ERROR Shutdown(); + void Shutdown(); }; } // namespace Controller diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 25299318448045..2c585c70fb0c6d 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -74,7 +74,7 @@ AndroidDeviceControllerWrapper * AndroidDeviceControllerWrapper::AllocateNew( chip::Inet::EndPointManager * tcpEndPointManager, chip::Inet::EndPointManager * udpEndPointManager, AndroidOperationalCredentialsIssuerPtr opCredsIssuerPtr, jobject keypairDelegate, jbyteArray rootCertificate, jbyteArray intermediateCertificate, jbyteArray nodeOperationalCertificate, - jbyteArray ipkEpochKey, CHIP_ERROR * errInfoOnFailure) + jbyteArray ipkEpochKey, uint16_t listenPort, CHIP_ERROR * errInfoOnFailure) { if (errInfoOnFailure == nullptr) { @@ -140,7 +140,7 @@ AndroidDeviceControllerWrapper * AndroidDeviceControllerWrapper::AllocateNew( #if CONFIG_NETWORK_LAYER_BLE initParams.bleLayer = DeviceLayer::ConnectivityMgr().GetBleLayer(); #endif - initParams.listenPort = CHIP_PORT + 1; + initParams.listenPort = listenPort; setupParams.pairingDelegate = wrapper.get(); setupParams.operationalCredentialsDelegate = opCredsIssuer; initParams.fabricIndependentStorage = wrapper.get(); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index 14651e5dfbd891..7437701cbcf8aa 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -111,6 +111,7 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel * @param[in] intermediateCertificate an X.509 DER-encoded intermediate certificate for this node * @param[in] nodeOperationalCertificate an X.509 DER-encoded operational certificate for this node * @param[in] ipkEpochKey the IPK epoch key to use for this node + * @param[in] listenPort the UDP port to listen on * @param[out] errInfoOnFailure a pointer to a CHIP_ERROR that will be populated if this method returns nullptr */ static AndroidDeviceControllerWrapper * AllocateNew(JavaVM * vm, jobject deviceControllerObj, chip::NodeId nodeId, @@ -120,7 +121,7 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel AndroidOperationalCredentialsIssuerPtr opCredsIssuer, jobject keypairDelegate, jbyteArray rootCertificate, jbyteArray intermediateCertificate, jbyteArray nodeOperationalCertificate, - jbyteArray ipkEpochKey, CHIP_ERROR * errInfoOnFailure); + jbyteArray ipkEpochKey, uint16_t listenPort, CHIP_ERROR * errInfoOnFailure); private: using ChipDeviceControllerPtr = std::unique_ptr; diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index bb704ce4cc5905..b808a6b36f561f 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -87,6 +87,7 @@ android_library("java") { "src/chip/devicecontroller/ChipCommandType.java", "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", + "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DiscoveredDevice.java", "src/chip/devicecontroller/GetConnectedDeviceCallbackJni.java", "src/chip/devicecontroller/KeypairDelegate.java", diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 50ac6a8c4a35d7..5bf7a2c5cc5391 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -87,6 +87,8 @@ pthread_t sIOThread = PTHREAD_NULL; jclass sChipDeviceControllerExceptionCls = NULL; +const char * PARAMS_CLASS = "()Lchip/devicecontroller/ControllerParams;"; + } // namespace // NOTE: Remote device ID is in sync with the echo server device id @@ -153,9 +155,7 @@ void JNI_OnUnload(JavaVM * jvm, void * reserved) chip::Platform::MemoryShutdown(); } -JNI_METHOD(jlong, newDeviceController) -(JNIEnv * env, jobject self, jobject keypairDelegate, jbyteArray rootCertificate, jbyteArray intermediateCertificate, - jbyteArray operationalCertificate, jbyteArray ipk) +JNI_METHOD(jlong, newDeviceController)(JNIEnv * env, jobject self, jobject controllerParams) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -163,14 +163,48 @@ JNI_METHOD(jlong, newDeviceController) long result = 0; ChipLogProgress(Controller, "newDeviceController() called"); - std::unique_ptr opCredsIssuer( - new chip::Controller::AndroidOperationalCredentialsIssuer()); - wrapper = AndroidDeviceControllerWrapper::AllocateNew( - sJVM, self, kLocalDeviceId, chip::kUndefinedCATs, &DeviceLayer::SystemLayer(), DeviceLayer::TCPEndPointManager(), - DeviceLayer::UDPEndPointManager(), std::move(opCredsIssuer), keypairDelegate, rootCertificate, intermediateCertificate, - operationalCertificate, ipk, &err); + + // Retrieve initialization params. + jmethodID getUdpListenPort; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getUdpListenPort", PARAMS_CLASS, &getUdpListenPort); SuccessOrExit(err); + jmethodID getKeypairDelegate; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getKeypairDelegate", PARAMS_CLASS, + &getKeypairDelegate); + + jmethodID getRootCertificate; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getRootCertificate", PARAMS_CLASS, + &getRootCertificate); + + jmethodID getIntermediateCertificate; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getIntermediateCertificate", PARAMS_CLASS, + &getIntermediateCertificate); + + jmethodID getOperationalCertificate; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getOperationalCertificate", PARAMS_CLASS, + &getOperationalCertificate); + + jmethodID getIpk; + err = chip::JniReferences::GetInstance().FindMethod(env, controllerParams, "getIpk", PARAMS_CLASS, &getIpk); + + { + uint16_t listenPort = env->CallIntMethod(controllerParams, getUdpListenPort); + jobject keypairDelegate = env->CallObjectMethod(controllerParams, getKeypairDelegate); + jbyteArray rootCertificate = (jbyteArray) env->CallObjectMethod(controllerParams, getRootCertificate); + jbyteArray intermediateCertificate = (jbyteArray) env->CallObjectMethod(controllerParams, getIntermediateCertificate); + jbyteArray operationalCertificate = (jbyteArray) env->CallObjectMethod(controllerParams, getOperationalCertificate); + jbyteArray ipk = (jbyteArray) env->CallObjectMethod(controllerParams, getIpk); + + std::unique_ptr opCredsIssuer( + new chip::Controller::AndroidOperationalCredentialsIssuer()); + wrapper = AndroidDeviceControllerWrapper::AllocateNew( + sJVM, self, kLocalDeviceId, chip::kUndefinedCATs, &DeviceLayer::SystemLayer(), DeviceLayer::TCPEndPointManager(), + DeviceLayer::UDPEndPointManager(), std::move(opCredsIssuer), keypairDelegate, rootCertificate, intermediateCertificate, + operationalCertificate, ipk, listenPort, &err); + SuccessOrExit(err); + } + // Create and start the IO thread. Must be called after Controller()->Init if (sIOThread == PTHREAD_NULL) { diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 698d95e2ffe52e..b9d916bc6636c4 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -39,25 +39,14 @@ public static void loadJni() { return; } - /** - * Returns a new {@link ChipDeviceController} with ephemerally generated operational credentials. - */ + /** Returns a new {@link ChipDeviceController} with default parameters. */ public ChipDeviceController() { - deviceControllerPtr = newDeviceController(); + this(ControllerParams.newBuilder().build()); } - /** - * Returns a new {@link ChipDeviceController} which uses the provided {@code operationalKeyConfig} - * as its operating credentials. - */ - public ChipDeviceController(OperationalKeyConfig operationalKeyConfig) { - deviceControllerPtr = - newDeviceController( - operationalKeyConfig.getKeypairDelegate(), - operationalKeyConfig.getTrustedRootCertificate(), - operationalKeyConfig.getIntermediateCertificate(), - operationalKeyConfig.getNodeOperationalCertificate(), - operationalKeyConfig.getIpkEpochKey()); + /** Returns a new {@link ChipDeviceController} with the specified parameters. */ + public ChipDeviceController(ControllerParams params) { + deviceControllerPtr = newDeviceController(params); } public void setCompletionListener(CompletionListener listener) { @@ -431,16 +420,7 @@ public native void readPath( long devicePtr, List attributePaths); - private long newDeviceController() { - return newDeviceController(null, null, null, null, null); - } - - private native long newDeviceController( - @Nullable KeypairDelegate keypairDelegate, - @Nullable byte[] rootCertificate, - @Nullable byte[] intermediateCertificate, - @Nullable byte[] operationalCertificate, - @Nullable byte[] ipk); + private native long newDeviceController(ControllerParams params); private native void pairDevice( long deviceControllerPtr, diff --git a/src/controller/java/src/chip/devicecontroller/ControllerParams.java b/src/controller/java/src/chip/devicecontroller/ControllerParams.java new file mode 100644 index 00000000000000..ee7f7d09d63faa --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ControllerParams.java @@ -0,0 +1,118 @@ +package chip.devicecontroller; + +import androidx.annotation.Nullable; + +/** Parameters representing initialization arguments for {@link ChipDeviceController}. */ +public final class ControllerParams { + + private final int udpListenPort; + @Nullable private final KeypairDelegate keypairDelegate; + @Nullable private final byte[] rootCertificate; + @Nullable private final byte[] intermediateCertificate; + @Nullable private final byte[] operationalCertificate; + @Nullable private final byte[] ipk; + + private static final int LEGACY_GLOBAL_CHIP_PORT = 5540; + + /** @param udpListenPort the UDP listening port, or 0 to pick any available port. */ + private ControllerParams(Builder builder) { + this.udpListenPort = builder.udpListenPort; + this.keypairDelegate = builder.keypairDelegate; + this.rootCertificate = builder.rootCertificate; + this.intermediateCertificate = builder.intermediateCertificate; + this.operationalCertificate = builder.operationalCertificate; + this.ipk = builder.ipk; + } + + /** Gets the UDP listening port; 0 indicates "any available port" */ + public int getUdpListenPort() { + return udpListenPort; + } + + public KeypairDelegate getKeypairDelegate() { + return keypairDelegate; + } + + public byte[] getRootCertificate() { + return rootCertificate; + } + + public byte[] getIntermediateCertificate() { + return intermediateCertificate; + } + + public byte[] getOperationalCertificate() { + return operationalCertificate; + } + + public byte[] getIpk() { + return ipk; + } + + /** Returns parameters with ephemerally generated operational credentials */ + public static Builder newBuilder() { + return new Builder(); + } + + /** + * Returns parameters which uses the provided {@code operationalKeyConfig} as its operating + * credentials. + */ + public static Builder newBuilder(OperationalKeyConfig operationalKeyConfig) { + return newBuilder() + .setKeypairDelegate(operationalKeyConfig.getKeypairDelegate()) + .setRootCertificate(operationalKeyConfig.getTrustedRootCertificate()) + .setIntermediateCertificate(operationalKeyConfig.getIntermediateCertificate()) + .setOperationalCertificate(operationalKeyConfig.getNodeOperationalCertificate()) + .setIpk(operationalKeyConfig.getIpkEpochKey()); + } + + /** Builder for {@link ControllerParams}. */ + public static class Builder { + private int udpListenPort = LEGACY_GLOBAL_CHIP_PORT + 1; + @Nullable private KeypairDelegate keypairDelegate = null; + @Nullable private byte[] rootCertificate = null; + @Nullable private byte[] intermediateCertificate = null; + @Nullable private byte[] operationalCertificate = null; + @Nullable private byte[] ipk = null; + + private Builder() {} + + public Builder setUdpListenPort(int udpListenPort) { + if (udpListenPort < 0) { + throw new IllegalArgumentException("udpListenPort must be >= 0"); + } + this.udpListenPort = udpListenPort; + return this; + } + + public Builder setKeypairDelegate(KeypairDelegate keypairDelegate) { + this.keypairDelegate = keypairDelegate; + return this; + } + + public Builder setRootCertificate(byte[] rootCertificate) { + this.rootCertificate = rootCertificate; + return this; + } + + public Builder setIntermediateCertificate(byte[] intermediateCertificate) { + this.intermediateCertificate = intermediateCertificate; + return this; + } + + public Builder setOperationalCertificate(byte[] operationalCertificate) { + this.operationalCertificate = operationalCertificate; + return this; + } + + public Builder setIpk(byte[] ipk) { + this.ipk = ipk; + return this; + } + + public ControllerParams build() { + return new ControllerParams(this); + } + } +} diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index b3bc08899ebfbb..1e66101304a611 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -325,9 +325,6 @@ ExchangeContext::~ExchangeContext() VerifyOrDie(mExchangeMgr != nullptr && GetReferenceCount() == 0); VerifyOrDie(!IsAckPending()); - if (ReleaseSessionOnDestruction() && mSession) - mSession->AsSecureSession()->MarkForEviction(); - #if CONFIG_DEVICE_LAYER && CHIP_DEVICE_CONFIG_ENABLE_SED // Make sure that the exchange withdraws the request for Sleepy End Device active mode. UpdateSEDIntervalMode(false); @@ -371,6 +368,11 @@ bool ExchangeContext::MatchExchange(const SessionHandle & session, const PacketH void ExchangeContext::OnSessionReleased() { + if (ShouldIgnoreSessionRelease()) + { + return; + } + if (mFlags.Has(Flags::kFlagClosed)) { // Exchange is already being closed. It may occur when closing an exchange after sending @@ -573,5 +575,31 @@ ExchangeMessageDispatch & ExchangeContext::GetMessageDispatch(bool isEphemeralEx return ApplicationExchangeDispatch::Instance(); } +void ExchangeContext::AbortAllOtherCommunicationOnFabric() +{ + if (!mSession || !mSession->IsSecureSession()) + { + ChipLogError(ExchangeManager, "AbortAllOtherCommunicationOnFabric called when we don't have a PASE/CASE session"); + return; + } + + // Save our session so it does not actually go away. + Optional session = mSession.Get(); + + SetIgnoreSessionRelease(true); + + GetExchangeMgr()->GetSessionManager()->ExpireAllPairingsForFabric(mSession->GetFabricIndex()); + + mSession.GrabExpiredSession(session.Value()); + + SetIgnoreSessionRelease(false); +} + +void ExchangeContext::ExchangeSessionHolder::GrabExpiredSession(const SessionHandle & session) +{ + VerifyOrDie(session->AsSecureSession()->IsPendingEviction()); + GrabUnchecked(session); +} + } // namespace Messaging } // namespace chip diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h index b59c68cba17fb1..c52ba48630a726 100644 --- a/src/messaging/ExchangeContext.h +++ b/src/messaging/ExchangeContext.h @@ -184,15 +184,33 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, // using this function is recommended. void SetResponseTimeout(Timeout timeout); + // This API is used by commands that need to shut down all existing + // sessions/exchanges on a fabric but need to make sure the response to the + // command still goes out on the exchange the command came in on. This API + // will ensure that all secure sessions for the fabric this exchanges is on + // are released except the one this exchange is using, and will release + // that session once this exchange is done sending the response. + // + // This API is a no-op if called on an exchange that is not using a + // SecureSession. + void AbortAllOtherCommunicationOnFabric(); + private: + class ExchangeSessionHolder : public SessionHolderWithDelegate + { + public: + ExchangeSessionHolder(ExchangeContext & exchange) : SessionHolderWithDelegate(exchange) {} + void GrabExpiredSession(const SessionHandle & session); + }; + Timeout mResponseTimeout{ 0 }; // Maximum time to wait for response (in milliseconds); 0 disables response timeout. ExchangeDelegate * mDelegate = nullptr; ExchangeManager * mExchangeMgr = nullptr; ExchangeMessageDispatch & mDispatch; - SessionHolderWithDelegate mSession; // The connection state - uint16_t mExchangeId; // Assigned exchange ID. + ExchangeSessionHolder mSession; // The connection state + uint16_t mExchangeId; // Assigned exchange ID. /** * Determine whether a response is currently expected for a message that was sent over @@ -274,7 +292,22 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, void UpdateSEDIntervalMode(bool activeMode); static ExchangeMessageDispatch & GetMessageDispatch(bool isEphemeralExchange, ExchangeDelegate * delegate); + + // If SetAutoReleaseSession() is called, this exchange must be using a SecureSession, and should + // evict it when the exchange is done with all its work (including any MRP traffic). + inline void SetIgnoreSessionRelease(bool ignore); + inline bool ShouldIgnoreSessionRelease(); }; +inline void ExchangeContext::SetIgnoreSessionRelease(bool ignore) +{ + mFlags.Set(Flags::kFlagIgnoreSessionRelease, ignore); +} + +inline bool ExchangeContext::ShouldIgnoreSessionRelease() +{ + return mFlags.Has(Flags::kFlagIgnoreSessionRelease); +} + } // namespace Messaging } // namespace chip diff --git a/src/messaging/ExchangeMgr.cpp b/src/messaging/ExchangeMgr.cpp index c1d613d4aa39de..fcdcfeeecd5058 100644 --- a/src/messaging/ExchangeMgr.cpp +++ b/src/messaging/ExchangeMgr.cpp @@ -236,7 +236,14 @@ void ExchangeManager::OnMessageReceived(const PacketHeader & packetHeader, const packetHeader.GetDestinationGroupId().Value()); } - // Do not handle unsolicited messages on a inactive session. + // Do not handle messages that don't match an existing exchange on an + // inactive session, since we should not be creating new exchanges there. + if (!session->IsActiveSession()) + { + ChipLogProgress(ExchangeManager, "Dropping message on inactive session that does not match an existing exchange"); + return; + } + // If it's not a duplicate message, search for an unsolicited message handler if it is marked as being sent by an initiator. // Since we didn't find an existing exchange that matches the message, it must be an unsolicited message. However all // unsolicited messages must be marked as being from an initiator. @@ -376,23 +383,5 @@ void ExchangeManager::CloseAllContextsForDelegate(const ExchangeDelegate * deleg }); } -void ExchangeManager::AbortExchangesForFabricExceptOne(FabricIndex fabricIndex, ExchangeContext * deferred) -{ - VerifyOrDie(deferred->HasSessionHandle() && deferred->GetSessionHandle()->IsSecureSession()); - - mContextPool.ForEachActiveObject([&](auto * ec) { - if (ec->HasSessionHandle() && ec->GetSessionHandle()->GetFabricIndex() == fabricIndex) - { - if (ec == deferred) - ec->SetAutoReleaseSession(); - else - ec->Abort(); - } - return Loop::Continue; - }); - - mSessionManager->ReleaseSessionsForFabricExceptOne(fabricIndex, deferred->GetSessionHandle()); -} - } // namespace Messaging } // namespace chip diff --git a/src/messaging/ExchangeMgr.h b/src/messaging/ExchangeMgr.h index 112cddd82c7ecb..d6b775436799f4 100644 --- a/src/messaging/ExchangeMgr.h +++ b/src/messaging/ExchangeMgr.h @@ -183,11 +183,6 @@ class DLL_EXPORT ExchangeManager : public SessionMessageDelegate */ void CloseAllContextsForDelegate(const ExchangeDelegate * delegate); - // This API is used by commands that need to shut down all existing exchanges on a fabric but need to make sure the response to - // the command still goes out on the exchange the command came in on. This API flags that one exchange to shut down its session - // when it's done. - void AbortExchangesForFabricExceptOne(FabricIndex fabricIndex, ExchangeContext * deferred); - SessionManager * GetSessionManager() const { return mSessionManager; } ReliableMessageMgr * GetReliableMessageMgr() { return &mReliableMessageMgr; }; diff --git a/src/messaging/ReliableMessageContext.h b/src/messaging/ReliableMessageContext.h index 9b2f8d67ab0539..886ed5c3ba341b 100644 --- a/src/messaging/ReliableMessageContext.h +++ b/src/messaging/ReliableMessageContext.h @@ -124,11 +124,6 @@ class ReliableMessageContext /// Determine whether this exchange is a EphemeralExchange for replying a StandaloneAck bool IsEphemeralExchange() const; - // If SetAutoReleaseSession() is called, this exchange must be using a SecureSession, and should - // evict it when the exchange is done with all its work (including any MRP traffic). - void SetAutoReleaseSession(); - bool ReleaseSessionOnDestruction(); - /** * Get the reliable message manager that corresponds to this reliable * message context. @@ -170,8 +165,8 @@ class ReliableMessageContext /// When set, signifies that the exchange created sorely for replying a StandaloneAck kFlagEphemeralExchange = (1u << 9), - /// When set, automatically release the session when this exchange is destroyed. - kFlagAutoReleaseSession = (1u << 10), + /// When set, ignore session being released, because we are releasing it ourselves. + kFlagIgnoreSessionRelease = (1u << 10), }; BitFlags mFlags; // Internal state flags @@ -253,15 +248,5 @@ inline bool ReliableMessageContext::IsEphemeralExchange() const return mFlags.Has(Flags::kFlagEphemeralExchange); } -inline void ReliableMessageContext::SetAutoReleaseSession() -{ - mFlags.Set(Flags::kFlagAutoReleaseSession, true); -} - -inline bool ReliableMessageContext::ReleaseSessionOnDestruction() -{ - return mFlags.Has(Flags::kFlagAutoReleaseSession); -} - } // namespace Messaging } // namespace chip diff --git a/src/messaging/tests/BUILD.gn b/src/messaging/tests/BUILD.gn index 10f34fca6d2f45..4b7d0a2585ec2e 100644 --- a/src/messaging/tests/BUILD.gn +++ b/src/messaging/tests/BUILD.gn @@ -43,11 +43,13 @@ static_library("helpers") { chip_test_suite("tests") { output_name = "libMessagingLayerTests" - sources = [ "TestMessagingLayer.h" ] + test_sources = [] if (chip_device_platform != "efr32") { # TODO(#10447): ReliableMessage Test has HF, and ExchangeMgr hangs on EFR32. - sources += [ + # And TestAbortExchangesForFabric does not link on EFR32 for some reason. + test_sources += [ + "TestAbortExchangesForFabric.cpp", "TestExchangeMgr.cpp", "TestReliableMessageProtocol.cpp", ] @@ -67,9 +69,4 @@ chip_test_suite("tests") { "${nlio_root}:nlio", "${nlunit_test_root}:nlunit-test", ] - - tests = [ - "TestExchangeMgr", - "TestReliableMessageProtocol", - ] } diff --git a/src/messaging/tests/MessagingContext.h b/src/messaging/tests/MessagingContext.h index a759364de331e5..5ef51e1da99c6a 100644 --- a/src/messaging/tests/MessagingContext.h +++ b/src/messaging/tests/MessagingContext.h @@ -103,8 +103,6 @@ class MessagingContext : public PlatformMemoryUser static const uint16_t kAliceKeyId = 2; static const uint16_t kCharlieKeyId = 3; static const uint16_t kDavidKeyId = 4; - NodeId GetBobNodeId() const; - NodeId GetAliceNodeId() const; GroupId GetFriendsGroupId() const { return mFriendsGroupId; } SessionManager & GetSecureSessionManager() { return mSessionManager; } diff --git a/src/messaging/tests/TestAbortExchangesForFabric.cpp b/src/messaging/tests/TestAbortExchangesForFabric.cpp new file mode 100644 index 00000000000000..c83342b35e1fe2 --- /dev/null +++ b/src/messaging/tests/TestAbortExchangesForFabric.cpp @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file implements unit tests for aborting existing exchanges (except + * one) for a fabric. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + +using namespace chip; +using namespace chip::Messaging; +using namespace chip::System; +using namespace chip::Protocols; + +using TestContext = Test::LoopbackMessagingContext; + +class MockAppDelegate : public ExchangeDelegate +{ +public: + CHIP_ERROR OnMessageReceived(ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && buffer) override + { + mOnMessageReceivedCalled = true; + return CHIP_NO_ERROR; + } + + void OnResponseTimeout(ExchangeContext * ec) override {} + + bool mOnMessageReceivedCalled = false; +}; + +void CheckAbortAllButOneExchange(nlTestSuite * inSuite, void * inContext) +{ + TestContext & ctx = *reinterpret_cast(inContext); + + // We want to have two sessions using the same fabric id that we use for + // creating our exchange contexts. That lets us test exchanges on the same + // session as the "special exchange" as well as on other sessions. + auto & sessionManager = ctx.GetSecureSessionManager(); + + // Use key ids that are not going to collide with anything else that ctx is + // doing. + // TODO: These should really be CASE sessions... + SessionHolder session1; + CHIP_ERROR err = + sessionManager.InjectPaseSessionWithTestKey(session1, 100, ctx.GetBobFabric()->GetNodeId(), 101, ctx.GetAliceFabricIndex(), + ctx.GetBobAddress(), CryptoContext::SessionRole::kInitiator); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SessionHolder session1Reply; + err = sessionManager.InjectPaseSessionWithTestKey(session1Reply, 101, ctx.GetAliceFabric()->GetNodeId(), 100, + ctx.GetBobFabricIndex(), ctx.GetAliceAddress(), + CryptoContext::SessionRole::kResponder); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + // TODO: Ideally this would go to a different peer, but we don't have that + // set up right now: only Alice and Bob have useful node ids and whatnot. + SessionHolder session2; + err = + sessionManager.InjectPaseSessionWithTestKey(session2, 200, ctx.GetBobFabric()->GetNodeId(), 201, ctx.GetAliceFabricIndex(), + ctx.GetBobAddress(), CryptoContext::SessionRole::kInitiator); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + SessionHolder session2Reply; + err = sessionManager.InjectPaseSessionWithTestKey(session2Reply, 201, ctx.GetAliceFabric()->GetNodeId(), 200, + ctx.GetBobFabricIndex(), ctx.GetAliceAddress(), + CryptoContext::SessionRole::kResponder); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + auto & exchangeMgr = ctx.GetExchangeManager(); + + MockAppDelegate delegate; + Echo::EchoServer server; + err = server.Init(&exchangeMgr); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + auto & loopback = ctx.GetLoopback(); + + auto trySendMessage = [&](ExchangeContext * exchange, SendMessageFlags flags) { + PacketBufferHandle buffer = MessagePacketBuffer::New(0); + NL_TEST_ASSERT(inSuite, !buffer.IsNull()); + return exchange->SendMessage(Echo::MsgType::EchoRequest, std::move(buffer), flags); + }; + + auto sendAndDropMessage = [&](ExchangeContext * exchange, SendMessageFlags flags) { + // Send a message on the given exchange with the given flags, make sure + // it's not delivered. + loopback.mNumMessagesToDrop = 1; + loopback.mDroppedMessageCount = 0; + + err = trySendMessage(exchange, flags); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(inSuite, !delegate.mOnMessageReceivedCalled); + NL_TEST_ASSERT(inSuite, loopback.mDroppedMessageCount == 1); + }; + + ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + + // We want to test three possible exchange states: + // 1) Closed but waiting for ack. + // 2) Waiting for a response. + // 3) Waiting for a send. + auto * waitingForAck1 = exchangeMgr.NewContext(session1.Get().Value(), &delegate); + NL_TEST_ASSERT(inSuite, waitingForAck1 != nullptr); + sendAndDropMessage(waitingForAck1, SendMessageFlags::kNone); + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); + + auto * waitingForAck2 = exchangeMgr.NewContext(session2.Get().Value(), &delegate); + NL_TEST_ASSERT(inSuite, waitingForAck2 != nullptr); + sendAndDropMessage(waitingForAck2, SendMessageFlags::kNone); + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 2); + + auto * waitingForIncomingMessage1 = exchangeMgr.NewContext(session1.Get().Value(), &delegate); + NL_TEST_ASSERT(inSuite, waitingForIncomingMessage1 != nullptr); + sendAndDropMessage(waitingForIncomingMessage1, SendMessageFlags::kExpectResponse); + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 3); + + auto * waitingForIncomingMessage2 = exchangeMgr.NewContext(session2.Get().Value(), &delegate); + NL_TEST_ASSERT(inSuite, waitingForIncomingMessage2 != nullptr); + sendAndDropMessage(waitingForIncomingMessage2, SendMessageFlags::kExpectResponse); + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 4); + + auto * waitingForSend1 = exchangeMgr.NewContext(session1.Get().Value(), &delegate); + NL_TEST_ASSERT(inSuite, waitingForSend1 != nullptr); + waitingForSend1->WillSendMessage(); + + auto * waitingForSend2 = exchangeMgr.NewContext(session2.Get().Value(), &delegate); + NL_TEST_ASSERT(inSuite, waitingForSend2 != nullptr); + waitingForSend2->WillSendMessage(); + + // Grab handles to our sessions now, before we evict things. + const auto & sessionHandle1 = session1.Get(); + const auto & sessionHandle2 = session2.Get(); + + NL_TEST_ASSERT(inSuite, session1); + NL_TEST_ASSERT(inSuite, session2); + auto * specialExhange = exchangeMgr.NewContext(session1.Get().Value(), &delegate); + specialExhange->AbortAllOtherCommunicationOnFabric(); + + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); + NL_TEST_ASSERT(inSuite, !session1); + NL_TEST_ASSERT(inSuite, !session2); + + NL_TEST_ASSERT(inSuite, exchangeMgr.NewContext(sessionHandle1.Value(), &delegate) == nullptr); + NL_TEST_ASSERT(inSuite, exchangeMgr.NewContext(sessionHandle2.Value(), &delegate) == nullptr); + + // Make sure we can't send messages on any of the other exchanges. + NL_TEST_ASSERT(inSuite, trySendMessage(waitingForSend1, SendMessageFlags::kExpectResponse) != CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, trySendMessage(waitingForSend2, SendMessageFlags::kExpectResponse) != CHIP_NO_ERROR); + + // Make sure we can send a message on the special exchange. + NL_TEST_ASSERT(inSuite, !delegate.mOnMessageReceivedCalled); + err = trySendMessage(specialExhange, SendMessageFlags::kNone); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + // Should be waiting for an ack now. + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 1); + + ctx.DrainAndServiceIO(); + + // Should not get an app-level response, since we are not expecting one. + NL_TEST_ASSERT(inSuite, !delegate.mOnMessageReceivedCalled); + // We should have gotten our ack. + NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); + + waitingForSend1->Close(); + waitingForSend2->Close(); +} + +// Test Suite + +/** + * Test Suite that lists all the test functions. + */ +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("Test aborting all but one exchange", CheckAbortAllButOneExchange), + + NL_TEST_SENTINEL() +}; +// clang-format on + +// clang-format off +nlTestSuite sSuite = +{ + "Test-AbortExchangesForFabric", + &sTests[0], + TestContext::Initialize, + TestContext::Finalize +}; +// clang-format on + +} // anonymous namespace + +/** + * Main + */ +int TestAbortExchangesForFabric() +{ + TestContext sContext; + + // Run test suit against one context + nlTestRunner(&sSuite, &sContext); + + return (nlTestRunnerStats(&sSuite)); +} + +CHIP_REGISTER_TEST_SUITE(TestAbortExchangesForFabric); diff --git a/src/messaging/tests/TestExchangeMgr.cpp b/src/messaging/tests/TestExchangeMgr.cpp index 52ecc256ecca94..05aa6cddbd63e4 100644 --- a/src/messaging/tests/TestExchangeMgr.cpp +++ b/src/messaging/tests/TestExchangeMgr.cpp @@ -21,8 +21,6 @@ * This file implements unit tests for the ExchangeManager implementation. */ -#include "TestMessagingLayer.h" - #include #include #include diff --git a/src/messaging/tests/TestExchangeMgrDriver.cpp b/src/messaging/tests/TestExchangeMgrDriver.cpp deleted file mode 100644 index c4699e8d27bb50..00000000000000 --- a/src/messaging/tests/TestExchangeMgrDriver.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file implements a standalone/native program executable - * test driver for the CHIP core library CHIP ExchangeManager tests. - * - */ - -#include "TestMessagingLayer.h" - -#include - -int main() -{ - // Generate machine-readable, comma-separated value (CSV) output. - nlTestSetOutputStyle(OUTPUT_CSV); - - return (TestExchangeMgr()); -} diff --git a/src/messaging/tests/TestMessagingLayer.h b/src/messaging/tests/TestMessagingLayer.h deleted file mode 100644 index 7bdcef314c4c0b..00000000000000 --- a/src/messaging/tests/TestMessagingLayer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file declares test entry points for CHIP Messaging layer - * layer library unit tests. - * - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -int TestExchangeMgr(void); -int TestReliableMessageProtocol(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 4ddf2c63919759..a0c204c919366e 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -22,8 +22,6 @@ * implementation. */ -#include "TestMessagingLayer.h" - #include #include #include diff --git a/src/messaging/tests/TestReliableMessageProtocolDriver.cpp b/src/messaging/tests/TestReliableMessageProtocolDriver.cpp deleted file mode 100644 index b7cac4537e3f62..00000000000000 --- a/src/messaging/tests/TestReliableMessageProtocolDriver.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file implements a standalone/native program executable test driver - * for the CHIP core library CHIP ReliableMessageProtocol tests. - * - */ - -#include "TestMessagingLayer.h" - -#include - -int main() -{ - // Generate machine-readable, comma-separated value (CSV) output. - nlTestSetOutputStyle(OUTPUT_CSV); - - return (TestReliableMessageProtocol()); -} diff --git a/src/platform/Linux/BUILD.gn b/src/platform/Linux/BUILD.gn index 29c232f2a97159..24a69a0a8781cb 100644 --- a/src/platform/Linux/BUILD.gn +++ b/src/platform/Linux/BUILD.gn @@ -65,7 +65,6 @@ static_library("Linux") { "Logging.cpp", "NetworkCommissioningDriver.h", "NetworkCommissioningEthernetDriver.cpp", - "NetworkCommissioningThreadDriver.cpp", "NetworkCommissioningWiFiDriver.cpp", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", @@ -84,6 +83,10 @@ static_library("Linux") { "bluez/Types.h", ] + if (chip_enable_openthread) { + sources += [ "NetworkCommissioningThreadDriver.cpp" ] + } + deps = [ "${chip_root}/src/setup_payload" ] public_deps = [ @@ -123,6 +126,8 @@ static_library("Linux") { } if (chip_enable_wifi) { + sources += [ "GlibTypeDeleter.h" ] + public_deps += [ "dbus/wpa" ] } diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index f30e0648435c57..30d713a5f7bb14 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -57,6 +57,7 @@ #endif #if CHIP_DEVICE_CONFIG_ENABLE_WPA +#include #include #endif diff --git a/src/platform/webos/CHIPWebOSStorageIni.cpp b/src/platform/webos/CHIPWebOSStorageIni.cpp index 4ec7e7df018386..fef2a3750df09a 100644 --- a/src/platform/webos/CHIPWebOSStorageIni.cpp +++ b/src/platform/webos/CHIPWebOSStorageIni.cpp @@ -43,24 +43,6 @@ CHIP_ERROR ChipLinuxStorageIni::Init() return RemoveAll(); } -CHIP_ERROR ChipLinuxStorageIni::GetDefaultSection(std::map & section) -{ - CHIP_ERROR retval = CHIP_NO_ERROR; - - auto it = mConfigStore.sections.find("DEFAULT"); - - if (it != mConfigStore.sections.end()) - { - section = mConfigStore.sections["DEFAULT"]; - } - else - { - retval = CHIP_ERROR_KEY_NOT_FOUND; - } - - return retval; -} - CHIP_ERROR ChipLinuxStorageIni::AddConfig(const std::string & configFile) { CHIP_ERROR retval = CHIP_NO_ERROR; @@ -125,13 +107,13 @@ CHIP_ERROR ChipLinuxStorageIni::CommitConfig(const std::string & configFile) CHIP_ERROR ChipLinuxStorageIni::GetUInt16Value(const char * key, uint16_t & val) { CHIP_ERROR retval = CHIP_NO_ERROR; - std::map section; - retval = GetDefaultSection(section); + auto isConfigFind = mConfigStore.sections.find("DEFAULT"); - if (retval == CHIP_NO_ERROR) + if (isConfigFind != mConfigStore.sections.end()) { - auto it = section.find(key); + std::map & section = mConfigStore.sections["DEFAULT"]; + auto it = section.find(key); if (it != section.end()) { @@ -152,13 +134,12 @@ CHIP_ERROR ChipLinuxStorageIni::GetUInt16Value(const char * key, uint16_t & val) CHIP_ERROR ChipLinuxStorageIni::GetUIntValue(const char * key, uint32_t & val) { CHIP_ERROR retval = CHIP_NO_ERROR; - std::map section; + auto isConfigFind = mConfigStore.sections.find("DEFAULT"); - retval = GetDefaultSection(section); - - if (retval == CHIP_NO_ERROR) + if (isConfigFind != mConfigStore.sections.end()) { - auto it = section.find(key); + std::map & section = mConfigStore.sections["DEFAULT"]; + auto it = section.find(key); if (it != section.end()) { @@ -179,13 +160,12 @@ CHIP_ERROR ChipLinuxStorageIni::GetUIntValue(const char * key, uint32_t & val) CHIP_ERROR ChipLinuxStorageIni::GetUInt64Value(const char * key, uint64_t & val) { CHIP_ERROR retval = CHIP_NO_ERROR; - std::map section; + auto isConfigFind = mConfigStore.sections.find("DEFAULT"); - retval = GetDefaultSection(section); - - if (retval == CHIP_NO_ERROR) + if (isConfigFind != mConfigStore.sections.end()) { - auto it = section.find(key); + std::map & section = mConfigStore.sections["DEFAULT"]; + auto it = section.find(key); if (it != section.end()) { @@ -206,13 +186,12 @@ CHIP_ERROR ChipLinuxStorageIni::GetUInt64Value(const char * key, uint64_t & val) CHIP_ERROR ChipLinuxStorageIni::GetStringValue(const char * key, char * buf, size_t bufSize, size_t & outLen) { CHIP_ERROR retval = CHIP_NO_ERROR; - std::map section; - - retval = GetDefaultSection(section); + auto isConfigFind = mConfigStore.sections.find("DEFAULT"); - if (retval == CHIP_NO_ERROR) + if (isConfigFind != mConfigStore.sections.end()) { - auto it = section.find(key); + std::map & section = mConfigStore.sections["DEFAULT"]; + auto it = section.find(key); if (it != section.end()) { @@ -251,12 +230,13 @@ CHIP_ERROR ChipLinuxStorageIni::GetBinaryBlobDataAndLengths(const char * key, size_t & encodedDataLen, size_t & decodedDataLen) { size_t encodedDataPaddingLen = 0; - std::map section; - CHIP_ERROR err = GetDefaultSection(section); - if (err != CHIP_NO_ERROR) + auto isConfigFind = mConfigStore.sections.find("DEFAULT"); + + if (isConfigFind == mConfigStore.sections.end()) { - return err; + return CHIP_ERROR_KEY_NOT_FOUND; } + std::map & section = mConfigStore.sections["DEFAULT"]; auto it = section.find(key); if (it == section.end()) @@ -333,12 +313,13 @@ CHIP_ERROR ChipLinuxStorageIni::GetBinaryBlobValue(const char * key, uint8_t * d bool ChipLinuxStorageIni::HasValue(const char * key) { - std::map section; + auto isConfigFind = mConfigStore.sections.find("DEFAULT"); - if (GetDefaultSection(section) != CHIP_NO_ERROR) + if (isConfigFind == mConfigStore.sections.end()) return false; - auto it = section.find(key); + std::map & section = mConfigStore.sections["DEFAULT"]; + auto it = section.find(key); return it != section.end(); } diff --git a/src/platform/webos/CHIPWebOSStorageIni.h b/src/platform/webos/CHIPWebOSStorageIni.h index 1c6e564c12bf35..a0ef5846058e1d 100644 --- a/src/platform/webos/CHIPWebOSStorageIni.h +++ b/src/platform/webos/CHIPWebOSStorageIni.h @@ -52,7 +52,6 @@ class ChipLinuxStorageIni CHIP_ERROR RemoveAll(); private: - CHIP_ERROR GetDefaultSection(std::map & section); CHIP_ERROR GetBinaryBlobDataAndLengths(const char * key, chip::Platform::ScopedMemoryBuffer & encodedData, size_t & encodedDataLen, size_t & decodedDataLen); inipp::Ini mConfigStore; diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 16362db96a8b04..e303fc2f3a1dbb 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -482,7 +482,7 @@ CHIP_ERROR CASESession::HandleSigma1_and_SendSigma2(System::PacketBufferHandle & return CHIP_NO_ERROR; } -CHIP_ERROR CASESession::FindLocalNodeFromDestionationId(const ByteSpan & destinationId, const ByteSpan & initiatorRandom) +CHIP_ERROR CASESession::FindLocalNodeFromDestinationId(const ByteSpan & destinationId, const ByteSpan & initiatorRandom) { VerifyOrReturnError(mFabricsTable != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -604,13 +604,13 @@ CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg) } // Attempt to match the initiator's desired destination based on local fabric table. - err = FindLocalNodeFromDestionationId(destinationIdentifier, initiatorRandom); + err = FindLocalNodeFromDestinationId(destinationIdentifier, initiatorRandom); if (err == CHIP_NO_ERROR) { ChipLogProgress(SecureChannel, "CASE matched destination ID: fabricIndex %u, NodeID 0x" ChipLogFormatX64, static_cast(mFabricIndex), ChipLogValueX64(mLocalNodeId)); - // Side-effect of FindLocalNodeFromDestionationId success was that mFabricIndex/mLocalNodeId are now + // Side-effect of FindLocalNodeFromDestinationId success was that mFabricIndex/mLocalNodeId are now // set to the local fabric and associated NodeId that was targeted by the initiator. } else diff --git a/src/protocols/secure_channel/CASESession.h b/src/protocols/secure_channel/CASESession.h index 5586417533d1cf..5ee8c247b60fdd 100644 --- a/src/protocols/secure_channel/CASESession.h +++ b/src/protocols/secure_channel/CASESession.h @@ -226,7 +226,7 @@ class DLL_EXPORT CASESession : public Messaging::UnsolicitedMessageHandler, CHIP_ERROR RecoverInitiatorIpk(); // On success, sets locally maching mFabricInfo in internal state to the entry matched by // destinationId/initiatorRandom from processing of Sigma1, and sets mIpk to the right IPK. - CHIP_ERROR FindLocalNodeFromDestionationId(const ByteSpan & destinationId, const ByteSpan & initiatorRandom); + CHIP_ERROR FindLocalNodeFromDestinationId(const ByteSpan & destinationId, const ByteSpan & initiatorRandom); CHIP_ERROR SendSigma1(); CHIP_ERROR HandleSigma1_and_SendSigma2(System::PacketBufferHandle && msg); diff --git a/src/transport/SecureSession.cpp b/src/transport/SecureSession.cpp index 5af68d5fd35504..adb1db94872033 100644 --- a/src/transport/SecureSession.cpp +++ b/src/transport/SecureSession.cpp @@ -117,11 +117,6 @@ void SecureSession::MarkAsDefunct() // return; - case State::kInactive: - // - // Once a session is marked Inactive, we CANNOT bring it back to either being active or defunct. - // - FALLTHROUGH; case State::kPendingEviction: // // Once a session is headed for eviction, we CANNOT bring it back to either being active or defunct. @@ -148,8 +143,6 @@ void SecureSession::MarkForEviction() case State::kDefunct: FALLTHROUGH; case State::kActive: - FALLTHROUGH; - case State::kInactive: Release(); // Decrease the ref which is retained at Activate MoveToState(State::kPendingEviction); NotifySessionReleased(); @@ -161,29 +154,6 @@ void SecureSession::MarkForEviction() } } -void SecureSession::MarkInactive() -{ - ChipLogDetail(Inet, "SecureSession[%p]: MarkInactive Type:%d LSID:%d", this, to_underlying(mSecureSessionType), - mLocalSessionId); - ReferenceCountedHandle ref(*this); - switch (mState) - { - case State::kEstablishing: - VerifyOrDie(false); - return; - case State::kDefunct: - FALLTHROUGH; - case State::kActive: - // By setting this state, IsActiveSession() will return false, which prevents creating new exchanges. - mState = State::kInactive; - return; - case State::kInactive: - case State::kPendingEviction: - // Do nothing - return; - } -} - Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const { Access::SubjectDescriptor subjectDescriptor; diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index 6c68e9bc72211a..8f026ad83009a6 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -147,9 +147,6 @@ class SecureSession : public Session, public ReferenceCountedAsSecureSession()->IsEstablishing()) return false; - mSession.Emplace(session.mSession); - session->AddHolder(*this); + GrabUnchecked(session); return true; } @@ -96,9 +95,15 @@ bool SessionHolder::Grab(const SessionHandle & session) if (!session->IsActiveSession()) return false; + GrabUnchecked(session); + return true; +} + +void SessionHolder::GrabUnchecked(const SessionHandle & session) +{ + VerifyOrDie(!mSession.HasValue()); mSession.Emplace(session.mSession); session->AddHolder(*this); - return true; } void SessionHolder::Release() diff --git a/src/transport/SessionHolder.h b/src/transport/SessionHolder.h index 2886987685940f..8d830a267d763d 100644 --- a/src/transport/SessionHolder.h +++ b/src/transport/SessionHolder.h @@ -73,7 +73,10 @@ class SessionHolder : public IntrusiveListNodeBase<> // There is not delegate, nothing to do here virtual void DispatchSessionEvent(SessionDelegate::Event event) {} -private: +protected: + // Helper for use by the Grab methods. + void GrabUnchecked(const SessionHandle & session); + Optional> mSession; }; diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 5be749e54393f8..db37077fa3869a 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -368,23 +368,6 @@ void SessionManager::ExpireAllPASEPairings() }); } -void SessionManager::ReleaseSessionsForFabricExceptOne(FabricIndex fabricIndex, const SessionHandle & deferred) -{ - VerifyOrDie(deferred->IsSecureSession()); - SecureSession * deferredSecureSession = deferred->AsSecureSession(); - - mSecureSessions.ForEachSession([&](auto session) { - if (session->GetPeer().GetFabricIndex() == fabricIndex) - { - if (session == deferredSecureSession) - session->MarkInactive(); - else - session->MarkForEviction(); - } - return Loop::Continue; - }); -} - Optional SessionManager::AllocateSession(SecureSession::Type secureSessionType, const ScopedNodeId & sessionEvictionHint) { @@ -553,7 +536,13 @@ void SessionManager::SecureUnicastMessageDispatch(const PacketHeader & packetHea Transport::SecureSession * secureSession = session.Value()->AsSecureSession(); - if (!secureSession->IsDefunct() && !secureSession->IsActiveSession()) + // We need to allow through messages even on sessions that are pending + // evictions, because for some cases (UpdateNOC, RemoveFabric, etc) there + // can be a single exchange alive on the session waiting for a MRP ack, and + // we need to make sure to send the ack through. The exchange manager is + // responsible for ensuring that such messages do not lead to new exchange + // creation. + if (!secureSession->IsDefunct() && !secureSession->IsActiveSession() && !secureSession->IsPendingEviction()) { ChipLogError(Inet, "Secure transport received message on a session in an invalid state (state = '%s')", secureSession->GetStateStr()); diff --git a/src/transport/SessionManager.h b/src/transport/SessionManager.h index 13e06fae8797d7..219fd4eb20c069 100644 --- a/src/transport/SessionManager.h +++ b/src/transport/SessionManager.h @@ -178,11 +178,6 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate void ExpireAllPairingsForFabric(FabricIndex fabric); void ExpireAllPASEPairings(); - // This API is used by commands that need to release all existing sessions on a fabric but need to make sure the response to the - // command still goes out on the exchange the command came in on. This API flags that the release of the session used by the - // exchange is deferred until the exchange is done. - void ReleaseSessionsForFabricExceptOne(FabricIndex fabricIndex, const SessionHandle & deferred); - /** * @brief * Return the System Layer pointer used by current SessionManager. diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index fd3ebed4472e83..704aebc4aa8d78 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit fd3ebed4472e839adc4cc6e30b0ab23d7db0a04e +Subproject commit 704aebc4aa8d78099dba7ab8014fc959b32bfa9f diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/access.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/access.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_contactsensor_DreXRHtsq9.matter b/zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/rootnode_contactsensor_DreXRHtsq9.matter similarity index 100% rename from examples/chef/devices/rootnode_contactsensor_DreXRHtsq9.matter rename to zzz_generated/chef-rootnode_contactsensor_DreXRHtsq9/zap-generated/rootnode_contactsensor_DreXRHtsq9.matter diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/access.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/access.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_dimmablelight_gY80DaqEUL.matter b/zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/rootnode_dimmablelight_gY80DaqEUL.matter similarity index 100% rename from examples/chef/devices/rootnode_dimmablelight_gY80DaqEUL.matter rename to zzz_generated/chef-rootnode_dimmablelight_gY80DaqEUL/zap-generated/rootnode_dimmablelight_gY80DaqEUL.matter diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/access.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/access.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_flowsensor_nRfPWc0i3j.matter b/zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/rootnode_flowsensor_nRfPWc0i3j.matter similarity index 100% rename from examples/chef/devices/rootnode_flowsensor_nRfPWc0i3j.matter rename to zzz_generated/chef-rootnode_flowsensor_nRfPWc0i3j/zap-generated/rootnode_flowsensor_nRfPWc0i3j.matter diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/access.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/access.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_Yt3sl2ssuP.matter b/zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/rootnode_heatingcoolingunit_Yt3sl2ssuP.matter similarity index 100% rename from examples/chef/devices/rootnode_heatingcoolingunit_Yt3sl2ssuP.matter rename to zzz_generated/chef-rootnode_heatingcoolingunit_Yt3sl2ssuP/zap-generated/rootnode_heatingcoolingunit_Yt3sl2ssuP.matter diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/access.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/access.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_humiditysensor_bCXcaZPQ1O.matter b/zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/rootnode_humiditysensor_bCXcaZPQ1O.matter similarity index 100% rename from examples/chef/devices/rootnode_humiditysensor_bCXcaZPQ1O.matter rename to zzz_generated/chef-rootnode_humiditysensor_bCXcaZPQ1O/zap-generated/rootnode_humiditysensor_bCXcaZPQ1O.matter diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/access.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/access.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_occupancysensor_52g0FarxiO.matter b/zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/rootnode_occupancysensor_52g0FarxiO.matter similarity index 100% rename from examples/chef/devices/rootnode_occupancysensor_52g0FarxiO.matter rename to zzz_generated/chef-rootnode_occupancysensor_52g0FarxiO/zap-generated/rootnode_occupancysensor_52g0FarxiO.matter diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/access.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/access.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_onofflightswitch_zbddTYGOPV.matter b/zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/rootnode_onofflightswitch_zbddTYGOPV.matter similarity index 100% rename from examples/chef/devices/rootnode_onofflightswitch_zbddTYGOPV.matter rename to zzz_generated/chef-rootnode_onofflightswitch_zbddTYGOPV/zap-generated/rootnode_onofflightswitch_zbddTYGOPV.matter diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/access.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/access.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Jgnh29qK1p.matter b/zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/rootnode_onoffpluginunit_Jgnh29qK1p.matter similarity index 100% rename from examples/chef/devices/rootnode_onoffpluginunit_Jgnh29qK1p.matter rename to zzz_generated/chef-rootnode_onoffpluginunit_Jgnh29qK1p/zap-generated/rootnode_onoffpluginunit_Jgnh29qK1p.matter diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/access.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/access.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_pressuresensor_fBO7Lvhj9j.matter b/zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/rootnode_pressuresensor_fBO7Lvhj9j.matter similarity index 100% rename from examples/chef/devices/rootnode_pressuresensor_fBO7Lvhj9j.matter rename to zzz_generated/chef-rootnode_pressuresensor_fBO7Lvhj9j/zap-generated/rootnode_pressuresensor_fBO7Lvhj9j.matter diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/access.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/access.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_speaker_TlTVZFjAlM/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_speaker_TlTVZFjAlM.matter b/zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/rootnode_speaker_TlTVZFjAlM.matter similarity index 100% rename from examples/chef/devices/rootnode_speaker_TlTVZFjAlM.matter rename to zzz_generated/chef-rootnode_speaker_TlTVZFjAlM/zap-generated/rootnode_speaker_TlTVZFjAlM.matter diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/access.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/access.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_temperaturesensor_19A4msmCzW.matter b/zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/rootnode_temperaturesensor_19A4msmCzW.matter similarity index 100% rename from examples/chef/devices/rootnode_temperaturesensor_19A4msmCzW.matter rename to zzz_generated/chef-rootnode_temperaturesensor_19A4msmCzW/zap-generated/rootnode_temperaturesensor_19A4msmCzW.matter diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/access.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/access.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_thermostat_dtbxxgX9aj.matter b/zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/rootnode_thermostat_dtbxxgX9aj.matter similarity index 100% rename from examples/chef/devices/rootnode_thermostat_dtbxxgX9aj.matter rename to zzz_generated/chef-rootnode_thermostat_dtbxxgX9aj/zap-generated/rootnode_thermostat_dtbxxgX9aj.matter diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClientCallbacks.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClientCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClientCallbacks.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClientCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClusters.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClusters.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClusters.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/CHIPClusters.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/IMClusterCommandHandler.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/IMClusterCommandHandler.cpp rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/IMClusterCommandHandler.cpp diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/PluginApplicationCallbacks.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/PluginApplicationCallbacks.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/PluginApplicationCallbacks.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/access.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/access.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/access.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/access.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/af-gen-event.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/af-gen-event.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/af-gen-event.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/af-gen-event.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/callback-stub.cpp b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/callback-stub.cpp similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/callback-stub.cpp rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/callback-stub.cpp diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/endpoint_config.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/endpoint_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/endpoint_config.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/endpoint_config.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_config.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_config.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_config.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_config.h diff --git a/examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_tokens.h b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_tokens.h similarity index 100% rename from examples/chef/zzz_generated/rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_tokens.h rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/gen_tokens.h diff --git a/examples/chef/devices/rootnode_windowcovering_hv8WSnPgSV.matter b/zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/rootnode_windowcovering_hv8WSnPgSV.matter similarity index 100% rename from examples/chef/devices/rootnode_windowcovering_hv8WSnPgSV.matter rename to zzz_generated/chef-rootnode_windowcovering_hv8WSnPgSV/zap-generated/rootnode_windowcovering_hv8WSnPgSV.matter diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bad1855d037b39..5f1ad021225efe 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -64,7 +64,7 @@ class TestList : public Command printf("Test_TC_CC_9_1\n"); printf("Test_TC_CC_9_2\n"); printf("Test_TC_CC_9_3\n"); - printf("Test_TC_DM_2_1\n"); + printf("Test_TC_BINFO_2_1\n"); printf("Test_TC_DESC_1_1\n"); printf("Test_TC_EMR_1_1\n"); printf("Test_TC_DGETH_2_1\n"); @@ -115,6 +115,10 @@ class TestList : public Command printf("Test_TC_MC_5_1\n"); printf("Test_TC_MC_5_2\n"); printf("Test_TC_MC_5_3\n"); + printf("Test_TC_MC_6_1\n"); + printf("Test_TC_MC_6_2\n"); + printf("Test_TC_MC_6_3\n"); + printf("Test_TC_MC_6_4\n"); printf("Test_TC_MC_7_1\n"); printf("Test_TC_MC_7_2\n"); printf("Test_TC_MC_8_1\n"); @@ -225,12 +229,12 @@ class TestList : public Command printf("DL_UsersAndCredentials\n"); printf("DL_LockUnlock\n"); printf("DL_Schedules\n"); - printf("Test_TC_DL_2_2\n"); - printf("Test_TC_DL_2_3\n"); - printf("Test_TC_DL_2_4\n"); - printf("Test_TC_DL_2_5\n"); - printf("Test_TC_DL_2_7\n"); - printf("Test_TC_DL_2_9\n"); + printf("Test_TC_DLRK_2_2\n"); + printf("Test_TC_DLRK_2_3\n"); + printf("Test_TC_DLRK_2_4\n"); + printf("Test_TC_DLRK_2_5\n"); + printf("Test_TC_DLRK_2_7\n"); + printf("Test_TC_DLRK_2_9\n"); printf("TestGroupMessaging\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); @@ -309,36 +313,36 @@ class ManualTestList : public Command printf("Test_TC_DA_1_4\n"); printf("Test_TC_DA_1_5\n"); printf("Test_TC_DA_1_6\n"); - printf("Test_TC_DM_1_1\n"); - printf("Test_TC_DM_1_2\n"); - printf("Test_TC_DM_1_3\n"); - printf("Test_TC_DM_2_2\n"); - printf("Test_TC_DM_2_4\n"); - printf("Test_TC_DM_3_1\n"); - printf("Test_TC_DM_3_2\n"); - printf("Test_TC_DM_3_3\n"); - printf("Test_TC_DM_3_4\n"); - printf("Test_TC_DM_4_1\n"); - printf("Test_TC_DM_4_2\n"); - printf("Test_TC_DM_4_3\n"); - printf("Test_TC_DM_4_4\n"); - printf("Test_TC_DM_4_5\n"); - printf("Test_TC_DM_4_6\n"); - printf("Test_TC_DM_4_7\n"); - printf("Test_TC_DM_4_8\n"); - printf("Test_TC_DM_4_9\n"); - printf("Test_TC_DM_4_10\n"); - printf("Test_TC_DM_4_11\n"); - printf("Test_TC_DM_4_12\n"); - printf("Test_TC_DM_4_13\n"); - printf("Test_TC_DM_4_14\n"); - printf("Test_TC_DM_4_15\n"); - printf("Test_TC_DM_4_16\n"); - printf("Test_TC_DM_4_17\n"); - printf("Test_TC_DM_4_18\n"); - printf("Test_TC_DM_4_19\n"); - printf("Test_TC_DM_4_20\n"); - printf("Test_TC_DM_4_21\n"); + printf("Test_TC_BINFO_1_1\n"); + printf("Test_TC_OPCREDS_1_2\n"); + printf("Test_TC_CNET_1_3\n"); + printf("Test_TC_BINFO_2_2\n"); + printf("Test_TC_BINFO_2_4\n"); + printf("Test_TC_OPCREDS_3_1\n"); + printf("Test_TC_OPCREDS_3_2\n"); + printf("Test_TC_OPCREDS_3_3\n"); + printf("Test_TC_OPCREDS_3_4\n"); + printf("Test_TC_CNET_4_1\n"); + printf("Test_TC_CNET_4_2\n"); + printf("Test_TC_CNET_4_3\n"); + printf("Test_TC_CNET_4_4\n"); + printf("Test_TC_CNET_4_5\n"); + printf("Test_TC_CNET_4_6\n"); + printf("Test_TC_CNET_4_7\n"); + printf("Test_TC_CNET_4_8\n"); + printf("Test_TC_CNET_4_9\n"); + printf("Test_TC_CNET_4_10\n"); + printf("Test_TC_CNET_4_11\n"); + printf("Test_TC_CNET_4_12\n"); + printf("Test_TC_CNET_4_13\n"); + printf("Test_TC_CNET_4_14\n"); + printf("Test_TC_CNET_4_15\n"); + printf("Test_TC_CNET_4_16\n"); + printf("Test_TC_CNET_4_17\n"); + printf("Test_TC_CNET_4_18\n"); + printf("Test_TC_CNET_4_19\n"); + printf("Test_TC_CNET_4_20\n"); + printf("Test_TC_CNET_4_21\n"); printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DLOG_2_1\n"); printf("Test_TC_DLOG_2_2\n"); @@ -385,10 +389,6 @@ class ManualTestList : public Command printf("Test_TC_MC_5_4\n"); printf("Test_TC_MC_5_5\n"); printf("Test_TC_MC_5_6\n"); - printf("Test_TC_MC_6_1\n"); - printf("Test_TC_MC_6_2\n"); - printf("Test_TC_MC_6_3\n"); - printf("Test_TC_MC_6_4\n"); printf("Test_TC_MC_6_5\n"); printf("Test_TC_MC_6_7\n"); printf("Test_TC_MC_7_3\n"); @@ -497,11 +497,11 @@ class ManualTestList : public Command printf("Test_TC_CC_6_4\n"); printf("Test_TC_CC_7_5\n"); printf("Test_TC_CC_9_4\n"); - printf("Test_TC_DL_1_1\n"); - printf("Test_TC_DL_2_1\n"); - printf("Test_TC_DL_2_6\n"); - printf("Test_TC_DL_2_8\n"); - printf("Test_TC_DL_2_10\n"); + printf("Test_TC_DLRK_1_1\n"); + printf("Test_TC_DLRK_2_1\n"); + printf("Test_TC_DLRK_2_6\n"); + printf("Test_TC_DLRK_2_8\n"); + printf("Test_TC_DLRK_2_10\n"); printf("Test_TC_LCFG_1_1\n"); printf("Test_TC_LCFG_2_1\n"); printf("Test_TC_LCFG_3_1\n"); @@ -10353,7 +10353,7 @@ class Test_TC_CC_8_1Suite : public TestCommand class Test_TC_CC_9_1Suite : public TestCommand { public: - Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 71, credsIssuerConfig) + Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 72, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -10412,8 +10412,12 @@ class Test_TC_CC_9_1Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10421,10 +10425,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10432,10 +10436,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10443,10 +10447,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10454,10 +10458,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10465,7 +10469,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10473,11 +10477,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10486,7 +10490,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHue = value; } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10496,11 +10500,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10510,10 +10514,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10521,7 +10525,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10530,7 +10534,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueValue1 = value; } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10538,10 +10542,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue1)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10549,10 +10553,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10560,7 +10564,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10568,11 +10572,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10581,7 +10585,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHue2 = value; } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10591,11 +10595,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10605,10 +10609,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10616,7 +10620,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10625,7 +10629,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueValue2 = value; } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10633,25 +10637,25 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue2)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 40960U)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10659,10 +10663,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10670,7 +10674,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10678,11 +10682,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10691,7 +10695,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHue3 = value; } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10701,11 +10705,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 49: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 50: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10715,10 +10719,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 51: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 52: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10726,7 +10730,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 53: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10735,7 +10739,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueValue3 = value; } break; - case 54: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10743,10 +10747,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue3)); } break; - case 55: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 56: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10754,10 +10758,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 57: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 58: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10765,7 +10769,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 59: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10773,11 +10777,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 60: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 61: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10786,7 +10790,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHue4 = value; } break; - case 62: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10796,11 +10800,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 63: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 64: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10810,10 +10814,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 65: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 66: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -10821,7 +10825,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 67: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10830,7 +10834,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHue4 = value; } break; - case 68: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10838,10 +10842,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHue4)); } break; - case 69: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 70: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -10899,7 +10903,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } case 4: { - LogStep(4, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(4, "Wait for 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -10915,14 +10926,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "Read ColorLoopActive attribute from DUT"); + case 6: { + LogStep(6, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + case 7: { + LogStep(7, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -10938,14 +10949,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Read ColorLoopDirection attribute from DUT"); + case 8: { + LogStep(8, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Sends ColorLoopSet Command - Set all Attributes"); + case 9: { + LogStep(9, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -10961,14 +10972,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Read ColorLoopTime attribute from DUT"); + case 10: { + LogStep(10, "Read ColorLoopTime attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Sends ColorLoopSet Command - Set all Attributes"); + case 11: { + LogStep(11, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -10984,14 +10995,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 12: { + LogStep(12, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Sends ColorLoopSet Command - Set all Attributes"); + case 13: { + LogStep(13, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11007,52 +11018,52 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Read ColorLoopActive attribute from DUT"); + case 14: { + LogStep(14, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait for 30S"); + case 16: { + LogStep(16, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 17: { + LogStep(17, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); + case 18: { + LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait for 30S"); + case 19: { + LogStep(19, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Read EnhancedCurrentHue attribute from DUT"); + case 20: { + LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Sends ColorLoopSet Command - Set all Attributes"); + case 21: { + LogStep(21, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11068,26 +11079,26 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 21: { - LogStep(21, "Read ColorLoopActive attribute from DUT"); + case 22: { + LogStep(22, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 23: { + LogStep(23, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); + case 24: { + LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Sends ColorLoopSet Command - Set all Attributes"); + case 25: { + LogStep(25, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11103,14 +11114,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 25: { - LogStep(25, "Read ColorLoopDirection attribute from DUT"); + case 26: { + LogStep(26, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Sends ColorLoopSet Command - Set all Attributes"); + case 27: { + LogStep(27, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11126,52 +11137,52 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Read ColorLoopActive attribute from DUT"); + case 28: { + LogStep(28, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Wait for 30S"); + case 30: { + LogStep(30, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 30: { - LogStep(30, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 31: { + LogStep(31, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Read EnhancedCurrentHue attribute from DUT"); + case 32: { + LogStep(32, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Wait for 30S"); + case 33: { + LogStep(33, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "Read EnhancedCurrentHue attribute from DUT"); + case 34: { + LogStep(34, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Sends ColorLoopSet Command - Set all Attributes"); + case 35: { + LogStep(35, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11187,30 +11198,30 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 35: { - LogStep(35, "Read ColorLoopActive attribute from DUT"); + case 36: { + LogStep(36, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 37: { + LogStep(37, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read EnhancedCurrentHue attribute from DUT"); + case 38: { + LogStep(38, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Enhanced Move To Hue command"); + case 39: { + LogStep(39, "Enhanced Move To Hue command"); VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = 40960U; + value.enhancedHue = 16384U; value.direction = static_cast(0); value.transitionTime = 0U; value.optionsMask = 0U; @@ -11220,21 +11231,21 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 39: { - LogStep(39, "Wait 2000ms"); + case 40: { + LogStep(40, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; + value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 40: { - LogStep(40, "Read EnhancedCurrentHue attribute from DUT"); + case 41: { + LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Sends ColorLoopSet Command - Set all Attributes"); + case 42: { + LogStep(42, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11250,14 +11261,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 42: { - LogStep(42, "Read ColorLoopDirection attribute from DUT"); + case 43: { + LogStep(43, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "Sends ColorLoopSet Command - Set all Attributes"); + case 44: { + LogStep(44, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11273,52 +11284,52 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 44: { - LogStep(44, "Read ColorLoopActive attribute from DUT"); + case 45: { + LogStep(45, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 46: { + LogStep(46, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Wait for 30S"); + case 47: { + LogStep(47, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 47: { - LogStep(47, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 48: { + LogStep(48, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "Read EnhancedCurrentHue attribute from DUT"); + case 49: { + LogStep(49, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Wait for 30S"); + case 50: { + LogStep(50, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 50: { - LogStep(50, "Read EnhancedCurrentHue attribute from DUT"); + case 51: { + LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Sends ColorLoopSet Command - Set all Attributes"); + case 52: { + LogStep(52, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11334,26 +11345,26 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 52: { - LogStep(52, "Read ColorLoopActive attribute from DUT"); + case 53: { + LogStep(53, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 54: { + LogStep(54, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 54: { - LogStep(54, "Read EnhancedCurrentHue attribute from DUT"); + case 55: { + LogStep(55, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "Sends ColorLoopSet Command - Set all Attributes"); + case 56: { + LogStep(56, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11369,14 +11380,14 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 56: { - LogStep(56, "Read ColorLoopDirection attribute from DUT"); + case 57: { + LogStep(57, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "Sends ColorLoopSet Command - Set all Attributes"); + case 58: { + LogStep(58, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11392,52 +11403,52 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 58: { - LogStep(58, "Read ColorLoopActive attribute from DUT"); + case 59: { + LogStep(59, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 59: { - LogStep(59, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 60: { + LogStep(60, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 60: { - LogStep(60, "Wait for 30S"); + case 61: { + LogStep(61, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 61: { - LogStep(61, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 62: { + LogStep(62, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 62: { - LogStep(62, "Read EnhancedCurrentHue attribute from DUT"); + case 63: { + LogStep(63, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 63: { - LogStep(63, "Wait for 30S"); + case 64: { + LogStep(64, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 64: { - LogStep(64, "Read EnhancedCurrentHue attribute from DUT"); + case 65: { + LogStep(65, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 65: { - LogStep(65, "Sends ColorLoopSet Command - Set all Attributes"); + case 66: { + LogStep(66, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11453,34 +11464,34 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 66: { - LogStep(66, "Read ColorLoopActive attribute from DUT"); + case 67: { + LogStep(67, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 67: { - LogStep(67, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 68: { + LogStep(68, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 68: { - LogStep(68, "Read EnhancedCurrentHue attribute from DUT"); + case 69: { + LogStep(69, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 69: { - LogStep(69, "Turn Off light for color control tests"); + case 70: { + LogStep(70, "Turn Off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 70: { - LogStep(70, "Check on/off attribute value is false after off command"); + case 71: { + LogStep(71, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -11491,7 +11502,7 @@ class Test_TC_CC_9_1Suite : public TestCommand class Test_TC_CC_9_2Suite : public TestCommand { public: - Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 30, credsIssuerConfig) + Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -11545,8 +11556,12 @@ class Test_TC_CC_9_2Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -11554,7 +11569,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -11562,7 +11577,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11570,7 +11585,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11578,10 +11593,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -11589,7 +11604,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11597,11 +11612,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11610,7 +11625,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11620,11 +11635,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11634,10 +11649,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -11645,11 +11660,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11658,7 +11673,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHue1 = value; } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11668,11 +11683,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11682,10 +11697,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -11693,7 +11708,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11702,7 +11717,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11710,10 +11725,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -11771,7 +11786,14 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } case 4: { - LogStep(4, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(4, "Wait for 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11787,32 +11809,32 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 5: { - LogStep(5, "Read ColorLoopActive attribute from DUT"); + case 6: { + LogStep(6, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read ColorLoopDirection attribute from DUT."); + case 7: { + LogStep(7, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopTime attribute from DUT."); + case 8: { + LogStep(8, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 9: { + LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Color Loop Set Command - Set all Attributes"); + case 10: { + LogStep(10, "Color Loop Set Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11828,52 +11850,52 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 10: { - LogStep(10, "Read ColorLoopActive attribute from DUT."); + case 11: { + LogStep(11, "Read ColorLoopActive attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Wait for 30S"); + case 13: { + LogStep(13, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 14: { + LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read EnhancedCurrentHue attribute from DUT"); + case 15: { + LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait for 30S"); + case 16: { + LogStep(16, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); + case 17: { + LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Color Loop Set Command - Start Color Loop"); + case 18: { + LogStep(18, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11889,46 +11911,46 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 18: { - LogStep(18, "Read ColorLoopDirection attribute from DUT."); + case 19: { + LogStep(19, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait for 30S"); + case 20: { + LogStep(20, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 21: { + LogStep(21, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); + case 22: { + LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Wait for 30S"); + case 23: { + LogStep(23, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); + case 24: { + LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Color Loop Set Command - Start Color Loop"); + case 25: { + LogStep(25, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -11944,34 +11966,34 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 25: { - LogStep(25, "Read ColorLoopActive attribute from DUT"); + case 26: { + LogStep(26, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 27: { + LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read EnhancedCurrentHue attribute from DUT."); + case 28: { + LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Turn off light for color control tests"); + case 29: { + LogStep(29, "Turn off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 29: { - LogStep(29, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -11982,7 +12004,7 @@ class Test_TC_CC_9_2Suite : public TestCommand class Test_TC_CC_9_3Suite : public TestCommand { public: - Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 29, credsIssuerConfig) + Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12035,8 +12057,12 @@ class Test_TC_CC_9_3Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -12044,7 +12070,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -12052,7 +12078,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12060,7 +12086,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12068,10 +12094,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -12079,7 +12105,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12087,11 +12113,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12100,7 +12126,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12110,11 +12136,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12124,10 +12150,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12135,11 +12161,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12149,11 +12175,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12163,10 +12189,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -12174,7 +12200,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12183,7 +12209,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -12191,10 +12217,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -12252,7 +12278,14 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } case 4: { - LogStep(4, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(4, "Wait for 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -12268,32 +12301,32 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 5: { - LogStep(5, "Read ColorLoopActive attribute from DUT"); + case 6: { + LogStep(6, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read ColorLoopDirection attribute from DUT."); + case 7: { + LogStep(7, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopTime attribute from DUT."); + case 8: { + LogStep(8, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 9: { + LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Color Loop Set Command - Set all Attributes"); + case 10: { + LogStep(10, "Color Loop Set Command - Set all Attributes"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -12309,52 +12342,52 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 10: { - LogStep(10, "Read ColorLoopActive attribute from DUT."); + case 11: { + LogStep(11, "Read ColorLoopActive attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Wait for 30S"); + case 13: { + LogStep(13, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 14: { + LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Read EnhancedCurrentHue attribute from DUT"); + case 15: { + LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait for 30S"); + case 16: { + LogStep(16, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); + case 17: { + LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Color Loop Set Command - Start Color Loop"); + case 18: { + LogStep(18, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -12370,40 +12403,40 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 18: { - LogStep(18, "Read ColorLoopTime attribute from DUT."); + case 19: { + LogStep(19, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait for 60S"); + case 20: { + LogStep(20, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); + case 21: { + LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait for 60S"); + case 22: { + LogStep(22, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); + case 23: { + LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Color Loop Set Command - Start Color Loop"); + case 24: { + LogStep(24, "Color Loop Set Command - Start Color Loop"); VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -12419,34 +12452,34 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 24: { - LogStep(24, "Read ColorLoopActive attribute from DUT"); + case 25: { + LogStep(25, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 26: { + LogStep(26, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Read EnhancedCurrentHue attribute from DUT."); + case 27: { + LogStep(27, "Read EnhancedCurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Turn off light for color control tests"); + case 28: { + LogStep(28, "Turn off light for color control tests"); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional ); } - case 28: { - LogStep(28, "Check on/off attribute value is false after off command"); + case 29: { + LogStep(29, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -12454,10 +12487,10 @@ class Test_TC_CC_9_3Suite : public TestCommand } }; -class Test_TC_DM_2_1Suite : public TestCommand +class Test_TC_BINFO_2_1Suite : public TestCommand { public: - Test_TC_DM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_2_1", 19, credsIssuerConfig) + Test_TC_BINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_1", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12465,7 +12498,7 @@ class Test_TC_DM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_2_1Suite() {} + ~Test_TC_BINFO_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -17406,7 +17439,7 @@ class Test_TC_LVL_5_1Suite : public TestCommand class Test_TC_LVL_6_1Suite : public TestCommand { public: - Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 16, credsIssuerConfig) + Test_TC_LVL_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_6_1", 15, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17507,17 +17540,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 50U)); - VerifyOrReturn(CheckConstraintNotValue("value", value, CurrentLevelValue)); - } break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -17648,13 +17672,7 @@ class Test_TC_LVL_6_1Suite : public TestCommand return UserPrompt(kIdentityAlpha, value); } case 13: { - LogStep(13, "Reads CurrentLevel attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Reset level to 254"); + LogStep(13, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; value.level = 254U; @@ -17666,8 +17684,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "Wait 100ms"); + case 14: { + LogStep(14, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; @@ -20039,7 +20057,6 @@ class Test_TC_MC_3_2Suite : public TestCommand } case 1: { LogStep(1, "TH sends CEC Settings Keys(0x0A) to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(10); @@ -20050,7 +20067,6 @@ class Test_TC_MC_3_2Suite : public TestCommand } case 2: { LogStep(2, "TH sends CEC Home Keys(0x09) to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(9); @@ -20191,7 +20207,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 1: { LogStep(1, "Send Numbers1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(33); @@ -20202,7 +20217,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 2: { LogStep(2, "Send Numbers2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(34); @@ -20213,7 +20227,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 3: { LogStep(3, "Send Numbers3"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(35); @@ -20224,7 +20237,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 4: { LogStep(4, "Send Numbers4"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(36); @@ -20235,7 +20247,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 5: { LogStep(5, "Send Numbers5"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(37); @@ -20246,7 +20257,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 6: { LogStep(6, "Send Numbers6"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(38); @@ -20257,7 +20267,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 7: { LogStep(7, "Send Numbers7"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(39); @@ -20268,7 +20277,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 8: { LogStep(8, "Send Numbers8"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(40); @@ -20279,7 +20287,6 @@ class Test_TC_MC_3_3Suite : public TestCommand } case 9: { LogStep(9, "Send Numbers9"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKey::Type value; value.keyCode = static_cast(41); @@ -20335,11 +20342,7 @@ class Test_TC_MC_3_5Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -20364,9 +20367,16 @@ class Test_TC_MC_3_5Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read CatalogList attribute."); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::CatalogList::Id, true, chip::NullOptional); + LogStep(1, + "TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued Vendor Id of " + "type unsigned 16 bit integer ranging between 0-65536 for the catalog"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -20415,13 +20425,7 @@ class Test_TC_MC_3_6Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("currentApp", value)); - VerifyOrReturn(CheckConstraintType("value", "", "ApplicationEP")); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -20446,10 +20450,17 @@ class Test_TC_MC_3_6Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read Current App ID attribute."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Attributes::CurrentApp::Id, true, chip::NullOptional); + LogStep(1, + "TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, which should " + "include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is no current " + "in-focus application"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -20459,11 +20470,13 @@ class Test_TC_MC_3_6Suite : public TestCommand class Test_TC_MC_3_7Suite : public TestCommand { public: - Test_TC_MC_3_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_7", 4, credsIssuerConfig) + Test_TC_MC_3_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_7", 3, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); + AddArgument("applicationId", &mApplicationId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -20478,6 +20491,8 @@ class Test_TC_MC_3_7Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mCatalogVendorId; + chip::Optional mApplicationId; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -20501,10 +20516,7 @@ class Test_TC_MC_3_7Suite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 1U)); - - VerifyOrReturn( - CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 2: @@ -20513,20 +20525,6 @@ class Test_TC_MC_3_7Suite : public TestCommand chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 1U)); - - VerifyOrReturn( - CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2U)); - - VerifyOrReturn( - CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); } break; default: @@ -20553,12 +20551,12 @@ class Test_TC_MC_3_7Suite : public TestCommand } case 1: { LogStep(1, "Launch an app with the provided a application ID"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - value.application.catalogVendorId = 1234U; - value.application.applicationId = chip::Span("HelloWorldAppgarbage: not in length on purpose", 13); + value.application.catalogVendorId = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; + value.application.applicationId = + mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); value.data.Emplace(); value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("Hello Worldgarbage: not in length on purpose"), 11); @@ -20569,11 +20567,10 @@ class Test_TC_MC_3_7Suite : public TestCommand } case 2: { LogStep(2, "TH sends a LaunchApp command to DUT to launch an app which is not available"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - value.application.catalogVendorId = 1234U; + value.application.catalogVendorId = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; value.application.applicationId = chip::Span("NonAvailableAppgarbage: not in length on purpose", 15); value.data.Emplace(); @@ -20583,22 +20580,6 @@ class Test_TC_MC_3_7Suite : public TestCommand ); } - case 3: { - LogStep(3, "Launch an app with the provided a application ID"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type value; - - value.application.catalogVendorId = 1234U; - value.application.applicationId = chip::Span("HelloWorldApp2garbage: not in length on purpose", 14); - - value.data.Emplace(); - value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("Hello Worldgarbage: not in length on purpose"), 11); - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, - ApplicationLauncher::Commands::LaunchApp::Id, value, chip::NullOptional - - ); - } } return CHIP_NO_ERROR; } @@ -20612,6 +20593,8 @@ class Test_TC_MC_3_8Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); + AddArgument("applicationId", &mApplicationId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -20626,6 +20609,8 @@ class Test_TC_MC_3_8Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mCatalogVendorId; + chip::Optional mApplicationId; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -20650,9 +20635,6 @@ class Test_TC_MC_3_8Suite : public TestCommand chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); - - VerifyOrReturn( - CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); } break; case 2: @@ -20687,12 +20669,12 @@ class Test_TC_MC_3_8Suite : public TestCommand } case 1: { LogStep(1, "Stop an app with the provided application ID"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type value; - value.application.catalogVendorId = 1234U; - value.application.applicationId = chip::Span("HelloWorldAppgarbage: not in length on purpose", 13); + value.application.catalogVendorId = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; + value.application.applicationId = + mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::StopApp::Id, value, chip::NullOptional @@ -20701,8 +20683,7 @@ class Test_TC_MC_3_8Suite : public TestCommand } case 2: { LogStep(2, "Reads the Status attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, true, chip::NullOptional); } } @@ -20718,6 +20699,8 @@ class Test_TC_MC_3_9Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); + AddArgument("applicationId", &mApplicationId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -20732,6 +20715,8 @@ class Test_TC_MC_3_9Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mCatalogVendorId; + chip::Optional mApplicationId; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -20789,12 +20774,12 @@ class Test_TC_MC_3_9Suite : public TestCommand } case 1: { LogStep(1, "TH sends HideApp command to DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type value; - value.application.catalogVendorId = 1234U; - value.application.applicationId = chip::Span("HelloWorldAppgarbage: not in length on purpose", 13); + value.application.catalogVendorId = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; + value.application.applicationId = + mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::HideApp::Id, value, chip::NullOptional @@ -20803,8 +20788,7 @@ class Test_TC_MC_3_9Suite : public TestCommand } case 2: { LogStep(2, "Reads the Status attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, true, chip::NullOptional); } } @@ -20980,7 +20964,6 @@ class Test_TC_MC_3_11Suite : public TestCommand } case 2: { LogStep(2, "Select Input Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; value.index = 1U; @@ -20991,7 +20974,6 @@ class Test_TC_MC_3_11Suite : public TestCommand } case 3: { LogStep(3, "Read current input list"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, chip::NullOptional); } @@ -21070,7 +21052,6 @@ class Test_TC_MC_3_12Suite : public TestCommand } case 1: { LogStep(1, "Hide Input Status Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::HideInputStatus::Id, value, @@ -21080,7 +21061,6 @@ class Test_TC_MC_3_12Suite : public TestCommand } case 2: { LogStep(2, "Show Input Status Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::ShowInputStatus::Id, value, @@ -21096,7 +21076,7 @@ class Test_TC_MC_3_12Suite : public TestCommand class Test_TC_MC_3_13Suite : public TestCommand { public: - Test_TC_MC_3_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_13", 5, credsIssuerConfig) + Test_TC_MC_3_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_13", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -21146,15 +21126,210 @@ class Test_TC_MC_3_13Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; - case 4: + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read attribute media input list"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Rename Input Command"); + ListFreer listFreer; + chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; + value.index = 1U; + value.name = chip::Span("A1garbage: not in length on purpose", 2); + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, + chip::NullOptional + + ); + } + case 3: { + LogStep(3, "Read attribute media input list"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_5_1Suite : public TestCommand +{ +public: + Test_TC_MC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_1", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_5_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, + "TH reads the ChannelList attribute from the DUT and Verify that the response contains a list of the known TV " + "channels"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_5_2Suite : public TestCommand +{ +public: + Test_TC_MC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_2", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_5_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("currentChannel", value)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -21178,37 +21353,35 @@ class Test_TC_MC_3_13Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read attribute media input list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, + LogStep(1, "Reads the ChannelList attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Rename Input Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "TH sends a ChangeChannelByNumber command"); ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = 1U; - value.name = chip::Span("A1garbage: not in length on purpose", 2); - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; + value.majorNumber = mMajornumber.HasValue() ? mMajornumber.Value() : 9U; + value.minorNumber = mMinornumber.HasValue() ? mMinornumber.Value() : 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, chip::NullOptional ); } case 3: { - LogStep(3, "Rename Input Command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Verify that the channel has changed on the device"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = 1U; - value.name = chip::Span("A2garbage: not in length on purpose", 2); - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, - chip::NullOptional - - ); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 4: { - LogStep(4, "Read attribute media input list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, + LogStep(4, "Reads the CurrentChannel attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, chip::NullOptional); } } @@ -21216,18 +21389,20 @@ class Test_TC_MC_3_13Suite : public TestCommand } }; -class Test_TC_MC_5_1Suite : public TestCommand +class Test_TC_MC_5_3Suite : public TestCommand { public: - Test_TC_MC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_1", 2, credsIssuerConfig) + Test_TC_MC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_3", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_5_1Suite() {} + ~Test_TC_MC_5_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -21238,6 +21413,8 @@ class Test_TC_MC_5_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -21264,6 +21441,30 @@ class Test_TC_MC_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("currentChannel", value)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("currentChannel", value)); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -21291,25 +21492,54 @@ class Test_TC_MC_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, chip::NullOptional); } + case 2: { + LogStep(2, "Reads the CurrentChannel attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Sends a SkipChannel command to the DUT"); + ListFreer listFreer; + chip::app::Clusters::Channel::Commands::SkipChannel::Type value; + value.count = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, + chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Verify that the channel has changed on the device"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Reads the CurrentChannel attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_5_2Suite : public TestCommand +class Test_TC_MC_6_1Suite : public TestCommand { public: - Test_TC_MC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_2", 5, credsIssuerConfig) + Test_TC_MC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_5_2Suite() {} + ~Test_TC_MC_6_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -21320,8 +21550,6 @@ class Test_TC_MC_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -21343,24 +21571,77 @@ class Test_TC_MC_5_2Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentState", value, 1U)); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentState", value, 1U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentState", value, 2U)); } break; default: @@ -21386,55 +21667,111 @@ class Test_TC_MC_5_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads the ChannelList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, - chip::NullOptional); + LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, + chip::NullOptional + + ); } case 2: { - LogStep(2, "TH sends a ChangeChannelByNumber command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Reads the CurrentState attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Sends a Play command"); ListFreer listFreer; - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type value; - value.majorNumber = mMajornumber.HasValue() ? mMajornumber.Value() : 1U; - value.minorNumber = mMinornumber.HasValue() ? mMinornumber.Value() : 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::ChangeChannelByNumber::Id, value, + chip::app::Clusters::MediaPlayback::Commands::Play::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, chip::NullOptional ); } - case 3: { - LogStep(3, "log a command"); + case 4: { + LogStep(4, "Verify that the media state is playing"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = - chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 4: { - LogStep(4, "Reads the CurrentChannel attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); + case 5: { + LogStep(5, "Reads the playback state attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "sends a Pause command"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, + chip::NullOptional + + ); + } + case 7: { + LogStep(7, "Verify that the media is paused"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter 'y' if media state is pausedgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "Reads the playback state attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); + } + case 9: { + LogStep(9, "Sends a Stop command"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StopPlayback::Id, value, + chip::NullOptional + + ); + } + case 10: { + LogStep(10, "Verify that the media is stoped"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter 'y' if media state is stopedgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Reads the playback state attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_5_3Suite : public TestCommand +class Test_TC_MC_6_2Suite : public TestCommand { public: - Test_TC_MC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_3", 6, credsIssuerConfig) + Test_TC_MC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_2", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_5_3Suite() {} + ~Test_TC_MC_6_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -21445,12 +21782,8 @@ class Test_TC_MC_5_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; chip::Optional mTimeout; - chip::app::DataModel::Nullable currentChannelvalue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -21470,23 +21803,26 @@ class Test_TC_MC_5_3Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("currentChannel", value)); - - currentChannelvalue = value; + VerifyOrReturn(CheckValue("currentState", value, 1U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -21495,9 +21831,85 @@ class Test_TC_MC_5_3Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("currentState", value, 0U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); } break; default: @@ -21523,58 +21935,174 @@ class Test_TC_MC_5_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads the ChannelList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::ChannelList::Id, true, - chip::NullOptional); + LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, + chip::NullOptional + + ); } case 2: { - LogStep(2, "Reads the CurrentChannel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); + LogStep(2, "Reads the CurrentState attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "Sends a SkipChannel command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Sends a Play command to the DUT"); ListFreer listFreer; - chip::app::Clusters::Channel::Commands::SkipChannel::Type value; - value.count = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Commands::SkipChannel::Id, value, + chip::app::Clusters::MediaPlayback::Commands::Play::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, chip::NullOptional ); } case 4: { - LogStep(4, "log a command"); + LogStep(4, "Verify that the media state is playing"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = - chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); + chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } case 5: { - LogStep(5, "Reads the CurrentChannel attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::CurrentChannel::Id, true, - chip::NullOptional); + LogStep(5, "Reads the CurrentState attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Sends a StartOver command to the DUT"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::StartOver::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StartOver::Id, value, + chip::NullOptional + + ); + } + case 7: { + LogStep(7, "Verify that the media is started over"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter 'y' if media is started overgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "Sends a Next command to the DUT"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Next::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Next::Id, value, + chip::NullOptional + + ); + } + case 9: { + LogStep(9, "Verify that the next media item in the queue has been loaded"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media item in the queue has been loadedgarbage: not in length on purpose", 59); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "Sends a Previous command to the DUT"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Previous::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Previous::Id, value, + chip::NullOptional + + ); + } + case 11: { + LogStep(11, "Verify that the previous media item in the queue has been loaded"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if previous media item in the queue has been loadedgarbage: not in length on purpose", 68); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "Sends a SkipForward command to the DUT "); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type value; + value.deltaPositionMilliseconds = 10000ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::SkipForward::Id, value, + chip::NullOptional + + ); + } + case 13: { + LogStep(13, "Verify that the media has skipped forward 10 seconds"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has skipped forward 10 secondsgarbage: not in length on purpose", 56); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "Reads the SampledPosition attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, + true, chip::NullOptional); + } + case 15: { + LogStep(15, "Sends a SkipBackward command to the DUT "); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type value; + value.deltaPositionMilliseconds = 10000ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::SkipBackward::Id, value, + chip::NullOptional + + ); + } + case 16: { + LogStep(16, "Verify that the media has skipped backward 10 seconds"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has skipped backward 10 secondsgarbage: not in length on purpose", 57); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "Reads the SampledPosition attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, + true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_7_1Suite : public TestCommand +class Test_TC_MC_6_3Suite : public TestCommand { public: - Test_TC_MC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_1", 4, credsIssuerConfig) + Test_TC_MC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_3", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("SeekPosition", 0, UINT64_MAX, &mSeekPosition); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_7_1Suite() {} + ~Test_TC_MC_6_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -21585,6 +22113,7 @@ class Test_TC_MC_7_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mSeekPosition; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -21606,129 +22135,55 @@ class Test_TC_MC_7_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentOutput", value, 1U)); + VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); } break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Reads the OutputList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Sends a SelectAudioOutput command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type value; - value.index = 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::SelectOutput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Reads the CurrentOutput attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::CurrentOutput::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_7_2Suite : public TestCommand -{ -public: - Test_TC_MC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_2", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_7_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::app::DataModel::DecodableList audioOutputListValues; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 1: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); - audioOutputListValues = value; - } + shouldContinue = true; break; - case 2: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 3: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 5U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -21752,26 +22207,72 @@ class Test_TC_MC_7_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads the OutputList attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, - chip::NullOptional); + LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, + chip::NullOptional + + ); } case 2: { - LogStep(2, "Sends a RenameOutput command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Sends a Seek command"); ListFreer listFreer; - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type value; - value.index = 1U; - value.name = chip::Span("CertTestgarbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::RenameOutput::Id, value, + chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; + value.position = 10000ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, chip::NullOptional ); } case 3: { - LogStep(3, - "Reads the OutputList attribute from the DUT Verify that the output at the index provided in step 2 has the " - "name CertTest"); + LogStep(3, "Verify that the media has moved to 10 seconds from the starting point"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has moved to 10 seconds from the starting pointgarbage: not in length on purpose", 73); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Reads the SampledPosition attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads the StartTime attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "TH reads the SeekRangeEnd attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "TH reads the SeekRangeStart attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "TH reads the Duration attribute from the DUT"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -21780,25 +22281,33 @@ class Test_TC_MC_7_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } + case 9: { + LogStep(9, "Sends a Seek command Position value beyond the furthest valid position"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; + value.position = mSeekPosition.HasValue() ? mSeekPosition.Value() : 100000000ULL; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, + chip::NullOptional + + ); + } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_8_1Suite : public TestCommand +class Test_TC_MC_6_4Suite : public TestCommand { public: - Test_TC_MC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_8_1", 8, credsIssuerConfig) + Test_TC_MC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_4", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); - AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_8_1Suite() {} + ~Test_TC_MC_6_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -21809,12 +22318,8 @@ class Test_TC_MC_8_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTargetvalue1; - chip::Optional mTargetvalue2; chip::Optional mTimeout; - chip::app::DataModel::DecodableList TargetListValues; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -21834,248 +22339,123 @@ class Test_TC_MC_8_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - TargetListValues = value; + VerifyOrReturn(CheckValue("currentState", value, 1U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; + float value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("playbackSpeed", value, 0.0f)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; + float value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Reads the CurrentTarget attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Reads the TargetList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::TargetList::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Sends a NavigateTarget command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, - value, chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Reads the CurrentTarget attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Reads the TargetList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::TargetList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Sends a NavigateTarget command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, - value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "Reads the CurrentTarget attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, - TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_9_1Suite : public TestCommand -{ -public: - Test_TC_MC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_9_1", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_9_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + float value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckValue("playbackSpeed", value, 2.0f)); } break; - case 3: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "vendor-id")); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; - case 4: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 256)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; - case 5: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } + shouldContinue = true; break; - case 6: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "struct")); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; - case 7: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } + shouldContinue = true; break; - case 8: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; - case 9: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + float value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); } break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -22099,62 +22479,145 @@ class Test_TC_MC_9_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Precondition"); + LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = - chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); - return Log(kIdentityAlpha, value); + chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, + chip::NullOptional + + ); } case 2: { - LogStep(2, "Reads the VendorName attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorName::Id, + LogStep(2, "Reads the CurrentState attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Reads the VendorID attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorID::Id, + LogStep(3, "Reads the PlaybackSpeed attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "Reads the ApplicationName attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ApplicationName::Id, true, chip::NullOptional); + LogStep(4, "Sends a FastForward command"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, + chip::NullOptional + + ); } case 5: { - LogStep(5, "Reads the ProductID attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ProductID::Id, + LogStep(5, "Reads the CurrentState attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Reads the Application attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::Application::Id, true, chip::NullOptional); + LogStep(6, "Reads the PlaybackSpeed attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, + true, chip::NullOptional); } case 7: { - LogStep(7, "Reads the Status attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, - true, chip::NullOptional); + LogStep(7, "Sends a FastForward command"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, + chip::NullOptional + + ); } case 8: { - LogStep(8, "Reads the ApplicationVersion attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ApplicationVersion::Id, true, chip::NullOptional); + LogStep(8, "Reads the PlaybackSpeed attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, + true, chip::NullOptional); } case 9: { - LogStep(9, "Reads the AllowedVendorList attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::AllowedVendorList::Id, true, chip::NullOptional); + LogStep(9, "Sends a Rewind command to the DUT"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, + chip::NullOptional + + ); + } + case 10: { + LogStep(10, "Reads the CurrentState attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, + true, chip::NullOptional); + } + case 11: { + LogStep(11, "Reads the PlaybackSpeed attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "Sends a Rewind command to the DUT"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, + chip::NullOptional + + ); + } + case 13: { + LogStep(13, "Reads the PlaybackSpeed attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "Sends a Play command"); + ListFreer listFreer; + chip::app::Clusters::MediaPlayback::Commands::Play::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, + chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Reads the PlaybackSpeed attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "Sends consecutive FastForward commands"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "Sends consecutive Rewind commands"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_10_1Suite : public TestCommand +class Test_TC_MC_7_1Suite : public TestCommand { public: - Test_TC_MC_10_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_1", 3, credsIssuerConfig) + Test_TC_MC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_1", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -22162,7 +22625,7 @@ class Test_TC_MC_10_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_1Suite() {} + ~Test_TC_MC_7_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -22194,17 +22657,20 @@ class Test_TC_MC_10_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); + VerifyOrReturn(CheckValue("currentOutput", value, 1U)); } break; default: @@ -22230,24 +22696,34 @@ class Test_TC_MC_10_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the AcceptHeader attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptHeader::Id, - true, chip::NullOptional); + LogStep(1, "Reads the OutputList attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, + chip::NullOptional); } case 2: { - LogStep(2, "TH reads the SupportedStreamingProtocols attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, - ContentLauncher::Attributes::SupportedStreamingProtocols::Id, true, chip::NullOptional); + LogStep(2, "Sends a SelectAudioOutput command"); + ListFreer listFreer; + chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type value; + value.index = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::SelectOutput::Id, value, + chip::NullOptional + + ); + } + case 3: { + LogStep(3, "Reads the CurrentOutput attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::CurrentOutput::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MOD_1_1Suite : public TestCommand +class Test_TC_MC_7_2Suite : public TestCommand { public: - Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 7, credsIssuerConfig) + Test_TC_MC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_2", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -22255,7 +22731,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_1Suite() {} + ~Test_TC_MC_7_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -22268,6 +22744,8 @@ class Test_TC_MOD_1_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::DecodableList audioOutputListValues; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -22287,81 +22765,19 @@ class Test_TC_MOD_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintType("value", "", "OutPutInfo")); + audioOutputListValues = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); - VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -22385,24 +22801,25 @@ class Test_TC_MOD_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::ClusterRevision::Id, true, + LogStep(1, "Reads the OutputList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::OutputList::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH reads the FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::FeatureMap::Id, true, - chip::NullOptional); + LogStep(2, "Sends a RenameOutput command"); + ListFreer listFreer; + chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type value; + value.index = 1U; + value.name = chip::Span("CertTestgarbage: not in length on purpose", 8); + return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::RenameOutput::Id, value, + chip::NullOptional + + ); } case 3: { - LogStep(3, "TH reads the AttributeList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + LogStep(3, + "Reads the OutputList attribute from the DUT Verify that the output at the index provided in step 2 has the " + "name CertTest"); VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -22411,35 +22828,25 @@ class Test_TC_MOD_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_MF_1_3Suite : public TestCommand +class Test_TC_MC_8_1Suite : public TestCommand { public: - Test_TC_MF_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_3", 14, credsIssuerConfig) + Test_TC_MC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_8_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); + AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); + AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_3Suite() {} + ~Test_TC_MC_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -22448,12 +22855,14 @@ class Test_TC_MF_1_3Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mNodeId2; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; + chip::Optional mTargetvalue1; + chip::Optional mTargetvalue2; chip::Optional mTimeout; + chip::app::DataModel::DecodableList TargetListValues; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -22472,94 +22881,57 @@ class Test_TC_MF_1_3Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + TargetListValues = value; + } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); } break; - case 9: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest1", 9))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest2", 9))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); } break; default: @@ -22578,129 +22950,74 @@ class Test_TC_MF_1_3Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Stop target device"); + LogStep(0, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start(kIdentityAlpha, value); + LogStep(1, "Reads the CurrentTarget attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + LogStep(2, "Reads the TargetList attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::TargetList::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(3, "Sends a NavigateTarget command"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; + value.target = mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, + value, chip::NullOptional ); } case 4: { - LogStep(4, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); + LogStep(4, "Reads the CurrentTarget attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + LogStep(5, "Reads the TargetList attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::TargetList::Id, + true, chip::NullOptional); } case 6: { - LogStep(6, "Commission from beta"); + LogStep(6, "Sends a NavigateTarget command"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; + value.target = mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, + value, chip::NullOptional + + ); } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 8: { - LogStep(8, "Query fabrics list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "Query fabrics list"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 10: { - LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptest1garbage: not in length on purpose", 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 11: { - LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptest2garbage: not in length on purpose", 9); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + LogStep(7, "Reads the CurrentTarget attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, + TargetNavigator::Attributes::CurrentTarget::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MF_1_4Suite : public TestCommand +class Test_TC_MC_9_1Suite : public TestCommand { public: - Test_TC_MF_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_4", 14, credsIssuerConfig) + Test_TC_MC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_9_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_4Suite() {} + ~Test_TC_MC_9_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -22709,10 +23026,8 @@ class Test_TC_MF_1_4Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mNodeId2; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -22733,71 +23048,56 @@ class Test_TC_MF_1_4Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "vendor-id")); + } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 256)); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 9: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; + chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); + VerifyOrReturn(CheckConstraintType("value", "", "struct")); } break; - case 10: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } break; - case 11: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -22806,16 +23106,12 @@ class Test_TC_MF_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; default: @@ -22834,134 +23130,173 @@ class Test_TC_MF_1_4Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Stop target device"); + LogStep(0, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start(kIdentityAlpha, value); + LogStep(1, "Reads the VendorName attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorName::Id, + true, chip::NullOptional); } case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + LogStep(2, "Reads the VendorID attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::VendorID::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + LogStep(3, "Reads the ApplicationName attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::ApplicationName::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); + LogStep(4, "Reads the ProductID attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::ProductID::Id, + true, chip::NullOptional); } case 5: { - LogStep(5, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + LogStep(5, "Reads the Application attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::Application::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(6, "Reads the Status attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::Status::Id, + true, chip::NullOptional); } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); + LogStep(7, "Reads the ApplicationVersion attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::ApplicationVersion::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Query fabrics list"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); + LogStep(8, "Reads the AllowedVendorList attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, + ApplicationBasic::Attributes::AllowedVendorList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Query fabrics list"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_10_1Suite : public TestCommand +{ +public: + Test_TC_MC_10_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_1", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_10_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } - case 11: { - LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); } - case 12: { - LogStep(12, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + case 1: { + LogStep(1, "TH reads the AcceptHeader attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::AcceptHeader::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the SupportedStreamingProtocols attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, + ContentLauncher::Attributes::SupportedStreamingProtocols::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MF_1_5Suite : public TestCommand +class Test_TC_MOD_1_1Suite : public TestCommand { public: - Test_TC_MF_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_5", 14, credsIssuerConfig) + Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_5Suite() {} + ~Test_TC_MOD_1_1Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } private: chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; + chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -22981,54 +23316,82 @@ class Test_TC_MF_1_5Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -23045,184 +23408,81 @@ class Test_TC_MF_1_5Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Wait for the commissioned device to be retrieved"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } + case 1: { + LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } case 2: { - LogStep(2, "TH_CR1 opens a new commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + LogStep(2, "TH reads the FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs(kIdentityAlpha, value); + LogStep(3, "TH reads the AttributeList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(4, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH_CR1 opens a new commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); } case 6: { - LogStep(6, "TH_CR1 revokes the commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 8: { - LogStep(8, "TH_CR1 revokes the commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 12: { - LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 13: { - LogStep(13, "TH_CR3 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MF_1_6Suite : public TestCommand +class Test_TC_MF_1_3Suite : public TestCommand { public: - Test_TC_MF_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_6", 16, credsIssuerConfig) + Test_TC_MF_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_3", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_6Suite() {} + ~Test_TC_MF_1_3Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } private: chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; chip::Optional mNodeId2; - chip::Optional mNodeId3; chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; + chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -23253,24 +23513,58 @@ class Test_TC_MF_1_6Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -23280,7 +23574,9 @@ class Test_TC_MF_1_6Suite : public TestCommand { chip::CharSpan value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest1", 9))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); } break; case 12: @@ -23288,15 +23584,13 @@ class Test_TC_MF_1_6Suite : public TestCommand break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest2", 9))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -23337,150 +23631,119 @@ class Test_TC_MF_1_6Suite : public TestCommand case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } case 4: { - LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10"); + LogStep(4, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs(kIdentityAlpha, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 5: { - LogStep(5, "Commission from beta"); + LogStep(5, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Commission from beta"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); return PairWithCode(kIdentityBeta, value); } - case 6: { - LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } case 7: { - LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 8: { + LogStep(8, "Query fabrics list"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + LogStep(9, "Query fabrics list"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } case 10: { - LogStep(10, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); ListFreer listFreer; chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); + value = chip::Span("chiptest1garbage: not in length on purpose", 9); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } case 11: { - LogStep(11, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(12, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::CharSpan value; + value = chip::Span("chiptest2garbage: not in length on purpose", 9); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 13: { - LogStep(13, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 14: { - LogStep(14, "TH_CR2 starts a commissioning process on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 15: { - LogStep(15, "TH_CR3 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + LogStep(13, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MF_1_9Suite : public TestCommand +class Test_TC_MF_1_4Suite : public TestCommand { public: - Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_9", 25, credsIssuerConfig) + Test_TC_MF_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_4", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); - AddArgument("payload2", &mPayload2); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_9Suite() {} + ~Test_TC_MF_1_4Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } private: chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; chip::Optional mNodeId2; - chip::Optional mNodeId3; chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; - chip::Optional mPayload2; + chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -23504,94 +23767,86 @@ class Test_TC_MF_1_9Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + } break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 32)); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -23609,223 +23864,110 @@ class Test_TC_MF_1_9Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Reboot target device"); + LogStep(0, "Stop target device"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 2: { - LogStep(2, "TH_CR1 opens a new commissioning window on DUT_CE"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 3: { - LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } case 4: { - LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(4, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(5, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(6, "Commission from beta"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(8, "Query fabrics list"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(9, "Query fabrics list"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 11: { - LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } case 12: { - LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(12, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 14: { - LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 15: { - LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 16: { - LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 17: { - LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 21: { - LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 23: { - LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 24: { - LogStep(24, "TH_CR3 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + LogStep(13, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_MF_1_10Suite : public TestCommand +class Test_TC_MF_1_5Suite : public TestCommand { public: - Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_10", 25, credsIssuerConfig) + Test_TC_MF_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_5", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -23835,12 +23977,11 @@ class Test_TC_MF_1_10Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); - AddArgument("payload2", &mPayload2); } - ~Test_TC_MF_1_10Suite() {} + ~Test_TC_MF_1_5Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: chip::Optional mNodeId; @@ -23851,7 +23992,6 @@ class Test_TC_MF_1_10Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; - chip::Optional mPayload2; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -23877,7 +24017,7 @@ class Test_TC_MF_1_10Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 4: @@ -23885,12 +24025,10 @@ class Test_TC_MF_1_10Suite : public TestCommand shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -23898,72 +24036,29 @@ class Test_TC_MF_1_10Suite : public TestCommand break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + } break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -23993,190 +24088,136 @@ class Test_TC_MF_1_10Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 2: { - LogStep(2, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(2, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional ); } case 3: { - LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(3, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(5, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(6, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(8, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 9: { - LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(9, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(10, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } case 11: { - LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 12: { - LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 14: { - LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 15: { - LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 16: { - LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 17: { - LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 21: { - LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 23: { - LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 24: { - LogStep(24, "TH_CR3 starts a commissioning process with DUT_CE"); + LogStep(13, "TH_CR3 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityGamma, value); } } @@ -24184,10 +24225,10 @@ class Test_TC_MF_1_10Suite : public TestCommand } }; -class Test_TC_MF_1_15Suite : public TestCommand +class Test_TC_MF_1_6Suite : public TestCommand { public: - Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_15", 18, credsIssuerConfig) + Test_TC_MF_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_6", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -24199,9 +24240,9 @@ class Test_TC_MF_1_15Suite : public TestCommand AddArgument("payload", &mPayload); } - ~Test_TC_MF_1_15Suite() {} + ~Test_TC_MF_1_6Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(500)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: chip::Optional mNodeId; @@ -24235,91 +24276,57 @@ class Test_TC_MF_1_15Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 17: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -24337,20 +24344,28 @@ class Test_TC_MF_1_15Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Reboot target device"); + LogStep(0, "Stop target device"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 2: { - LogStep(2, "TH_CR1 opens a commissioning window on DUT_CE"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -24360,23 +24375,23 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 3: { - LogStep(3, "Commission from gamma"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } case 4: { - LogStep(4, "TH_CR3 starts a commissioning process with DUT_CE"); + LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(5, "Commission from beta"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -24386,201 +24401,116 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 6: { - LogStep(6, "Commission from beta"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 8: { - LogStep(8, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, chip::Optional(10000), chip::NullOptional ); } + case 8: { + LogStep(8, "Commission from beta"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } case 9: { - LogStep(9, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, chip::Optional(10000), chip::NullOptional ); } case 10: { - LogStep(10, "TH_CR1 reads the list of Fabrics on DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + LogStep(10, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + ListFreer listFreer; + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 11: { - LogStep(11, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); + LogStep(11, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, + chip::NullOptional); } case 12: { - LogStep(12, "TH_CR1 re-opens new commissioning window on DUT_CE"); + LogStep(12, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } case 13: { - LogStep(13, "TH_CR3 opens a new commissioning window on DUT_CE"); + LogStep(13, "Commission from beta"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityGamma, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 14: { - LogStep(14, "TH_CR1 reads the list of Fabrics on DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 15: { - LogStep(15, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(14, "TH_CR2 starts a commissioning process on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } - case 17: { - LogStep(17, "TH_CR2 opens a new commissioning window on DUT_CE"); + case 15: { + LogStep(15, "TH_CR3 starts a commissioning process with DUT_CE"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); } } return CHIP_NO_ERROR; } }; -class OTA_SuccessfulTransferSuite : public TestCommand +class Test_TC_MF_1_9Suite : public TestCommand { public: - OTA_SuccessfulTransferSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("OTA_SuccessfulTransfer", 11, credsIssuerConfig) + Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_9", 25, credsIssuerConfig) { - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); - AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); - AddArgument("providerPayload", &mProviderPayload); - AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); - AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); - AddArgument("providerKvs", &mProviderKvs); - AddArgument("otaImageFilePath", &mOtaImageFilePath); - AddArgument("rawImageFilePath", &mRawImageFilePath); - AddArgument("rawImageContent", &mRawImageContent); - AddArgument("downloadImageFilePath", &mDownloadImageFilePath); + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("payload2", &mPayload2); } - ~OTA_SuccessfulTransferSuite() {} + ~Test_TC_MF_1_9Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } private: - chip::Optional mEndpoint; - chip::Optional mRequestorNodeId; - chip::Optional mProviderNodeId; - chip::Optional mProviderPayload; - chip::Optional mProviderDiscriminator; - chip::Optional mProviderPort; - chip::Optional mProviderKvs; - chip::Optional mOtaImageFilePath; - chip::Optional mRawImageFilePath; - chip::Optional mRawImageContent; - chip::Optional mDownloadImageFilePath; + chip::Optional mNodeId; chip::Optional mTimeout; + chip::Optional mNodeIdForDuplicateCommissioning; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mPayload2; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -24604,36 +24534,93 @@ class OTA_SuccessfulTransferSuite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; default: @@ -24652,180 +24639,249 @@ class OTA_SuccessfulTransferSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Create OTA image"); + LogStep(0, "Reboot target device"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; - value.otaImageFilePath = - mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - value.rawImageFilePath = - mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.rawImageContent = - mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); - return CreateOtaImage(kIdentityAlpha, value); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 1: { - LogStep(1, "Start the provider with an image"); + LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); - value.discriminator.Emplace(); - value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; - value.port.Emplace(); - value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; - value.kvs.Emplace(); - value.kvs.Value() = - mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); - value.filepath.Emplace(); - value.filepath.Value() = - mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - return Start(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 2: { - LogStep(2, "Commission the provider from alpha"); + LogStep(2, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.payload = - mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); - return PairWithCode(kIdentityAlpha, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 3: { - LogStep(3, "Wait for the commissioned provider to be retrieved for alpha"); + LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - return WaitForCommissionee(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 4: { - LogStep(4, "Install ACL for QueryImage"); + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 112233ULL; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(2); - listHolder_0->mList[1].subjects.SetNull(); - listHolder_0->mList[1].targets.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - - listHolder_3->mList[0].cluster.SetNonNull(); - listHolder_3->mList[0].cluster.Value() = 41UL; - listHolder_3->mList[0].endpoint.SetNull(); - listHolder_3->mList[0].deviceType.SetNull(); - - listHolder_0->mList[1].targets.Value() = - chip::app::DataModel::List(listHolder_3->mList, - 1); - } - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 5: { - LogStep(5, "Stop the requestor"); + LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 6: { - LogStep(6, "Start the requestor with an OTA download path"); + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.otaDownloadPath.Emplace(); - value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return Start(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 7: { - LogStep(7, "Wait for the commissioned requestor to be retrieved for alpha"); + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 8: { - LogStep(8, "Send an announce OTA provider command to the requestor"); + LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type value; - value.providerNodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.vendorId = static_cast(0); - value.announcementReason = static_cast(0); - value.endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), OtaSoftwareUpdateRequestor::Id, - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id, value, chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 9: { - LogStep(9, "Wait for transfer complete message"); + LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); - return WaitForMessage(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 10: { - LogStep(10, "Compare original file to downloaded file"); + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; - value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return CompareFiles(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 11: { + LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 12: { + LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 13: { + LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 14: { + LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 15: { + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 16: { + LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 17: { + LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 18: { + LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 19: { + LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 20: { + LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 21: { + LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 22: { + LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 23: { + LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 24: { + LogStep(24, "TH_CR3 starts a commissioning process with DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); } } return CHIP_NO_ERROR; } }; -class Test_TC_OCC_1_1Suite : public TestCommand +class Test_TC_MF_1_10Suite : public TestCommand { public: - Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 7, credsIssuerConfig) + Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_10", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("payload2", &mPayload2); } - ~Test_TC_OCC_1_1Suite() {} + ~Test_TC_MF_1_10Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } private: chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mNodeIdForDuplicateCommissioning; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mPayload2; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -24845,105 +24901,1079 @@ class Test_TC_OCC_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "", "map32")); - } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, - OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Reboot target device"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 opens a commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 4: { + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 5: { + LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 6: { + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 7: { + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 8: { + LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 9: { + LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 10: { + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 11: { + LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 12: { + LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 13: { + LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 14: { + LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 15: { + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 16: { + LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 17: { + LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 18: { + LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 19: { + LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 20: { + LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 21: { + LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 22: { + LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 23: { + LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 24: { + LogStep(24, "TH_CR3 starts a commissioning process with DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + return PairWithCode(kIdentityGamma, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MF_1_15Suite : public TestCommand +{ +public: + Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_15", 18, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + } + + ~Test_TC_MF_1_15Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(500)); } + +private: + chip::Optional mNodeId; + chip::Optional mTimeout; + chip::Optional mNodeIdForDuplicateCommissioning; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Reboot target device"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 opens a commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 3: { + LogStep(3, "Commission from gamma"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); + } + case 4: { + LogStep(4, "TH_CR3 starts a commissioning process with DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); + } + case 5: { + LogStep(5, "TH_CR1 opens a commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 6: { + LogStep(6, "Commission from beta"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 7: { + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 8: { + LogStep(8, "TH_CR1 opens a commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 9: { + LogStep(9, "TH_CR1 opens a new commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 10: { + LogStep(10, "TH_CR1 reads the list of Fabrics on DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 11: { + LogStep(11, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH_CR1 re-opens new commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 13: { + LogStep(13, "TH_CR3 opens a new commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityGamma, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 14: { + LogStep(14, "TH_CR1 reads the list of Fabrics on DUT_CE"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + } + case 15: { + LogStep(15, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "TH_CR1 opens a new commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 17: { + LogStep(17, "TH_CR2 opens a new commissioning window on DUT_CE"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + value.PAKEVerifier = chip::ByteSpan( + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); + value.discriminator = 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + } + return CHIP_NO_ERROR; + } +}; + +class OTA_SuccessfulTransferSuite : public TestCommand +{ +public: + OTA_SuccessfulTransferSuite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("OTA_SuccessfulTransfer", 11, credsIssuerConfig) + { + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); + AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); + AddArgument("providerPayload", &mProviderPayload); + AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); + AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); + AddArgument("providerKvs", &mProviderKvs); + AddArgument("otaImageFilePath", &mOtaImageFilePath); + AddArgument("rawImageFilePath", &mRawImageFilePath); + AddArgument("rawImageContent", &mRawImageContent); + AddArgument("downloadImageFilePath", &mDownloadImageFilePath); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~OTA_SuccessfulTransferSuite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mEndpoint; + chip::Optional mRequestorNodeId; + chip::Optional mProviderNodeId; + chip::Optional mProviderPayload; + chip::Optional mProviderDiscriminator; + chip::Optional mProviderPort; + chip::Optional mProviderKvs; + chip::Optional mOtaImageFilePath; + chip::Optional mRawImageFilePath; + chip::Optional mRawImageContent; + chip::Optional mDownloadImageFilePath; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Create OTA image"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; + value.otaImageFilePath = + mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); + value.rawImageFilePath = + mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); + value.rawImageContent = + mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); + return CreateOtaImage(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Start the provider with an image"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); + value.discriminator.Emplace(); + value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; + value.port.Emplace(); + value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; + value.kvs.Emplace(); + value.kvs.Value() = + mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); + value.filepath.Emplace(); + value.filepath.Value() = + mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); + return Start(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "Commission the provider from alpha"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + value.payload = + mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); + return PairWithCode(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "Wait for the commissioned provider to be retrieved for alpha"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Install ACL for QueryImage"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = static_cast(5); + listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 112233ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + listHolder_0->mList[1].privilege = static_cast(3); + listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].subjects.SetNull(); + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNonNull(); + listHolder_3->mList[0].cluster.Value() = 41UL; + listHolder_3->mList[0].endpoint.SetNull(); + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 1); + } + listHolder_0->mList[1].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "Stop the requestor"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "Start the requestor with an OTA download path"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.otaDownloadPath.Emplace(); + value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() + : chip::Span("/tmp/downloadedImage", 20); + return Start(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Wait for the commissioned requestor to be retrieved for alpha"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "Send an announce OTA provider command to the requestor"); + ListFreer listFreer; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type value; + value.providerNodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + value.vendorId = static_cast(0); + value.announcementReason = static_cast(0); + value.endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), OtaSoftwareUpdateRequestor::Id, + OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id, value, chip::NullOptional + + ); + } + case 9: { + LogStep(9, "Wait for transfer complete message"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); + return WaitForMessage(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "Compare original file to downloaded file"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; + value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); + value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() + : chip::Span("/tmp/downloadedImage", 20); + return CompareFiles(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OCC_1_1Suite : public TestCommand +{ +public: + Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 7, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OCC_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } case 2: { LogStep(2, "Read the global attribute constraints : FeatureMap"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::FeatureMap::Id, @@ -27166,10 +28196,6 @@ class Test_TC_PRS_2_1Suite : public TestCommand } break; case 4: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -27180,10 +28206,6 @@ class Test_TC_PRS_2_1Suite : public TestCommand } break; case 5: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27194,10 +28216,6 @@ class Test_TC_PRS_2_1Suite : public TestCommand } break; case 6: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27208,10 +28226,6 @@ class Test_TC_PRS_2_1Suite : public TestCommand } break; case 7: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27222,10 +28236,6 @@ class Test_TC_PRS_2_1Suite : public TestCommand } break; case 8: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -27236,10 +28246,6 @@ class Test_TC_PRS_2_1Suite : public TestCommand } break; case 9: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { int8_t value; @@ -27273,46 +28279,55 @@ class Test_TC_PRS_2_1Suite : public TestCommand } case 1: { LogStep(1, "Read the mandatory attribute constraints: MeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the mandatory attribute constraints: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the mandatory attribute constraints: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Read the optional attribute: Tolerance"); + VerifyOrDo(!ShouldSkip("PRS.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Read the optional attribute: ScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id, true, chip::NullOptional); } case 6: { LogStep(6, "Read the optional attribute: MinScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id, true, chip::NullOptional); } case 7: { LogStep(7, "Read the optional attribute: MaxScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id, true, chip::NullOptional); } case 8: { LogStep(8, "Read the optional attribute: ScaledTolerance"); + VerifyOrDo(!ShouldSkip("PRS.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id, true, chip::NullOptional); } case 9: { LogStep(9, "Read the optional attribute: Scale"); + VerifyOrDo(!ShouldSkip("PRS.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id, true, chip::NullOptional); } @@ -29928,20 +30943,26 @@ class Test_TC_SC_4_2Suite : public TestCommand return FindCommissionable(kIdentityAlpha, value); } case 46: { - LogStep(46, "Log commands"); + LogStep(46, "TH adds an unknown key/value pair in the advertised data"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( - "TH adds an unknown key/value pair in the advertised datagarbage: not in length on purpose", 56); - return Log(kIdentityAlpha, value); + "Please enter 'y' if TH adds an unknown key/value pair in the advertised datagarbage: not in length on purpose", + 76); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 47: { - LogStep(47, "Log commands"); + LogStep(47, "Scan for DNS-SD commissioner advertisements from TH"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = - chip::Span("Scan for DNS-SD commissioner advertisements from THgarbage: not in length on purpose", 51); - return Log(kIdentityAlpha, value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -37326,13 +38347,7 @@ class Test_TC_WNCV_2_4Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::WindowCovering::Type value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); - } + shouldContinue = true; break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -37358,9 +38373,13 @@ class Test_TC_WNCV_2_4Suite : public TestCommand } case 1: { LogStep(1, "Reads Type attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_TYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Type::Id, true, - chip::NullOptional); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -37412,7 +38431,6 @@ class Test_TC_WNCV_2_5Suite : public TestCommand { chip::app::Clusters::WindowCovering::EndProductType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("endProductType", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); @@ -37441,7 +38459,7 @@ class Test_TC_WNCV_2_5Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads EndProductType attribute from DUT"); + LogStep(1, "TH reads EndProductType attribute from DUT"); VerifyOrDo(!ShouldSkip("A_ENDPRODUCTTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::EndProductType::Id, true, chip::NullOptional); @@ -63340,10 +64358,10 @@ class DL_SchedulesSuite : public TestCommand } }; -class Test_TC_DL_2_2Suite : public TestCommand +class Test_TC_DLRK_2_2Suite : public TestCommand { public: - Test_TC_DL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_2", 16, credsIssuerConfig) + Test_TC_DLRK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_2", 16, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -63351,7 +64369,7 @@ class Test_TC_DL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_2Suite() {} + ~Test_TC_DLRK_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -63628,10 +64646,10 @@ class Test_TC_DL_2_2Suite : public TestCommand } }; -class Test_TC_DL_2_3Suite : public TestCommand +class Test_TC_DLRK_2_3Suite : public TestCommand { public: - Test_TC_DL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_3", 9, credsIssuerConfig) + Test_TC_DLRK_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_3", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -63639,7 +64657,7 @@ class Test_TC_DL_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_3Suite() {} + ~Test_TC_DLRK_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -63821,10 +64839,10 @@ class Test_TC_DL_2_3Suite : public TestCommand } }; -class Test_TC_DL_2_4Suite : public TestCommand +class Test_TC_DLRK_2_4Suite : public TestCommand { public: - Test_TC_DL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_4", 8, credsIssuerConfig) + Test_TC_DLRK_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_4", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -63832,7 +64850,7 @@ class Test_TC_DL_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_4Suite() {} + ~Test_TC_DLRK_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -63998,10 +65016,10 @@ class Test_TC_DL_2_4Suite : public TestCommand } }; -class Test_TC_DL_2_5Suite : public TestCommand +class Test_TC_DLRK_2_5Suite : public TestCommand { public: - Test_TC_DL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_5", 10, credsIssuerConfig) + Test_TC_DLRK_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_5", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -64009,7 +65027,7 @@ class Test_TC_DL_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_5Suite() {} + ~Test_TC_DLRK_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -64285,10 +65303,10 @@ class Test_TC_DL_2_5Suite : public TestCommand } }; -class Test_TC_DL_2_7Suite : public TestCommand +class Test_TC_DLRK_2_7Suite : public TestCommand { public: - Test_TC_DL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_7", 13, credsIssuerConfig) + Test_TC_DLRK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_7", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -64296,7 +65314,7 @@ class Test_TC_DL_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_7Suite() {} + ~Test_TC_DLRK_2_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -64633,10 +65651,10 @@ class Test_TC_DL_2_7Suite : public TestCommand } }; -class Test_TC_DL_2_9Suite : public TestCommand +class Test_TC_DLRK_2_9Suite : public TestCommand { public: - Test_TC_DL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_9", 17, credsIssuerConfig) + Test_TC_DLRK_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_9", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -64644,7 +65662,7 @@ class Test_TC_DL_2_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_9Suite() {} + ~Test_TC_DLRK_2_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -68957,414 +69975,29 @@ class TestGroupDemoConfigSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Add Group 1 - endpoint 1"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "KeySet Write 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Map Group Key Set to group ID on a given fabric"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Install ACLs for test"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = static_cast(5); - listHolder_0->mList[0].authMode = static_cast(2); - listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 257ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GR_1_1Suite : public TestCommand -{ -public: - Test_TC_GR_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_GR_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GR_2_1Suite : public TestCommand -{ -public: - Test_TC_GR_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_GR_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GR_2_2Suite : public TestCommand -{ -public: - Test_TC_GR_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_GR_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GR_2_3Suite : public TestCommand -{ -public: - Test_TC_GR_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_GR_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GR_3_1Suite : public TestCommand -{ -public: - Test_TC_GR_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_GR_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + + VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -69380,71 +70013,120 @@ class Test_TC_GR_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_GR_3_2Suite : public TestCommand -{ -public: - Test_TC_GR_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } + case 1: { + LogStep(1, "Add Group 1 - endpoint 1"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::AddGroup::Type value; + value.groupId = 257U; + value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - ~Test_TC_GR_3_2Suite() {} + ); + } + case 2: { + LogStep(2, "KeySet Write 1"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + ); + } + case 3: { + LogStep(3, "Map Group Key Set to group ID on a given fabric"); + ListFreer listFreer; + chip::app::DataModel::List value; - // - // Tests methods - // + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + listHolder_0->mList[0].groupId = 257U; + listHolder_0->mList[0].groupKeySetID = 417U; + listHolder_0->mList[0].fabricIndex = 1U; - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } + case 4: { + LogStep(4, "Install ACLs for test"); + ListFreer listFreer; + chip::app::DataModel::List value; - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } + { + auto * listHolder_0 = new ListHolder(2); + listFreer.add(listHolder_0); - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + listHolder_0->mList[0].privilege = static_cast(5); + listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].subjects.SetNull(); + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + listHolder_0->mList[1].privilege = static_cast(3); + listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 257ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_BDX_1_1Suite : public TestCommand +class Test_TC_GR_1_1Suite : public TestCommand { public: - Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) + Test_TC_GR_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69452,7 +70134,7 @@ class Test_TC_BDX_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_1Suite() {} + ~Test_TC_GR_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69497,10 +70179,10 @@ class Test_TC_BDX_1_1Suite : public TestCommand } }; -class Test_TC_BDX_1_2Suite : public TestCommand +class Test_TC_GR_2_1Suite : public TestCommand { public: - Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) + Test_TC_GR_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69508,7 +70190,7 @@ class Test_TC_BDX_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_2Suite() {} + ~Test_TC_GR_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69553,10 +70235,10 @@ class Test_TC_BDX_1_2Suite : public TestCommand } }; -class Test_TC_BDX_1_3Suite : public TestCommand +class Test_TC_GR_2_2Suite : public TestCommand { public: - Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) + Test_TC_GR_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69564,7 +70246,7 @@ class Test_TC_BDX_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_3Suite() {} + ~Test_TC_GR_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69609,10 +70291,10 @@ class Test_TC_BDX_1_3Suite : public TestCommand } }; -class Test_TC_BDX_1_4Suite : public TestCommand +class Test_TC_GR_2_3Suite : public TestCommand { public: - Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) + Test_TC_GR_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69620,7 +70302,7 @@ class Test_TC_BDX_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_4Suite() {} + ~Test_TC_GR_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69665,10 +70347,10 @@ class Test_TC_BDX_1_4Suite : public TestCommand } }; -class Test_TC_BDX_1_5Suite : public TestCommand +class Test_TC_GR_3_1Suite : public TestCommand { public: - Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) + Test_TC_GR_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69676,7 +70358,7 @@ class Test_TC_BDX_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_5Suite() {} + ~Test_TC_GR_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69721,10 +70403,10 @@ class Test_TC_BDX_1_5Suite : public TestCommand } }; -class Test_TC_BDX_1_6Suite : public TestCommand +class Test_TC_GR_3_2Suite : public TestCommand { public: - Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) + Test_TC_GR_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_GR_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69732,7 +70414,7 @@ class Test_TC_BDX_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_6Suite() {} + ~Test_TC_GR_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69777,10 +70459,10 @@ class Test_TC_BDX_1_6Suite : public TestCommand } }; -class Test_TC_BDX_2_1Suite : public TestCommand +class Test_TC_BDX_1_1Suite : public TestCommand { public: - Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) + Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69788,7 +70470,7 @@ class Test_TC_BDX_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_1Suite() {} + ~Test_TC_BDX_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69833,10 +70515,10 @@ class Test_TC_BDX_2_1Suite : public TestCommand } }; -class Test_TC_BDX_2_2Suite : public TestCommand +class Test_TC_BDX_1_2Suite : public TestCommand { public: - Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) + Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69844,7 +70526,7 @@ class Test_TC_BDX_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_2Suite() {} + ~Test_TC_BDX_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69889,10 +70571,10 @@ class Test_TC_BDX_2_2Suite : public TestCommand } }; -class Test_TC_BDX_2_3Suite : public TestCommand +class Test_TC_BDX_1_3Suite : public TestCommand { public: - Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) + Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69900,7 +70582,7 @@ class Test_TC_BDX_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_3Suite() {} + ~Test_TC_BDX_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -69945,10 +70627,10 @@ class Test_TC_BDX_2_3Suite : public TestCommand } }; -class Test_TC_BDX_2_4Suite : public TestCommand +class Test_TC_BDX_1_4Suite : public TestCommand { public: - Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) + Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -69956,7 +70638,7 @@ class Test_TC_BDX_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_4Suite() {} + ~Test_TC_BDX_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70001,10 +70683,10 @@ class Test_TC_BDX_2_4Suite : public TestCommand } }; -class Test_TC_BDX_2_5Suite : public TestCommand +class Test_TC_BDX_1_5Suite : public TestCommand { public: - Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) + Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70012,7 +70694,7 @@ class Test_TC_BDX_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_5Suite() {} + ~Test_TC_BDX_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70057,10 +70739,10 @@ class Test_TC_BDX_2_5Suite : public TestCommand } }; -class Test_TC_BR_1Suite : public TestCommand +class Test_TC_BDX_1_6Suite : public TestCommand { public: - Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) + Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70068,7 +70750,7 @@ class Test_TC_BR_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_1Suite() {} + ~Test_TC_BDX_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70113,10 +70795,10 @@ class Test_TC_BR_1Suite : public TestCommand } }; -class Test_TC_BR_2Suite : public TestCommand +class Test_TC_BDX_2_1Suite : public TestCommand { public: - Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) + Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70124,7 +70806,7 @@ class Test_TC_BR_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_2Suite() {} + ~Test_TC_BDX_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70169,10 +70851,10 @@ class Test_TC_BR_2Suite : public TestCommand } }; -class Test_TC_BR_3Suite : public TestCommand +class Test_TC_BDX_2_2Suite : public TestCommand { public: - Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) + Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70180,7 +70862,7 @@ class Test_TC_BR_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_3Suite() {} + ~Test_TC_BDX_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70225,10 +70907,10 @@ class Test_TC_BR_3Suite : public TestCommand } }; -class Test_TC_BRAC_2_1Suite : public TestCommand +class Test_TC_BDX_2_3Suite : public TestCommand { public: - Test_TC_BRAC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_2_1", 0, credsIssuerConfig) + Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70236,7 +70918,7 @@ class Test_TC_BRAC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BRAC_2_1Suite() {} + ~Test_TC_BDX_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70281,10 +70963,10 @@ class Test_TC_BRAC_2_1Suite : public TestCommand } }; -class Test_TC_BRAC_2_2Suite : public TestCommand +class Test_TC_BDX_2_4Suite : public TestCommand { public: - Test_TC_BRAC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_2_2", 0, credsIssuerConfig) + Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70292,7 +70974,7 @@ class Test_TC_BRAC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BRAC_2_2Suite() {} + ~Test_TC_BDX_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70337,10 +71019,10 @@ class Test_TC_BRAC_2_2Suite : public TestCommand } }; -class Test_TC_BRAC_3_1Suite : public TestCommand +class Test_TC_BDX_2_5Suite : public TestCommand { public: - Test_TC_BRAC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_3_1", 0, credsIssuerConfig) + Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70348,7 +71030,7 @@ class Test_TC_BRAC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BRAC_3_1Suite() {} + ~Test_TC_BDX_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70393,10 +71075,10 @@ class Test_TC_BRAC_3_1Suite : public TestCommand } }; -class Test_TC_DA_1_1Suite : public TestCommand +class Test_TC_BR_1Suite : public TestCommand { public: - Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) + Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70404,7 +71086,7 @@ class Test_TC_DA_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_1Suite() {} + ~Test_TC_BR_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70449,10 +71131,10 @@ class Test_TC_DA_1_1Suite : public TestCommand } }; -class Test_TC_DA_1_2Suite : public TestCommand +class Test_TC_BR_2Suite : public TestCommand { public: - Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) + Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70460,7 +71142,7 @@ class Test_TC_DA_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_2Suite() {} + ~Test_TC_BR_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70505,10 +71187,10 @@ class Test_TC_DA_1_2Suite : public TestCommand } }; -class Test_TC_DA_1_3Suite : public TestCommand +class Test_TC_BR_3Suite : public TestCommand { public: - Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) + Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70516,7 +71198,7 @@ class Test_TC_DA_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_3Suite() {} + ~Test_TC_BR_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70561,10 +71243,10 @@ class Test_TC_DA_1_3Suite : public TestCommand } }; -class Test_TC_DA_1_4Suite : public TestCommand +class Test_TC_BRAC_2_1Suite : public TestCommand { public: - Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) + Test_TC_BRAC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70572,7 +71254,7 @@ class Test_TC_DA_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_4Suite() {} + ~Test_TC_BRAC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70617,10 +71299,10 @@ class Test_TC_DA_1_4Suite : public TestCommand } }; -class Test_TC_DA_1_5Suite : public TestCommand +class Test_TC_BRAC_2_2Suite : public TestCommand { public: - Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) + Test_TC_BRAC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70628,7 +71310,7 @@ class Test_TC_DA_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_5Suite() {} + ~Test_TC_BRAC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70673,10 +71355,10 @@ class Test_TC_DA_1_5Suite : public TestCommand } }; -class Test_TC_DA_1_6Suite : public TestCommand +class Test_TC_BRAC_3_1Suite : public TestCommand { public: - Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) + Test_TC_BRAC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BRAC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70684,7 +71366,7 @@ class Test_TC_DA_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_6Suite() {} + ~Test_TC_BRAC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70729,10 +71411,10 @@ class Test_TC_DA_1_6Suite : public TestCommand } }; -class Test_TC_DM_1_1Suite : public TestCommand +class Test_TC_DA_1_1Suite : public TestCommand { public: - Test_TC_DM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_1_1", 0, credsIssuerConfig) + Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70740,7 +71422,7 @@ class Test_TC_DM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_1_1Suite() {} + ~Test_TC_DA_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70785,10 +71467,10 @@ class Test_TC_DM_1_1Suite : public TestCommand } }; -class Test_TC_DM_1_2Suite : public TestCommand +class Test_TC_DA_1_2Suite : public TestCommand { public: - Test_TC_DM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_1_2", 0, credsIssuerConfig) + Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70796,7 +71478,7 @@ class Test_TC_DM_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_1_2Suite() {} + ~Test_TC_DA_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70841,10 +71523,10 @@ class Test_TC_DM_1_2Suite : public TestCommand } }; -class Test_TC_DM_1_3Suite : public TestCommand +class Test_TC_DA_1_3Suite : public TestCommand { public: - Test_TC_DM_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_1_3", 0, credsIssuerConfig) + Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70852,7 +71534,7 @@ class Test_TC_DM_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_1_3Suite() {} + ~Test_TC_DA_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70897,10 +71579,10 @@ class Test_TC_DM_1_3Suite : public TestCommand } }; -class Test_TC_DM_2_2Suite : public TestCommand +class Test_TC_DA_1_4Suite : public TestCommand { public: - Test_TC_DM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_2_2", 13, credsIssuerConfig) + Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70908,7 +71590,7 @@ class Test_TC_DM_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_2_2Suite() {} + ~Test_TC_DA_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70921,8 +71603,6 @@ class Test_TC_DM_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint32_t SoftwareVersionValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -70935,75 +71615,6 @@ class Test_TC_DM_2_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - SoftwareVersionValue = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "bool")); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -71019,94 +71630,71 @@ class Test_TC_DM_2_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Query SoftwareVersion"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Query Reachable Fabrics"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Query SoftwareVersion"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "Factory Reset the accessory"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Reboot target device"); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DA_1_5Suite : public TestCommand +{ +public: + Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DA_1_5Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } - case 12: { - LogStep(12, "Query Reachable Fabrics"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, - chip::NullOptional); + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { } return CHIP_NO_ERROR; } }; -class Test_TC_DM_2_4Suite : public TestCommand +class Test_TC_DA_1_6Suite : public TestCommand { public: - Test_TC_DM_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_2_4", 0, credsIssuerConfig) + Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71114,7 +71702,7 @@ class Test_TC_DM_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_2_4Suite() {} + ~Test_TC_DA_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71159,10 +71747,10 @@ class Test_TC_DM_2_4Suite : public TestCommand } }; -class Test_TC_DM_3_1Suite : public TestCommand +class Test_TC_BINFO_1_1Suite : public TestCommand { public: - Test_TC_DM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_3_1", 0, credsIssuerConfig) + Test_TC_BINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71170,7 +71758,7 @@ class Test_TC_DM_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_3_1Suite() {} + ~Test_TC_BINFO_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71215,10 +71803,11 @@ class Test_TC_DM_3_1Suite : public TestCommand } }; -class Test_TC_DM_3_2Suite : public TestCommand +class Test_TC_OPCREDS_1_2Suite : public TestCommand { public: - Test_TC_DM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_3_2", 0, credsIssuerConfig) + Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71226,7 +71815,7 @@ class Test_TC_DM_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_3_2Suite() {} + ~Test_TC_OPCREDS_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71271,10 +71860,10 @@ class Test_TC_DM_3_2Suite : public TestCommand } }; -class Test_TC_DM_3_3Suite : public TestCommand +class Test_TC_CNET_1_3Suite : public TestCommand { public: - Test_TC_DM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_3_3", 0, credsIssuerConfig) + Test_TC_CNET_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71282,7 +71871,7 @@ class Test_TC_DM_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_3_3Suite() {} + ~Test_TC_CNET_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71327,10 +71916,10 @@ class Test_TC_DM_3_3Suite : public TestCommand } }; -class Test_TC_DM_3_4Suite : public TestCommand +class Test_TC_BINFO_2_2Suite : public TestCommand { public: - Test_TC_DM_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_3_4", 0, credsIssuerConfig) + Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71338,7 +71927,7 @@ class Test_TC_DM_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_3_4Suite() {} + ~Test_TC_BINFO_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71351,6 +71940,8 @@ class Test_TC_DM_3_4Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint32_t SoftwareVersionValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -71363,6 +71954,75 @@ class Test_TC_DM_3_4Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + SoftwareVersionValue = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "bool")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "bool")); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -71378,15 +72038,94 @@ class Test_TC_DM_3_4Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Query SoftwareVersion"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Query Reachable Fabrics"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Reboot target device"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Query SoftwareVersion"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Reboot target device"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "Factory Reset the accessory"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "Reboot target device"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "Query Reachable Fabrics"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_DM_4_1Suite : public TestCommand +class Test_TC_BINFO_2_4Suite : public TestCommand { public: - Test_TC_DM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_1", 0, credsIssuerConfig) + Test_TC_BINFO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71394,7 +72133,7 @@ class Test_TC_DM_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_1Suite() {} + ~Test_TC_BINFO_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71439,10 +72178,11 @@ class Test_TC_DM_4_1Suite : public TestCommand } }; -class Test_TC_DM_4_2Suite : public TestCommand +class Test_TC_OPCREDS_3_1Suite : public TestCommand { public: - Test_TC_DM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_2", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71450,7 +72190,7 @@ class Test_TC_DM_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_2Suite() {} + ~Test_TC_OPCREDS_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71495,10 +72235,11 @@ class Test_TC_DM_4_2Suite : public TestCommand } }; -class Test_TC_DM_4_3Suite : public TestCommand +class Test_TC_OPCREDS_3_2Suite : public TestCommand { public: - Test_TC_DM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_3", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71506,7 +72247,7 @@ class Test_TC_DM_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_3Suite() {} + ~Test_TC_OPCREDS_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71551,10 +72292,11 @@ class Test_TC_DM_4_3Suite : public TestCommand } }; -class Test_TC_DM_4_4Suite : public TestCommand +class Test_TC_OPCREDS_3_3Suite : public TestCommand { public: - Test_TC_DM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_4", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71562,7 +72304,7 @@ class Test_TC_DM_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_4Suite() {} + ~Test_TC_OPCREDS_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71607,10 +72349,11 @@ class Test_TC_DM_4_4Suite : public TestCommand } }; -class Test_TC_DM_4_5Suite : public TestCommand +class Test_TC_OPCREDS_3_4Suite : public TestCommand { public: - Test_TC_DM_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_5", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71618,7 +72361,7 @@ class Test_TC_DM_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_5Suite() {} + ~Test_TC_OPCREDS_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71663,10 +72406,10 @@ class Test_TC_DM_4_5Suite : public TestCommand } }; -class Test_TC_DM_4_6Suite : public TestCommand +class Test_TC_CNET_4_1Suite : public TestCommand { public: - Test_TC_DM_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_6", 0, credsIssuerConfig) + Test_TC_CNET_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71674,7 +72417,7 @@ class Test_TC_DM_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_6Suite() {} + ~Test_TC_CNET_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71719,10 +72462,10 @@ class Test_TC_DM_4_6Suite : public TestCommand } }; -class Test_TC_DM_4_7Suite : public TestCommand +class Test_TC_CNET_4_2Suite : public TestCommand { public: - Test_TC_DM_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_7", 0, credsIssuerConfig) + Test_TC_CNET_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71730,7 +72473,7 @@ class Test_TC_DM_4_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_7Suite() {} + ~Test_TC_CNET_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71775,10 +72518,10 @@ class Test_TC_DM_4_7Suite : public TestCommand } }; -class Test_TC_DM_4_8Suite : public TestCommand +class Test_TC_CNET_4_3Suite : public TestCommand { public: - Test_TC_DM_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_8", 0, credsIssuerConfig) + Test_TC_CNET_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71786,7 +72529,7 @@ class Test_TC_DM_4_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_8Suite() {} + ~Test_TC_CNET_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71831,10 +72574,10 @@ class Test_TC_DM_4_8Suite : public TestCommand } }; -class Test_TC_DM_4_9Suite : public TestCommand +class Test_TC_CNET_4_4Suite : public TestCommand { public: - Test_TC_DM_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_9", 0, credsIssuerConfig) + Test_TC_CNET_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71842,7 +72585,7 @@ class Test_TC_DM_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_9Suite() {} + ~Test_TC_CNET_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71887,10 +72630,10 @@ class Test_TC_DM_4_9Suite : public TestCommand } }; -class Test_TC_DM_4_10Suite : public TestCommand +class Test_TC_CNET_4_5Suite : public TestCommand { public: - Test_TC_DM_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_10", 0, credsIssuerConfig) + Test_TC_CNET_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71898,7 +72641,7 @@ class Test_TC_DM_4_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_10Suite() {} + ~Test_TC_CNET_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71943,10 +72686,10 @@ class Test_TC_DM_4_10Suite : public TestCommand } }; -class Test_TC_DM_4_11Suite : public TestCommand +class Test_TC_CNET_4_6Suite : public TestCommand { public: - Test_TC_DM_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_11", 0, credsIssuerConfig) + Test_TC_CNET_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71954,7 +72697,7 @@ class Test_TC_DM_4_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_11Suite() {} + ~Test_TC_CNET_4_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71999,10 +72742,10 @@ class Test_TC_DM_4_11Suite : public TestCommand } }; -class Test_TC_DM_4_12Suite : public TestCommand +class Test_TC_CNET_4_7Suite : public TestCommand { public: - Test_TC_DM_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_12", 0, credsIssuerConfig) + Test_TC_CNET_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72010,7 +72753,7 @@ class Test_TC_DM_4_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_12Suite() {} + ~Test_TC_CNET_4_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72055,10 +72798,10 @@ class Test_TC_DM_4_12Suite : public TestCommand } }; -class Test_TC_DM_4_13Suite : public TestCommand +class Test_TC_CNET_4_8Suite : public TestCommand { public: - Test_TC_DM_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_13", 0, credsIssuerConfig) + Test_TC_CNET_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72066,7 +72809,7 @@ class Test_TC_DM_4_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_13Suite() {} + ~Test_TC_CNET_4_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72111,10 +72854,10 @@ class Test_TC_DM_4_13Suite : public TestCommand } }; -class Test_TC_DM_4_14Suite : public TestCommand +class Test_TC_CNET_4_9Suite : public TestCommand { public: - Test_TC_DM_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_14", 0, credsIssuerConfig) + Test_TC_CNET_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72122,7 +72865,7 @@ class Test_TC_DM_4_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_14Suite() {} + ~Test_TC_CNET_4_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72167,10 +72910,10 @@ class Test_TC_DM_4_14Suite : public TestCommand } }; -class Test_TC_DM_4_15Suite : public TestCommand +class Test_TC_CNET_4_10Suite : public TestCommand { public: - Test_TC_DM_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_15", 0, credsIssuerConfig) + Test_TC_CNET_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72178,7 +72921,7 @@ class Test_TC_DM_4_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_15Suite() {} + ~Test_TC_CNET_4_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72223,10 +72966,10 @@ class Test_TC_DM_4_15Suite : public TestCommand } }; -class Test_TC_DM_4_16Suite : public TestCommand +class Test_TC_CNET_4_11Suite : public TestCommand { public: - Test_TC_DM_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_16", 0, credsIssuerConfig) + Test_TC_CNET_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_11", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72234,7 +72977,7 @@ class Test_TC_DM_4_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_16Suite() {} + ~Test_TC_CNET_4_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72279,10 +73022,10 @@ class Test_TC_DM_4_16Suite : public TestCommand } }; -class Test_TC_DM_4_17Suite : public TestCommand +class Test_TC_CNET_4_12Suite : public TestCommand { public: - Test_TC_DM_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_17", 0, credsIssuerConfig) + Test_TC_CNET_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_12", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72290,7 +73033,7 @@ class Test_TC_DM_4_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_17Suite() {} + ~Test_TC_CNET_4_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72335,10 +73078,10 @@ class Test_TC_DM_4_17Suite : public TestCommand } }; -class Test_TC_DM_4_18Suite : public TestCommand +class Test_TC_CNET_4_13Suite : public TestCommand { public: - Test_TC_DM_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_18", 0, credsIssuerConfig) + Test_TC_CNET_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_13", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72346,7 +73089,7 @@ class Test_TC_DM_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_18Suite() {} + ~Test_TC_CNET_4_13Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72391,10 +73134,10 @@ class Test_TC_DM_4_18Suite : public TestCommand } }; -class Test_TC_DM_4_19Suite : public TestCommand +class Test_TC_CNET_4_14Suite : public TestCommand { public: - Test_TC_DM_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_19", 0, credsIssuerConfig) + Test_TC_CNET_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72402,7 +73145,7 @@ class Test_TC_DM_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_19Suite() {} + ~Test_TC_CNET_4_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72447,10 +73190,10 @@ class Test_TC_DM_4_19Suite : public TestCommand } }; -class Test_TC_DM_4_20Suite : public TestCommand +class Test_TC_CNET_4_15Suite : public TestCommand { public: - Test_TC_DM_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_20", 0, credsIssuerConfig) + Test_TC_CNET_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72458,7 +73201,7 @@ class Test_TC_DM_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_20Suite() {} + ~Test_TC_CNET_4_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72503,10 +73246,10 @@ class Test_TC_DM_4_20Suite : public TestCommand } }; -class Test_TC_DM_4_21Suite : public TestCommand +class Test_TC_CNET_4_16Suite : public TestCommand { public: - Test_TC_DM_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_21", 0, credsIssuerConfig) + Test_TC_CNET_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_16", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72514,7 +73257,7 @@ class Test_TC_DM_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_21Suite() {} + ~Test_TC_CNET_4_16Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72559,10 +73302,10 @@ class Test_TC_DM_4_21Suite : public TestCommand } }; -class Test_TC_DLOG_1_1Suite : public TestCommand +class Test_TC_CNET_4_17Suite : public TestCommand { public: - Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 0, credsIssuerConfig) + Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72570,7 +73313,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_1_1Suite() {} + ~Test_TC_CNET_4_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72615,10 +73358,10 @@ class Test_TC_DLOG_1_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_CNET_4_18Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72626,7 +73369,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_CNET_4_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72671,10 +73414,10 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_CNET_4_19Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72682,7 +73425,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_CNET_4_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72727,10 +73470,10 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_CNET_4_20Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72738,7 +73481,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_CNET_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72783,10 +73526,10 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DESC_2_1Suite : public TestCommand +class Test_TC_CNET_4_21Suite : public TestCommand { public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) + Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72794,7 +73537,7 @@ class Test_TC_DESC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_1Suite() {} + ~Test_TC_CNET_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72839,10 +73582,10 @@ class Test_TC_DESC_2_1Suite : public TestCommand } }; -class Test_TC_DESC_2_2Suite : public TestCommand +class Test_TC_DLOG_1_1Suite : public TestCommand { public: - Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) + Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72850,7 +73593,7 @@ class Test_TC_DESC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2Suite() {} + ~Test_TC_DLOG_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72895,10 +73638,10 @@ class Test_TC_DESC_2_2Suite : public TestCommand } }; -class Test_TC_DGETH_1_1Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 0, credsIssuerConfig) + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72906,7 +73649,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_1_1Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72951,10 +73694,10 @@ class Test_TC_DGETH_1_1Suite : public TestCommand } }; -class Test_TC_DGETH_3_1Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72962,7 +73705,7 @@ class Test_TC_DGETH_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73007,10 +73750,10 @@ class Test_TC_DGETH_3_1Suite : public TestCommand } }; -class Test_TC_DGETH_3_2Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73018,7 +73761,7 @@ class Test_TC_DGETH_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_2Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73063,10 +73806,10 @@ class Test_TC_DGETH_3_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_2Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) + Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73074,7 +73817,7 @@ class Test_TC_CGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_2Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73119,10 +73862,10 @@ class Test_TC_CGEN_2_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_3Suite : public TestCommand +class Test_TC_DESC_2_2Suite : public TestCommand { public: - Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) + Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73130,7 +73873,7 @@ class Test_TC_CGEN_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_3Suite() {} + ~Test_TC_DESC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73175,10 +73918,10 @@ class Test_TC_CGEN_2_3Suite : public TestCommand } }; -class Test_TC_CGEN_2_4Suite : public TestCommand +class Test_TC_DGETH_1_1Suite : public TestCommand { public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) + Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73186,7 +73929,7 @@ class Test_TC_CGEN_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_4Suite() {} + ~Test_TC_DGETH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73231,11 +73974,10 @@ class Test_TC_CGEN_2_4Suite : public TestCommand } }; -class Test_TC_GENDIAG_1_2Suite : public TestCommand +class Test_TC_DGETH_3_1Suite : public TestCommand { public: - Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_1_2", 0, credsIssuerConfig) + Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73243,7 +73985,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_1_2Suite() {} + ~Test_TC_DGETH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73288,10 +74030,10 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand } }; -class Test_TC_I_3_1Suite : public TestCommand +class Test_TC_DGETH_3_2Suite : public TestCommand { public: - Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) + Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73299,7 +74041,7 @@ class Test_TC_I_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_1Suite() {} + ~Test_TC_DGETH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73344,10 +74086,10 @@ class Test_TC_I_3_1Suite : public TestCommand } }; -class Test_TC_I_3_2Suite : public TestCommand +class Test_TC_CGEN_2_2Suite : public TestCommand { public: - Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) + Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73355,7 +74097,7 @@ class Test_TC_I_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_2Suite() {} + ~Test_TC_CGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73400,10 +74142,10 @@ class Test_TC_I_3_2Suite : public TestCommand } }; -class Test_TC_ILL_2_2Suite : public TestCommand +class Test_TC_CGEN_2_3Suite : public TestCommand { public: - Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 0, credsIssuerConfig) + Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73411,7 +74153,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ILL_2_2Suite() {} + ~Test_TC_CGEN_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73456,10 +74198,10 @@ class Test_TC_ILL_2_2Suite : public TestCommand } }; -class Test_TC_ILL_3_1Suite : public TestCommand +class Test_TC_CGEN_2_4Suite : public TestCommand { public: - Test_TC_ILL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_3_1", 0, credsIssuerConfig) + Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73467,7 +74209,7 @@ class Test_TC_ILL_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ILL_3_1Suite() {} + ~Test_TC_CGEN_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73512,10 +74254,11 @@ class Test_TC_ILL_3_1Suite : public TestCommand } }; -class Test_TC_IDM_1_1Suite : public TestCommand +class Test_TC_GENDIAG_1_2Suite : public TestCommand { public: - Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) + Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GENDIAG_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73523,7 +74266,7 @@ class Test_TC_IDM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_1_1Suite() {} + ~Test_TC_GENDIAG_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73568,10 +74311,10 @@ class Test_TC_IDM_1_1Suite : public TestCommand } }; -class Test_TC_IDM_1_2Suite : public TestCommand +class Test_TC_I_3_1Suite : public TestCommand { public: - Test_TC_IDM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_2", 0, credsIssuerConfig) + Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73579,7 +74322,7 @@ class Test_TC_IDM_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_1_2Suite() {} + ~Test_TC_I_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73624,10 +74367,10 @@ class Test_TC_IDM_1_2Suite : public TestCommand } }; -class Test_TC_IDM_2_1Suite : public TestCommand +class Test_TC_I_3_2Suite : public TestCommand { public: - Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) + Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73635,7 +74378,7 @@ class Test_TC_IDM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_2_1Suite() {} + ~Test_TC_I_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73680,10 +74423,10 @@ class Test_TC_IDM_2_1Suite : public TestCommand } }; -class Test_TC_IDM_2_2Suite : public TestCommand +class Test_TC_ILL_2_2Suite : public TestCommand { public: - Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) + Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73691,7 +74434,7 @@ class Test_TC_IDM_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_2_2Suite() {} + ~Test_TC_ILL_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73736,10 +74479,10 @@ class Test_TC_IDM_2_2Suite : public TestCommand } }; -class Test_TC_IDM_3_1Suite : public TestCommand +class Test_TC_ILL_3_1Suite : public TestCommand { public: - Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) + Test_TC_ILL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73747,7 +74490,7 @@ class Test_TC_IDM_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_3_1Suite() {} + ~Test_TC_ILL_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73792,10 +74535,10 @@ class Test_TC_IDM_3_1Suite : public TestCommand } }; -class Test_TC_IDM_3_2Suite : public TestCommand +class Test_TC_IDM_1_1Suite : public TestCommand { public: - Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) + Test_TC_IDM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73803,7 +74546,7 @@ class Test_TC_IDM_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_3_2Suite() {} + ~Test_TC_IDM_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73848,10 +74591,10 @@ class Test_TC_IDM_3_2Suite : public TestCommand } }; -class Test_TC_IDM_4_1Suite : public TestCommand +class Test_TC_IDM_1_2Suite : public TestCommand { public: - Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) + Test_TC_IDM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73859,7 +74602,7 @@ class Test_TC_IDM_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_1Suite() {} + ~Test_TC_IDM_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73904,10 +74647,10 @@ class Test_TC_IDM_4_1Suite : public TestCommand } }; -class Test_TC_IDM_4_2Suite : public TestCommand +class Test_TC_IDM_2_1Suite : public TestCommand { public: - Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) + Test_TC_IDM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73915,7 +74658,7 @@ class Test_TC_IDM_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_2Suite() {} + ~Test_TC_IDM_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -73960,10 +74703,10 @@ class Test_TC_IDM_4_2Suite : public TestCommand } }; -class Test_TC_IDM_4_3Suite : public TestCommand +class Test_TC_IDM_2_2Suite : public TestCommand { public: - Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) + Test_TC_IDM_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -73971,7 +74714,7 @@ class Test_TC_IDM_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_4_3Suite() {} + ~Test_TC_IDM_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74016,10 +74759,10 @@ class Test_TC_IDM_4_3Suite : public TestCommand } }; -class Test_TC_IDM_5_1Suite : public TestCommand +class Test_TC_IDM_3_1Suite : public TestCommand { public: - Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) + Test_TC_IDM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74027,7 +74770,7 @@ class Test_TC_IDM_5_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_5_1Suite() {} + ~Test_TC_IDM_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74072,10 +74815,10 @@ class Test_TC_IDM_5_1Suite : public TestCommand } }; -class Test_TC_IDM_5_2Suite : public TestCommand +class Test_TC_IDM_3_2Suite : public TestCommand { public: - Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) + Test_TC_IDM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74083,7 +74826,7 @@ class Test_TC_IDM_5_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_5_2Suite() {} + ~Test_TC_IDM_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74128,10 +74871,10 @@ class Test_TC_IDM_5_2Suite : public TestCommand } }; -class Test_TC_IDM_6_1Suite : public TestCommand +class Test_TC_IDM_4_1Suite : public TestCommand { public: - Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) + Test_TC_IDM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74139,7 +74882,7 @@ class Test_TC_IDM_6_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_1Suite() {} + ~Test_TC_IDM_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74184,10 +74927,10 @@ class Test_TC_IDM_6_1Suite : public TestCommand } }; -class Test_TC_IDM_6_2Suite : public TestCommand +class Test_TC_IDM_4_2Suite : public TestCommand { public: - Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) + Test_TC_IDM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74195,7 +74938,7 @@ class Test_TC_IDM_6_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_2Suite() {} + ~Test_TC_IDM_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74240,10 +74983,10 @@ class Test_TC_IDM_6_2Suite : public TestCommand } }; -class Test_TC_IDM_6_3Suite : public TestCommand +class Test_TC_IDM_4_3Suite : public TestCommand { public: - Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) + Test_TC_IDM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74251,7 +74994,7 @@ class Test_TC_IDM_6_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_3Suite() {} + ~Test_TC_IDM_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74296,10 +75039,10 @@ class Test_TC_IDM_6_3Suite : public TestCommand } }; -class Test_TC_IDM_6_4Suite : public TestCommand +class Test_TC_IDM_5_1Suite : public TestCommand { public: - Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) + Test_TC_IDM_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74307,7 +75050,7 @@ class Test_TC_IDM_6_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_6_4Suite() {} + ~Test_TC_IDM_5_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74352,10 +75095,10 @@ class Test_TC_IDM_6_4Suite : public TestCommand } }; -class Test_TC_IDM_7_1Suite : public TestCommand +class Test_TC_IDM_5_2Suite : public TestCommand { public: - Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) + Test_TC_IDM_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_5_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74363,7 +75106,7 @@ class Test_TC_IDM_7_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_7_1Suite() {} + ~Test_TC_IDM_5_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74408,10 +75151,10 @@ class Test_TC_IDM_7_1Suite : public TestCommand } }; -class Test_TC_IDM_8_1Suite : public TestCommand +class Test_TC_IDM_6_1Suite : public TestCommand { public: - Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) + Test_TC_IDM_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74419,7 +75162,7 @@ class Test_TC_IDM_8_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_IDM_8_1Suite() {} + ~Test_TC_IDM_6_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74464,10 +75207,10 @@ class Test_TC_IDM_8_1Suite : public TestCommand } }; -class Test_TC_MC_2_2Suite : public TestCommand +class Test_TC_IDM_6_2Suite : public TestCommand { public: - Test_TC_MC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_2_2", 0, credsIssuerConfig) + Test_TC_IDM_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74475,7 +75218,7 @@ class Test_TC_MC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_2_2Suite() {} + ~Test_TC_IDM_6_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74520,10 +75263,10 @@ class Test_TC_MC_2_2Suite : public TestCommand } }; -class Test_TC_MC_3_7_1Suite : public TestCommand +class Test_TC_IDM_6_3Suite : public TestCommand { public: - Test_TC_MC_3_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_7_1", 0, credsIssuerConfig) + Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74531,7 +75274,7 @@ class Test_TC_MC_3_7_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_7_1Suite() {} + ~Test_TC_IDM_6_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74576,10 +75319,10 @@ class Test_TC_MC_3_7_1Suite : public TestCommand } }; -class Test_TC_MC_3_8_1Suite : public TestCommand +class Test_TC_IDM_6_4Suite : public TestCommand { public: - Test_TC_MC_3_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_8_1", 0, credsIssuerConfig) + Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_6_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74587,7 +75330,7 @@ class Test_TC_MC_3_8_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_8_1Suite() {} + ~Test_TC_IDM_6_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74632,10 +75375,10 @@ class Test_TC_MC_3_8_1Suite : public TestCommand } }; -class Test_TC_MC_3_9_1Suite : public TestCommand +class Test_TC_IDM_7_1Suite : public TestCommand { public: - Test_TC_MC_3_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_9_1", 0, credsIssuerConfig) + Test_TC_IDM_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_7_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74643,7 +75386,7 @@ class Test_TC_MC_3_9_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_9_1Suite() {} + ~Test_TC_IDM_7_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74688,10 +75431,10 @@ class Test_TC_MC_3_9_1Suite : public TestCommand } }; -class Test_TC_MC_3_14Suite : public TestCommand +class Test_TC_IDM_8_1Suite : public TestCommand { public: - Test_TC_MC_3_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_14", 0, credsIssuerConfig) + Test_TC_IDM_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_IDM_8_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74699,7 +75442,7 @@ class Test_TC_MC_3_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_14Suite() {} + ~Test_TC_IDM_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74744,10 +75487,10 @@ class Test_TC_MC_3_14Suite : public TestCommand } }; -class Test_TC_MC_3_15Suite : public TestCommand +class Test_TC_MC_2_2Suite : public TestCommand { public: - Test_TC_MC_3_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_15", 0, credsIssuerConfig) + Test_TC_MC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74755,7 +75498,7 @@ class Test_TC_MC_3_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_15Suite() {} + ~Test_TC_MC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74800,10 +75543,10 @@ class Test_TC_MC_3_15Suite : public TestCommand } }; -class Test_TC_MC_3_16Suite : public TestCommand +class Test_TC_MC_3_7_1Suite : public TestCommand { public: - Test_TC_MC_3_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_16", 0, credsIssuerConfig) + Test_TC_MC_3_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_7_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74811,7 +75554,7 @@ class Test_TC_MC_3_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_16Suite() {} + ~Test_TC_MC_3_7_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74856,10 +75599,10 @@ class Test_TC_MC_3_16Suite : public TestCommand } }; -class Test_TC_MC_3_17Suite : public TestCommand +class Test_TC_MC_3_8_1Suite : public TestCommand { public: - Test_TC_MC_3_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_17", 0, credsIssuerConfig) + Test_TC_MC_3_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_8_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74867,7 +75610,7 @@ class Test_TC_MC_3_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_3_17Suite() {} + ~Test_TC_MC_3_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74912,10 +75655,10 @@ class Test_TC_MC_3_17Suite : public TestCommand } }; -class Test_TC_MC_4_1Suite : public TestCommand +class Test_TC_MC_3_9_1Suite : public TestCommand { public: - Test_TC_MC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_4_1", 0, credsIssuerConfig) + Test_TC_MC_3_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_9_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74923,7 +75666,7 @@ class Test_TC_MC_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_4_1Suite() {} + ~Test_TC_MC_3_9_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74968,10 +75711,10 @@ class Test_TC_MC_4_1Suite : public TestCommand } }; -class Test_TC_MC_5_4Suite : public TestCommand +class Test_TC_MC_3_14Suite : public TestCommand { public: - Test_TC_MC_5_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_4", 0, credsIssuerConfig) + Test_TC_MC_3_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74979,7 +75722,7 @@ class Test_TC_MC_5_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_5_4Suite() {} + ~Test_TC_MC_3_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75024,10 +75767,10 @@ class Test_TC_MC_5_4Suite : public TestCommand } }; -class Test_TC_MC_5_5Suite : public TestCommand +class Test_TC_MC_3_15Suite : public TestCommand { public: - Test_TC_MC_5_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_5", 0, credsIssuerConfig) + Test_TC_MC_3_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75035,7 +75778,7 @@ class Test_TC_MC_5_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_5_5Suite() {} + ~Test_TC_MC_3_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75080,10 +75823,10 @@ class Test_TC_MC_5_5Suite : public TestCommand } }; -class Test_TC_MC_5_6Suite : public TestCommand +class Test_TC_MC_3_16Suite : public TestCommand { public: - Test_TC_MC_5_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_6", 0, credsIssuerConfig) + Test_TC_MC_3_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_16", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75091,7 +75834,7 @@ class Test_TC_MC_5_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_5_6Suite() {} + ~Test_TC_MC_3_16Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75136,10 +75879,10 @@ class Test_TC_MC_5_6Suite : public TestCommand } }; -class Test_TC_MC_6_1Suite : public TestCommand +class Test_TC_MC_3_17Suite : public TestCommand { public: - Test_TC_MC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_1", 13, credsIssuerConfig) + Test_TC_MC_3_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_3_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75147,111 +75890,31 @@ class Test_TC_MC_6_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_6_1Suite() {} + ~Test_TC_MC_3_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 2U)); - } - break; + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -75267,116 +75930,15 @@ class Test_TC_MC_6_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Reads the CurrentState attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "sends a Play command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional - - ); - } - case 5: { - LogStep(5, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Physically verify that the media is playinggarbage: not in length on purpose", 43); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Reads the playback state attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "sends a Pause command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Physically verify that the media is pausedgarbage: not in length on purpose", 42); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Reads the playback state attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 10: { - LogStep(10, "sends a Stop command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::StopPlayback::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StopPlayback::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Physically verify that the media is stopedgarbage: not in length on purpose", 42); - return UserPrompt(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Reads the playback state attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_6_2Suite : public TestCommand +class Test_TC_MC_4_1Suite : public TestCommand { public: - Test_TC_MC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_2", 19, credsIssuerConfig) + Test_TC_MC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75384,7 +75946,7 @@ class Test_TC_MC_6_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_6_2Suite() {} + ~Test_TC_MC_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75409,119 +75971,6 @@ class Test_TC_MC_6_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -75537,171 +75986,71 @@ class Test_TC_MC_6_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional + return CHIP_NO_ERROR; + } +}; - ); - } - case 2: { - LogStep(2, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Sends a Play command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional +class Test_TC_MC_5_4Suite : public TestCommand +{ +public: + Test_TC_MC_5_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } - ); - } - case 5: { - LogStep(5, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Physically verify that the media is playinggarbage: not in length on purpose", 43); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Reads the CurrentState attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "Sends a StartOver command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::StartOver::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::StartOver::Id, value, - chip::NullOptional + ~Test_TC_MC_5_4Suite() {} - ); - } - case 8: { - LogStep(8, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Physically verify that the media is started overgarbage: not in length on purpose", 48); - return UserPrompt(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "Sends a Next command to the DUT"); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Next::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Next::Id, value, - chip::NullOptional + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - ); - } - case 10: { - LogStep(10, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Verify that the next media item in the queue has been loadedgarbage: not in length on purpose", 60); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Sends a Previous command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Previous::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Previous::Id, value, - chip::NullOptional +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - ); - } - case 12: { - LogStep(12, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Verify that the previous media item in the queue has been loadedgarbage: not in length on purpose", 64); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Sends a SkipForward command to the DUT "); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type value; - value.deltaPositionMilliseconds = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::SkipForward::Id, value, - chip::NullOptional + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - ); - } - case 14: { - LogStep(14, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that the media has skipped forward 10 secondsgarbage: not in length on purpose", 52); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Sends a SkipBackward command to the DUT "); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type value; - value.deltaPositionMilliseconds = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::SkipBackward::Id, value, - chip::NullOptional + // + // Tests methods + // - ); - } - case 17: { - LogStep(17, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Verify that the media has skipped backward 10 secondsgarbage: not in length on purpose", 53); - return UserPrompt(kIdentityAlpha, value); + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } - case 18: { - LogStep(18, "Reads the SampledPosition attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { } return CHIP_NO_ERROR; } }; -class Test_TC_MC_6_3Suite : public TestCommand +class Test_TC_MC_5_5Suite : public TestCommand { public: - Test_TC_MC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_3", 9, credsIssuerConfig) + Test_TC_MC_5_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75709,7 +76058,7 @@ class Test_TC_MC_6_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_6_3Suite() {} + ~Test_TC_MC_5_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75734,54 +76083,6 @@ class Test_TC_MC_6_3Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("sampledPosition", value)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 5)); - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -75797,89 +76098,15 @@ class Test_TC_MC_6_3Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Sends a Seek command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; - value.position = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Verify that the media has moved to 10 seconds from the starting point.garbage: not in length on purpose", 70); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Reads the SampledPosition attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "User prompt needed to enter the value beyond the furthest valid positiongarbage: not in length on purpose", 72); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Sends a Seek command Position value beyond the furthest valid position"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Seek::Type value; - value.position = 10000ULL; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Seek::Id, value, - chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Reads the SampledPosition attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::SampledPosition::Id, - true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_MC_6_4Suite : public TestCommand +class Test_TC_MC_5_6Suite : public TestCommand { public: - Test_TC_MC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_4", 24, credsIssuerConfig) + Test_TC_MC_5_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_5_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75887,7 +76114,7 @@ class Test_TC_MC_6_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_6_4Suite() {} + ~Test_TC_MC_5_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75912,154 +76139,6 @@ class Test_TC_MC_6_4Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 0.0f)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 2.0f)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0U)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, -1.0f)); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, -2.0f)); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - float value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -76075,188 +76154,6 @@ class Test_TC_MC_6_4Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads the PlaybackSpeed attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that the media is playinggarbage: not in length on purpose", 32); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Reads the CurrentState attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that the media play speed has increasedgarbage: not in length on purpose", 46); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Reads the CurrentState attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "Reads the PlaybackSpeed attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } - case 17: { - LogStep(17, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Reads the PlaybackSpeed attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Sends a Play command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Play::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Play::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Verify that the media is has resumed playing forward at the default speedgarbage: not in length on purpose", 73); - return UserPrompt(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 22: { - LogStep(22, "Sends consecutive FastForward commands"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Sends consecutive Rewind commands"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } } return CHIP_NO_ERROR; } @@ -82599,10 +82496,10 @@ class Test_TC_CC_9_4Suite : public TestCommand } }; -class Test_TC_DL_1_1Suite : public TestCommand +class Test_TC_DLRK_1_1Suite : public TestCommand { public: - Test_TC_DL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_1_1", 0, credsIssuerConfig) + Test_TC_DLRK_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82610,7 +82507,7 @@ class Test_TC_DL_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_1_1Suite() {} + ~Test_TC_DLRK_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82655,10 +82552,10 @@ class Test_TC_DL_1_1Suite : public TestCommand } }; -class Test_TC_DL_2_1Suite : public TestCommand +class Test_TC_DLRK_2_1Suite : public TestCommand { public: - Test_TC_DL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_1", 0, credsIssuerConfig) + Test_TC_DLRK_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82666,7 +82563,7 @@ class Test_TC_DL_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_1Suite() {} + ~Test_TC_DLRK_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82711,10 +82608,10 @@ class Test_TC_DL_2_1Suite : public TestCommand } }; -class Test_TC_DL_2_6Suite : public TestCommand +class Test_TC_DLRK_2_6Suite : public TestCommand { public: - Test_TC_DL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_6", 0, credsIssuerConfig) + Test_TC_DLRK_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82722,7 +82619,7 @@ class Test_TC_DL_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_6Suite() {} + ~Test_TC_DLRK_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82767,10 +82664,10 @@ class Test_TC_DL_2_6Suite : public TestCommand } }; -class Test_TC_DL_2_8Suite : public TestCommand +class Test_TC_DLRK_2_8Suite : public TestCommand { public: - Test_TC_DL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_8", 0, credsIssuerConfig) + Test_TC_DLRK_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82778,7 +82675,7 @@ class Test_TC_DL_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_8Suite() {} + ~Test_TC_DLRK_2_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82823,10 +82720,10 @@ class Test_TC_DL_2_8Suite : public TestCommand } }; -class Test_TC_DL_2_10Suite : public TestCommand +class Test_TC_DLRK_2_10Suite : public TestCommand { public: - Test_TC_DL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_10", 0, credsIssuerConfig) + Test_TC_DLRK_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLRK_2_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82834,7 +82731,7 @@ class Test_TC_DL_2_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_10Suite() {} + ~Test_TC_DLRK_2_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -87326,7 +87223,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87377,6 +87274,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87487,12 +87388,12 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87560,36 +87461,36 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87636,10 +87537,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -87748,11 +87645,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index dff6be7d628059..2e331a9a462a66 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -60,7 +60,7 @@ class TestList : public Command { printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); printf("Test_TC_CC_8_1\n"); - printf("Test_TC_DM_2_1\n"); + printf("Test_TC_BINFO_2_1\n"); printf("Test_TC_DESC_1_1\n"); printf("Test_TC_EMR_1_1\n"); printf("Test_TC_DGETH_2_1\n"); @@ -101,9 +101,6 @@ class TestList : public Command { printf("Test_TC_MC_3_3\n"); printf("Test_TC_MC_3_5\n"); printf("Test_TC_MC_3_6\n"); - printf("Test_TC_MC_3_7\n"); - printf("Test_TC_MC_3_8\n"); - printf("Test_TC_MC_3_9\n"); printf("Test_TC_MC_3_10\n"); printf("Test_TC_MC_3_11\n"); printf("Test_TC_MC_3_12\n"); @@ -111,6 +108,10 @@ class TestList : public Command { printf("Test_TC_MC_5_1\n"); printf("Test_TC_MC_5_2\n"); printf("Test_TC_MC_5_3\n"); + printf("Test_TC_MC_6_1\n"); + printf("Test_TC_MC_6_2\n"); + printf("Test_TC_MC_6_3\n"); + printf("Test_TC_MC_6_4\n"); printf("Test_TC_MC_7_1\n"); printf("Test_TC_MC_7_2\n"); printf("Test_TC_MC_8_1\n"); @@ -213,12 +214,12 @@ class TestList : public Command { printf("DL_UsersAndCredentials\n"); printf("DL_LockUnlock\n"); printf("DL_Schedules\n"); - printf("Test_TC_DL_2_2\n"); - printf("Test_TC_DL_2_3\n"); - printf("Test_TC_DL_2_4\n"); - printf("Test_TC_DL_2_5\n"); - printf("Test_TC_DL_2_7\n"); - printf("Test_TC_DL_2_9\n"); + printf("Test_TC_DLRK_2_2\n"); + printf("Test_TC_DLRK_2_3\n"); + printf("Test_TC_DLRK_2_4\n"); + printf("Test_TC_DLRK_2_5\n"); + printf("Test_TC_DLRK_2_7\n"); + printf("Test_TC_DLRK_2_9\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); @@ -17305,11 +17306,11 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } }; -class Test_TC_DM_2_1 : public TestCommandBridge { +class Test_TC_BINFO_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DM_2_1() - : TestCommandBridge("Test_TC_DM_2_1") + Test_TC_BINFO_2_1() + : TestCommandBridge("Test_TC_BINFO_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -17319,7 +17320,7 @@ class Test_TC_DM_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DM_2_1() {} + ~Test_TC_BINFO_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -17327,11 +17328,11 @@ class Test_TC_DM_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BINFO_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BINFO_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -25651,20 +25652,12 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestUserPromptMessage_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsCurrentLevelAttributeFromDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reset level to 254\n"); + err = TestResetLevelTo254_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); - err = TestResetLevelTo254_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); - err = TestWait100ms_15(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); + err = TestWait100ms_14(); break; } @@ -25722,9 +25715,6 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -25738,7 +25728,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; @@ -25962,31 +25952,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 50U)); - } - - VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestResetLevelTo254_14() + CHIP_ERROR TestResetLevelTo254_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26009,7 +25975,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_15() + CHIP_ERROR TestWait100ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; @@ -29508,18 +29474,10 @@ class Test_TC_MC_3_2 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends CEC Settings Keys(0x0A) to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestThSendsCecSettingsKeys0x0AToDut_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends CEC Home Keys(0x09) to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestThSendsCecHomeKeys0x09ToDut_2(); break; } @@ -29654,74 +29612,38 @@ class Test_TC_MC_3_3 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Send Numbers1\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers1_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Send Numbers2\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers2_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Send Numbers3\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers3_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Send Numbers4\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers4_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Send Numbers5\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers5_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Send Numbers6\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers6_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Send Numbers7\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers7_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Send Numbers8\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers8_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Send Numbers9\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendNumbers9_9(); break; } @@ -30016,8 +29938,14 @@ class Test_TC_MC_3_5 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read CatalogList attribute.\n"); - err = TestReadCatalogListAttribute_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued " + "Vendor Id of type unsigned 16 bit integer ranging between 0-65536 for the catalog\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1(); break; } @@ -30063,24 +29991,14 @@ class Test_TC_MC_3_5 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadCatalogListAttribute_1() + CHIP_ERROR + TestThReadsCatalogListAttributeFromTheDutAndWhereEachEntryInTheListIsACsaIssuedVendorIdOfTypeUnsigned16BitIntegerRangingBetween065536ForTheCatalog_1() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CatalogList attribute. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("catalogList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; @@ -30127,12 +30045,15 @@ class Test_TC_MC_3_6 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read Current App ID attribute.\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, " + "which should include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is " + "no current in-focus application\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadCurrentAppIdAttribute_1(); + err = TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1(); break; } @@ -30178,29 +30099,119 @@ class Test_TC_MC_3_6 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadCurrentAppIdAttribute_1() + CHIP_ERROR + TestThReadsCurrentAppAttributeFromTheDutAndVerifyTheInFocusApplicationAttributesWhichShouldIncludeTheDisplayApplicationIDtypeuint16CatalogVendorIDtypestringOrNullIfThereIsNoCurrentInFocusApplication_1() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_MC_3_10 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_3_10() + : TestCommandBridge("Test_TC_MC_3_10") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_MC_3_10() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletionHandler:^( - CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Current App ID attribute. Error: %@", err); + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentApp", "", "ApplicationEP")); - } - + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); NextTest(); }]; @@ -30208,11 +30219,11 @@ class Test_TC_MC_3_6 : public TestCommandBridge { } }; -class Test_TC_MC_3_7 : public TestCommandBridge { +class Test_TC_MC_3_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_7() - : TestCommandBridge("Test_TC_MC_3_7") + Test_TC_MC_3_11() + : TestCommandBridge("Test_TC_MC_3_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30222,7 +30233,7 @@ class Test_TC_MC_3_7 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_7() {} + ~Test_TC_MC_3_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30230,11 +30241,11 @@ class Test_TC_MC_3_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30251,29 +30262,16 @@ class Test_TC_MC_3_7 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : TH sends a LaunchApp command to DUT to launch an app which is not available\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); + err = TestSelectInputCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Launch an app with the provided a application ID\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestLaunchAnAppWithTheProvidedAApplicationId_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); + err = TestReadCurrentInputList_3(); break; } @@ -30325,129 +30323,72 @@ class Test_TC_MC_3_7 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2() + CHIP_ERROR TestSelectInputCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"NonAvailableApp"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends a LaunchApp command to DUT to launch an app which is not available Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + [cluster selectInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Select Input Command Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_3() + CHIP_ERROR TestReadCurrentInputList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp2"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current input list Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_MC_3_8 : public TestCommandBridge { +class Test_TC_MC_3_12 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_8() - : TestCommandBridge("Test_TC_MC_3_8") + Test_TC_MC_3_12() + : TestCommandBridge("Test_TC_MC_3_12") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30457,7 +30398,7 @@ class Test_TC_MC_3_8 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_8() {} + ~Test_TC_MC_3_12() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30465,11 +30406,11 @@ class Test_TC_MC_3_8 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_12\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_12\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30486,20 +30427,12 @@ class Test_TC_MC_3_8 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Stop an app with the provided application ID\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestStopAnAppWithTheProvidedApplicationId_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Hide Input Status Command\n"); + err = TestHideInputStatusCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheStatusAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); + err = TestShowInputStatusCommand_2(); break; } @@ -30548,61 +30481,34 @@ class Test_TC_MC_3_8 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStopAnAppWithTheProvidedApplicationId_1() + CHIP_ERROR TestHideInputStatusCommand_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterStopAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - - [cluster - stopAppWithParams:params - completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Stop an app with the provided application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Hide Input Status Command Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_2() + CHIP_ERROR TestShowInputStatusCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - NextTest(); }]; @@ -30610,11 +30516,11 @@ class Test_TC_MC_3_8 : public TestCommandBridge { } }; -class Test_TC_MC_3_9 : public TestCommandBridge { +class Test_TC_MC_3_13 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_9() - : TestCommandBridge("Test_TC_MC_3_9") + Test_TC_MC_3_13() + : TestCommandBridge("Test_TC_MC_3_13") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30624,7 +30530,7 @@ class Test_TC_MC_3_9 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_9() {} + ~Test_TC_MC_3_13() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30632,11 +30538,11 @@ class Test_TC_MC_3_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30653,20 +30559,16 @@ class Test_TC_MC_3_9 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends HideApp command to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsHideAppCommandToDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheStatusAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); + err = TestRenameInputCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_3(); break; } @@ -30688,6 +30590,9 @@ class Test_TC_MC_3_9 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30701,7 +30606,7 @@ class Test_TC_MC_3_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -30715,51 +30620,57 @@ class Test_TC_MC_3_9 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsHideAppCommandToDut_1() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterHideAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); - [cluster - hideAppWithParams:params - completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends HideApp command to DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRenameInputCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A1"; + [cluster renameInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_2() + CHIP_ERROR TestReadAttributeMediaInputList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); NextTest(); }]; @@ -30767,11 +30678,11 @@ class Test_TC_MC_3_9 : public TestCommandBridge { } }; -class Test_TC_MC_3_10 : public TestCommandBridge { +class Test_TC_MC_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_10() - : TestCommandBridge("Test_TC_MC_3_10") + Test_TC_MC_5_1() + : TestCommandBridge("Test_TC_MC_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30781,7 +30692,7 @@ class Test_TC_MC_3_10 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_10() {} + ~Test_TC_MC_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30789,11 +30700,11 @@ class Test_TC_MC_3_10 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30810,8 +30721,14 @@ class Test_TC_MC_3_10 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH reads the ChannelList attribute from the DUT and Verify that the response contains a list " + "of the known TV channels\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheChannelListAttributeFromTheDutAndVerifyThatTheResponseContainsAListOfTheKnownTvChannels_1(); break; } @@ -30857,40 +30774,33 @@ class Test_TC_MC_3_10 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestThReadsTheChannelListAttributeFromTheDutAndVerifyThatTheResponseContainsAListOfTheKnownTvChannels_1() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; -class Test_TC_MC_3_11 : public TestCommandBridge { +class Test_TC_MC_5_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_11() - : TestCommandBridge("Test_TC_MC_3_11") + Test_TC_MC_5_2() + : TestCommandBridge("Test_TC_MC_5_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_11() {} + ~Test_TC_MC_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30898,11 +30808,11 @@ class Test_TC_MC_3_11 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30919,24 +30829,24 @@ class Test_TC_MC_3_11 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute\n"); + err = TestReadsTheChannelListAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSelectInputCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); + err = TestThSendsAChangeChannelByNumberCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Verify that the channel has changed on the device\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadCurrentInputList_3(); + err = TestVerifyThatTheChannelHasChangedOnTheDevice_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentChannel attribute\n"); + err = TestReadsTheCurrentChannelAttribute_4(); break; } @@ -30961,6 +30871,9 @@ class Test_TC_MC_3_11 : public TestCommandBridge { case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30974,11 +30887,13 @@ class Test_TC_MC_3_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -30988,58 +30903,72 @@ class Test_TC_MC_3_11 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestReadsTheChannelListAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSelectInputCommand_2() + CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - [cluster selectInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + __auto_type * params = [[CHIPChannelClusterChangeChannelByNumberParams alloc] init]; + params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] + : [NSNumber numberWithUnsignedShort:9U]; + params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + [cluster changeChannelByNumberWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentInputList_3() + CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentChannelAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current input list Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1U)); + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); } NextTest(); @@ -31049,21 +30978,23 @@ class Test_TC_MC_3_11 : public TestCommandBridge { } }; -class Test_TC_MC_3_12 : public TestCommandBridge { +class Test_TC_MC_5_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_12() - : TestCommandBridge("Test_TC_MC_3_12") + Test_TC_MC_5_3() + : TestCommandBridge("Test_TC_MC_5_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_12() {} + ~Test_TC_MC_5_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31071,11 +31002,11 @@ class Test_TC_MC_3_12 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_12\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_12\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31092,20 +31023,28 @@ class Test_TC_MC_3_12 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Hide Input Status Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestHideInputStatusCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); + err = TestReadsTheChannelListAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentChannel attribute from the DUT\n"); + err = TestReadsTheCurrentChannelAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a SkipChannel command to the DUT\n"); + err = TestSendsASkipChannelCommandToTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the channel has changed on the device\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestShowInputStatusCommand_2(); + err = TestVerifyThatTheChannelHasChangedOnTheDevice_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentChannel attribute from the DUT\n"); + err = TestReadsTheCurrentChannelAttributeFromTheDut_5(); break; } @@ -31127,6 +31066,15 @@ class Test_TC_MC_3_12 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31140,11 +31088,13 @@ class Test_TC_MC_3_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -31154,34 +31104,98 @@ class Test_TC_MC_3_12 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestHideInputStatusCommand_1() + CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Hide Input Status Command Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestShowInputStatusCommand_2() + CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Show Input Status Command Error: %@", err); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsASkipChannelCommandToTheDut_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPChannelClusterSkipChannelParams alloc] init]; + params.count = [NSNumber numberWithUnsignedShort:1U]; + [cluster skipChannelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheChannelHasChangedOnTheDevice_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if channel has changed on the devicegarbage: not in length on purpose", 53); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); + } + NextTest(); }]; @@ -31189,11 +31203,11 @@ class Test_TC_MC_3_12 : public TestCommandBridge { } }; -class Test_TC_MC_3_13 : public TestCommandBridge { +class Test_TC_MC_6_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_13() - : TestCommandBridge("Test_TC_MC_3_13") + Test_TC_MC_6_1() + : TestCommandBridge("Test_TC_MC_6_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31203,7 +31217,7 @@ class Test_TC_MC_3_13 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_13() {} + ~Test_TC_MC_6_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31211,11 +31225,11 @@ class Test_TC_MC_3_13 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31232,28 +31246,61 @@ class Test_TC_MC_3_13 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command\n"); + err = TestSendsAPlayCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestRenameInputCommand_2(); + err = TestVerifyThatTheMediaStateIsPlaying_4(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Rename Input Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the playback state attribute\n"); + err = TestReadsThePlaybackStateAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : sends a Pause command\n"); + err = TestSendsAPauseCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is paused\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestRenameInputCommand_3(); + err = TestVerifyThatTheMediaIsPaused_7(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_4(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the playback state attribute\n"); + err = TestReadsThePlaybackStateAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Stop command\n"); + err = TestSendsAStopCommand_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Verify that the media is stoped\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaIsStoped_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the playback state attribute\n"); + err = TestReadsThePlaybackStateAttribute_11(); break; } @@ -31281,6 +31328,27 @@ class Test_TC_MC_3_13 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31294,7 +31362,7 @@ class Test_TC_MC_3_13 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -31308,90 +31376,219 @@ class Test_TC_MC_3_13 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster pauseWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRenameInputCommand_2() + CHIP_ERROR TestReadsTheCurrentStateAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"A1"; - [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRenameInputCommand_3() + CHIP_ERROR TestSendsAPlayCommand_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"A2"; - [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + [cluster playWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeMediaInputList_4() + CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsThePlaybackStateAttribute_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the playback state attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAPauseCommand_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster pauseWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"sends a Pause command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheMediaIsPaused_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is pausedgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsThePlaybackStateAttribute_8() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the playback state attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAStopCommand_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster stopPlaybackWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Stop command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheMediaIsStoped_10() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is stopedgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsThePlaybackStateAttribute_11() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the playback state attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_MC_5_1 : public TestCommandBridge { +class Test_TC_MC_6_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_1() - : TestCommandBridge("Test_TC_MC_5_1") + Test_TC_MC_6_2() + : TestCommandBridge("Test_TC_MC_6_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31401,7 +31598,7 @@ class Test_TC_MC_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_1() {} + ~Test_TC_MC_6_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31409,11 +31606,11 @@ class Test_TC_MC_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31430,8 +31627,97 @@ class Test_TC_MC_5_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); + err = TestReadsTheCurrentStateAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a Play command to the DUT\n"); + err = TestSendsAPlayCommandToTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Verify that the media state is playing\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaStateIsPlaying_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a StartOver command to the DUT\n"); + err = TestSendsAStartOverCommandToTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Verify that the media is started over\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaIsStartedOver_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Next command to the DUT\n"); + err = TestSendsANextCommandToTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Verify that the next media item in the queue has been loaded\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Sends a Previous command to the DUT\n"); + err = TestSendsAPreviousCommandToTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Verify that the previous media item in the queue has been loaded\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a SkipForward command to the DUT \n"); + err = TestSendsASkipForwardCommandToTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Verify that the media has skipped forward 10 seconds\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaHasSkippedForward10Seconds_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the SampledPosition attribute from the DUT\n"); + err = TestReadsTheSampledPositionAttributeFromTheDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Sends a SkipBackward command to the DUT \n"); + err = TestSendsASkipBackwardCommandToTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Verify that the media has skipped backward 10 seconds\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestVerifyThatTheMediaHasSkippedBackward10Seconds_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the SampledPosition attribute from the DUT\n"); + err = TestReadsTheSampledPositionAttributeFromTheDut_17(); break; } @@ -31450,6 +31736,54 @@ class Test_TC_MC_5_1 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31463,7 +31797,7 @@ class Test_TC_MC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -31477,18 +31811,315 @@ class Test_TC_MC_5_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); + [cluster pauseWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAPlayCommandToTheDut_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster playWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheMediaStateIsPlaying_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media state is playinggarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentStateAttribute_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAStartOverCommandToTheDut_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster startOverWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a StartOver command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheMediaIsStartedOver_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' if media is started overgarbage: not in length on purpose", 41); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsANextCommandToTheDut_8() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster nextWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Next command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheNextMediaItemInTheQueueHasBeenLoaded_9() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media item in the queue has been loadedgarbage: not in length on purpose", 59); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsAPreviousCommandToTheDut_10() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster previousWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Previous command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatThePreviousMediaItemInTheQueueHasBeenLoaded_11() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if previous media item in the queue has been loadedgarbage: not in length on purpose", 68); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsASkipForwardCommandToTheDut_12() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaPlaybackClusterSkipForwardParams alloc] init]; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; + [cluster + skipForwardWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a SkipForward command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheMediaHasSkippedForward10Seconds_13() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has skipped forward 10 secondsgarbage: not in length on purpose", 56); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_14() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSampledPositionWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsASkipBackwardCommandToTheDut_15() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaPlaybackClusterSkipBackwardParams alloc] init]; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; + [cluster + skipBackwardWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a SkipBackward command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyThatTheMediaHasSkippedBackward10Seconds_16() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Please enter 'y' if media has skipped backward 10 secondsgarbage: not in length on purpose", 57); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheSampledPositionAttributeFromTheDut_17() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSampledPositionWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); + } + NextTest(); }]; @@ -31496,23 +32127,22 @@ class Test_TC_MC_5_1 : public TestCommandBridge { } }; -class Test_TC_MC_5_2 : public TestCommandBridge { +class Test_TC_MC_6_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_2() - : TestCommandBridge("Test_TC_MC_5_2") + Test_TC_MC_6_3() + : TestCommandBridge("Test_TC_MC_6_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); + AddArgument("SeekPosition", 0, UINT64_MAX, &mSeekPosition); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_2() {} + ~Test_TC_MC_6_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31520,11 +32150,11 @@ class Test_TC_MC_5_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31541,28 +32171,63 @@ class Test_TC_MC_5_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute\n"); - err = TestReadsTheChannelListAttribute_1(); + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a Seek command\n"); + err = TestSendsASeekCommand_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Verify that the media has moved to 10 seconds from the starting point\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThSendsAChangeChannelByNumberCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); - err = TestLogACommand_3(); + err = TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentChannel attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the SampledPosition attribute\n"); + err = TestReadsTheSampledPositionAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the StartTime attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadsTheCurrentChannelAttribute_4(); + err = TestThReadsTheStartTimeAttributeFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the SeekRangeEnd attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSeekRangeEndAttributeFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the SeekRangeStart attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSeekRangeStartAttributeFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the Duration attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheDurationAttributeFromTheDut_8(); + break; + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : Sends a Seek command Position value beyond the furthest valid position\n"); + err = TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9(); break; } @@ -31590,6 +32255,21 @@ class Test_TC_MC_5_2 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31603,13 +32283,12 @@ class Test_TC_MC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; + chip::Optional mSeekPosition; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -31619,70 +32298,79 @@ class Test_TC_MC_5_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttribute_1() + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute Error: %@", err); + [cluster pauseWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() + CHIP_ERROR TestSendsASeekCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPChannelClusterChangeChannelByNumberParams alloc] init]; - params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] - : [NSNumber numberWithUnsignedShort:1U]; - params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] - : [NSNumber numberWithUnsignedShort:2U]; - [cluster changeChannelByNumberWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); + __auto_type * params = [[CHIPMediaPlaybackClusterSeekParams alloc] init]; + params.position = [NSNumber numberWithUnsignedLongLong:10000ULL]; + [cluster seekWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Seek command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLogACommand_3() + CHIP_ERROR TestVerifyThatTheMediaHasMovedTo10SecondsFromTheStartingPoint_3() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + value.message = chip::Span( + "Please enter 'y' if media has moved to 10 seconds from the starting pointgarbage: not in length on purpose", 73); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheCurrentChannelAttribute_4() + CHIP_ERROR TestReadsTheSampledPositionAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute Error: %@", err); + [cluster readAttributeSampledPositionWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the SampledPosition attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + VerifyOrReturn(CheckValueNonNull("SampledPosition", actualValue)); } NextTest(); @@ -31690,25 +32378,85 @@ class Test_TC_MC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThReadsTheStartTimeAttributeFromTheDut_5() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheSeekRangeEndAttributeFromTheDut_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheSeekRangeStartAttributeFromTheDut_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsTheDurationAttributeFromTheDut_8() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsASeekCommandPositionValueBeyondTheFurthestValidPosition_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaPlaybackClusterSeekParams alloc] init]; + params.position = mSeekPosition.HasValue() ? [NSNumber numberWithUnsignedLongLong:mSeekPosition.Value()] + : [NSNumber numberWithUnsignedLongLong:100000000ULL]; + [cluster seekWithParams:params + completionHandler:^(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Seek command Position value beyond the furthest valid position Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; -class Test_TC_MC_5_3 : public TestCommandBridge { +class Test_TC_MC_6_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_3() - : TestCommandBridge("Test_TC_MC_5_3") + Test_TC_MC_6_4() + : TestCommandBridge("Test_TC_MC_6_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_3() {} + ~Test_TC_MC_6_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31716,11 +32464,11 @@ class Test_TC_MC_5_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_6_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_6_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31737,132 +32485,398 @@ class Test_TC_MC_5_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); + ChipLogProgress( + chipTool, " ***** Test Step 1 : Precondition: Media content in a paused state at the beginning of the content\n"); + err = TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentState attribute from the DUT\n"); + err = TestReadsTheCurrentStateAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the PlaybackSpeed attribute from the DUT\n"); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Sends a FastForward command\n"); + err = TestSendsAFastForwardCommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the PlaybackSpeed attribute from the DUT\n"); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends a FastForward command\n"); + err = TestSendsAFastForwardCommand_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the PlaybackSpeed attribute from the DUT\n"); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends a Rewind command to the DUT\n"); + err = TestSendsARewindCommandToTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the CurrentState attribute\n"); + err = TestReadsTheCurrentStateAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadsTheCurrentChannelAttributeFromTheDut_2(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_11(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a SkipChannel command to the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Sends a Rewind command to the DUT\n"); + err = TestSendsARewindCommandToTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the PlaybackSpeed attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestSendsASkipChannelCommandToTheDut_3(); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_13(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); - err = TestLogACommand_4(); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Sends a Play command\n"); + err = TestSendsAPlayCommand_14(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the PlaybackSpeed attribute from the DUT\n"); + err = TestReadsThePlaybackSpeedAttributeFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Sends consecutive FastForward commands\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestSendsConsecutiveFastForwardCommands_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Sends consecutive Rewind commands\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadsTheCurrentChannelAttributeFromTheDut_5(); - break; - } + err = TestSendsConsecutiveRewindCommands_17(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 18; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestPreconditionMediaContentInAPausedStateAtTheBeginningOfTheContent_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster pauseWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentStateAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 0.0f)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsAFastForwardCommand_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster fastForwardWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a FastForward command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentStateAttribute_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); + } - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } + NextTest(); + }]; + + return CHIP_NO_ERROR; } - void OnStatusUpdate(const chip::app::StatusIB & status) override + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_6() { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 1.0f)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestSendsAFastForwardCommand_7() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + [cluster fastForwardWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a FastForward command Error: %@", err); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; - chip::Optional mTimeout; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 2.0f)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIPChannelClusterChannelInfo * _Nullable currentChannelvalue; - CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_2() + CHIP_ERROR TestSendsARewindCommandToTheDut_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster rewindWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentStateAttribute_10() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentState attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { - currentChannelvalue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); } NextTest(); @@ -31871,49 +32885,86 @@ class Test_TC_MC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASkipChannelCommandToTheDut_3() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_11() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsARewindCommandToTheDut_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPChannelClusterSkipChannelParams alloc] init]; - params.count = [NSNumber numberWithUnsignedShort:1U]; - [cluster skipChannelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + [cluster rewindWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Rewind command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLogACommand_4() + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_13() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message - = chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); + = chip::Span("Please enter 'y' if PlaybackSpeed value is -2garbage: not in length on purpose", 45); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } - CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_5() + CHIP_ERROR TestSendsAPlayCommand_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster playWithCompletionHandler:^( + CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_15() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PlaybackSpeed", actualValue, 1.0f)); } NextTest(); @@ -31921,6 +32972,24 @@ class Test_TC_MC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestSendsConsecutiveFastForwardCommands_16() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestSendsConsecutiveRewindCommands_17() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; class Test_TC_MC_7_1 : public TestCommandBridge { @@ -31971,18 +33040,10 @@ class Test_TC_MC_7_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendsASelectAudioOutputCommand_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadsTheCurrentOutputAttribute_3(); break; } @@ -32144,10 +33205,6 @@ class Test_TC_MC_7_2 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a RenameOutput command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendsARenameOutputCommand_2(); break; case 3: @@ -32318,18 +33375,10 @@ class Test_TC_MC_8_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendsANavigateTargetCommand_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadsTheCurrentTargetAttribute_4(); break; case 5: @@ -32338,18 +33387,10 @@ class Test_TC_MC_8_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a NavigateTarget command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestSendsANavigateTargetCommand_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadsTheCurrentTargetAttribute_7(); break; } @@ -32387,310 +33428,293 @@ class Test_TC_MC_8_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTargetvalue1; - chip::Optional mTargetvalue2; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSArray * _Nonnull TargetListValues; - - CHIP_ERROR TestReadsTheTargetListAttribute_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); - { - TargetListValues = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsANavigateTargetCommand_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] - : [NSNumber numberWithUnsignedChar:1U]; - [cluster navigateTargetWithParams:params - completionHandler:^( - CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheTargetListAttribute_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsANavigateTargetCommand_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue2.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue2.Value()] - : [NSNumber numberWithUnsignedChar:2U]; - [cluster navigateTargetWithParams:params - completionHandler:^( - CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheCurrentTargetAttribute_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MC_9_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_9_1() - : TestCommandBridge("Test_TC_MC_9_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MC_9_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); - err = TestPrecondition_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); - err = TestReadsTheVendorNameAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); - err = TestReadsTheVendorIDAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); - err = TestReadsTheApplicationNameAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); - err = TestReadsTheProductIDAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Application attribute\n"); - err = TestReadsTheApplicationAttribute_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the Status attribute\n"); - err = TestReadsTheStatusAttribute_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the ApplicationVersion attribute\n"); - err = TestReadsTheApplicationVersionAttribute_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the AllowedVendorList attribute\n"); - err = TestReadsTheAllowedVendorListAttribute_9(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTargetvalue1; + chip::Optional mTargetvalue2; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSArray * _Nonnull TargetListValues; + + CHIP_ERROR TestReadsTheTargetListAttribute_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + { + TargetListValues = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsANavigateTargetCommand_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster navigateTargetWithParams:params + completionHandler:^( + CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheTargetListAttribute_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsANavigateTargetCommand_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue2.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue2.Value()] + : [NSNumber numberWithUnsignedChar:2U]; + [cluster navigateTargetWithParams:params + completionHandler:^( + CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheCurrentTargetAttribute_7() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_9_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_9_1() + : TestCommandBridge("Test_TC_MC_9_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_MC_9_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the VendorName attribute\n"); + err = TestReadsTheVendorNameAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorID attribute\n"); + err = TestReadsTheVendorIDAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the ApplicationName attribute\n"); + err = TestReadsTheApplicationNameAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ProductID attribute\n"); + err = TestReadsTheProductIDAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the Application attribute\n"); + err = TestReadsTheApplicationAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Status attribute\n"); + err = TestReadsTheStatusAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the ApplicationVersion attribute\n"); + err = TestReadsTheApplicationVersionAttribute_7(); + break; case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the AllowedVendorList attribute\n"); + err = TestReadsTheAllowedVendorListAttribute_8(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -32706,7 +33730,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -32720,14 +33744,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPrecondition_1() - { - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); - return Log("alpha", value); - } - - CHIP_ERROR TestReadsTheVendorNameAttribute_2() + CHIP_ERROR TestReadsTheVendorNameAttribute_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32748,7 +33765,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheVendorIDAttribute_3() + CHIP_ERROR TestReadsTheVendorIDAttribute_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32768,7 +33785,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationNameAttribute_4() + CHIP_ERROR TestReadsTheApplicationNameAttribute_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32789,7 +33806,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheProductIDAttribute_5() + CHIP_ERROR TestReadsTheProductIDAttribute_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32809,7 +33826,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationAttribute_6() + CHIP_ERROR TestReadsTheApplicationAttribute_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32830,7 +33847,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_7() + CHIP_ERROR TestReadsTheStatusAttribute_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32852,7 +33869,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationVersionAttribute_8() + CHIP_ERROR TestReadsTheApplicationVersionAttribute_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -32873,7 +33890,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheAllowedVendorListAttribute_9() + CHIP_ERROR TestReadsTheAllowedVendorListAttribute_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device @@ -40926,38 +41943,74 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute constraints: MeasuredValue\n"); + if (ShouldSkip("PRS.S.A0000")) { + NextTest(); + return; + } err = TestReadTheMandatoryAttributeConstraintsMeasuredValue_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute constraints: MinMeasuredValue\n"); + if (ShouldSkip("PRS.S.A0001")) { + NextTest(); + return; + } err = TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute constraints: MaxMeasuredValue\n"); + if (ShouldSkip("PRS.S.A0002")) { + NextTest(); + return; + } err = TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute: Tolerance\n"); + if (ShouldSkip("PRS.S.A0003")) { + NextTest(); + return; + } err = TestReadTheOptionalAttributeTolerance_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute: ScaledValue\n"); + if (ShouldSkip("PRS.S.A0010")) { + NextTest(); + return; + } err = TestReadTheOptionalAttributeScaledValue_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute: MinScaledValue\n"); + if (ShouldSkip("PRS.S.A0011")) { + NextTest(); + return; + } err = TestReadTheOptionalAttributeMinScaledValue_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute: MaxScaledValue\n"); + if (ShouldSkip("PRS.S.A0012")) { + NextTest(); + return; + } err = TestReadTheOptionalAttributeMaxScaledValue_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute: ScaledTolerance\n"); + if (ShouldSkip("PRS.S.A0013")) { + NextTest(); + return; + } err = TestReadTheOptionalAttributeScaledTolerance_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute: Scale\n"); + if (ShouldSkip("PRS.S.A0014")) { + NextTest(); + return; + } err = TestReadTheOptionalAttributeScale_9(); break; } @@ -41117,11 +42170,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Tolerance Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("tolerance", "", "int16")); @@ -41145,11 +42193,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { [cluster readAttributeScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ScaledValue Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { @@ -41176,11 +42219,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { [cluster readAttributeMinScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinScaledValue Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { @@ -41207,11 +42245,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { [cluster readAttributeMaxScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxScaledValue Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { @@ -41238,11 +42271,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { [cluster readAttributeScaledToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ScaledTolerance Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("scaledTolerance", "", "int16")); @@ -41266,11 +42294,6 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { [cluster readAttributeScaleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Scale Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("scale", "", "int8")); @@ -55092,7 +56115,7 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads Type attribute from DUT\n"); - if (ShouldSkip("A_TYPE")) { + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } @@ -55144,23 +56167,11 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTypeAttributeFromDut_1() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads Type attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("type", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } }; @@ -55207,12 +56218,12 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads EndProductType attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads EndProductType attribute from DUT\n"); if (ShouldSkip("A_ENDPRODUCTTYPE")) { NextTest(); return; } - err = TestReadsEndProductTypeAttributeFromDut_1(); + err = TestThReadsEndProductTypeAttributeFromDut_1(); break; } @@ -55258,22 +56269,17 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsEndProductTypeAttributeFromDut_1() + CHIP_ERROR TestThReadsEndProductTypeAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEndProductTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads EndProductType attribute from DUT Error: %@", err); + NSLog(@"TH reads EndProductType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EndProductType", actualValue, 0U)); - } - VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); @@ -101447,11 +102453,11 @@ class DL_Schedules : public TestCommandBridge { } }; -class Test_TC_DL_2_2 : public TestCommandBridge { +class Test_TC_DLRK_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DL_2_2() - : TestCommandBridge("Test_TC_DL_2_2") + Test_TC_DLRK_2_2() + : TestCommandBridge("Test_TC_DLRK_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -101461,7 +102467,7 @@ class Test_TC_DL_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DL_2_2() {} + ~Test_TC_DLRK_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -101469,11 +102475,11 @@ class Test_TC_DL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLRK_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLRK_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -101972,11 +102978,11 @@ class Test_TC_DL_2_2 : public TestCommandBridge { } }; -class Test_TC_DL_2_3 : public TestCommandBridge { +class Test_TC_DLRK_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DL_2_3() - : TestCommandBridge("Test_TC_DL_2_3") + Test_TC_DLRK_2_3() + : TestCommandBridge("Test_TC_DLRK_2_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -101986,7 +102992,7 @@ class Test_TC_DL_2_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DL_2_3() {} + ~Test_TC_DLRK_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -101994,11 +103000,11 @@ class Test_TC_DL_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLRK_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLRK_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -102293,11 +103299,11 @@ class Test_TC_DL_2_3 : public TestCommandBridge { } }; -class Test_TC_DL_2_4 : public TestCommandBridge { +class Test_TC_DLRK_2_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DL_2_4() - : TestCommandBridge("Test_TC_DL_2_4") + Test_TC_DLRK_2_4() + : TestCommandBridge("Test_TC_DLRK_2_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -102307,7 +103313,7 @@ class Test_TC_DL_2_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DL_2_4() {} + ~Test_TC_DLRK_2_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -102315,11 +103321,11 @@ class Test_TC_DL_2_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DL_2_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLRK_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DL_2_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLRK_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -102585,11 +103591,11 @@ class Test_TC_DL_2_4 : public TestCommandBridge { } }; -class Test_TC_DL_2_5 : public TestCommandBridge { +class Test_TC_DLRK_2_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DL_2_5() - : TestCommandBridge("Test_TC_DL_2_5") + Test_TC_DLRK_2_5() + : TestCommandBridge("Test_TC_DLRK_2_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -102599,7 +103605,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DL_2_5() {} + ~Test_TC_DLRK_2_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -102607,11 +103613,11 @@ class Test_TC_DL_2_5 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DL_2_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLRK_2_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DL_2_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLRK_2_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -103099,11 +104105,11 @@ class Test_TC_DL_2_5 : public TestCommandBridge { } }; -class Test_TC_DL_2_7 : public TestCommandBridge { +class Test_TC_DLRK_2_7 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DL_2_7() - : TestCommandBridge("Test_TC_DL_2_7") + Test_TC_DLRK_2_7() + : TestCommandBridge("Test_TC_DLRK_2_7") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -103113,7 +104119,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DL_2_7() {} + ~Test_TC_DLRK_2_7() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -103121,11 +104127,11 @@ class Test_TC_DL_2_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DL_2_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLRK_2_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DL_2_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLRK_2_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -103714,11 +104720,11 @@ class Test_TC_DL_2_7 : public TestCommandBridge { } }; -class Test_TC_DL_2_9 : public TestCommandBridge { +class Test_TC_DLRK_2_9 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DL_2_9() - : TestCommandBridge("Test_TC_DL_2_9") + Test_TC_DLRK_2_9() + : TestCommandBridge("Test_TC_DLRK_2_9") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -103728,7 +104734,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DL_2_9() {} + ~Test_TC_DLRK_2_9() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -103736,11 +104742,11 @@ class Test_TC_DL_2_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DL_2_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLRK_2_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DL_2_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLRK_2_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -106013,7 +107019,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -106054,9 +107060,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -106064,6 +107067,10 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -106166,12 +107173,12 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), - make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), #endif // CONFIG_ENABLE_YAML_TESTS diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index ac30cebcbe163f..57a0e749365f1a 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -23,10 +23,10 @@ #include -class Test_TC_DM_1_3_SimulatedSuite : public TestCommand +class Test_TC_BINFO_2_3_SimulatedSuite : public TestCommand { public: - Test_TC_DM_1_3_SimulatedSuite() : TestCommand("Test_TC_DM_1_3_Simulated", 21) + Test_TC_BINFO_2_3_SimulatedSuite() : TestCommand("Test_TC_BINFO_2_3_Simulated", 21) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34,241 +34,7 @@ class Test_TC_DM_1_3_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_1_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Log OnOff Test Startup"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = chip::Span("*** Basic Cluster Tests Readygarbage: not in length on purpose", 29); - return Log(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Query Data Model Revision"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::DataModelRevision::Id); - } - case 3: { - LogStep(3, "Query Vendor Name"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::VendorName::Id); - } - case 4: { - LogStep(4, "Query VendorID"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::VendorID::Id); - } - case 5: { - LogStep(5, "Query Product Name"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductName::Id); - } - case 6: { - LogStep(6, "Query ProductID"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductID::Id); - } - case 7: { - LogStep(7, "Query Node Label"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id); - } - case 8: { - LogStep(8, "Query User Location"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id); - } - case 9: { - LogStep(9, "Query HardwareVersion"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id); - } - case 10: { - LogStep(10, "Query HardwareVersionString"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id); - } - case 11: { - LogStep(11, "Query SoftwareVersion"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id); - } - case 12: { - LogStep(12, "Query SoftwareVersionString"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id); - } - case 13: { - LogStep(13, "Query ManufacturingDate"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id); - } - case 14: { - LogStep(14, "Query PartNumber"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id); - } - case 15: { - LogStep(15, "Query ProductURL"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id); - } - case 16: { - LogStep(16, "Query ProductLabel"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id); - } - case 17: { - LogStep(17, "Query SerialNumber"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id); - } - case 18: { - LogStep(18, "Query LocalConfigDisabled"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id); - } - case 19: { - LogStep(19, "Query Reachable"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id); - } - case 20: { - LogStep(20, "Query UniqueID"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_3_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DM_3_3_SimulatedSuite() : TestCommand("Test_TC_DM_3_3_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_3_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Wait for Scan Network Command"); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Commands::ScanNetworks::Id); - } - case 2: { - LogStep(2, "Wait for Add Wifi Network Command"); - VerifyOrDo(!ShouldSkip("WIFI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id); - } - case 3: { - LogStep(3, "Wait for Update Thread Network Command"); - VerifyOrDo(!ShouldSkip("THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id); - } - case 4: { - LogStep(4, "Wait for Enable Network Command"); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Commands::ConnectNetwork::Id); - } - case 5: { - LogStep(5, "Wait for Remove Network Command"); - VerifyOrDo(!ShouldSkip("WIFI | THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Commands::RemoveNetwork::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_2_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DM_2_3_SimulatedSuite() : TestCommand("Test_TC_DM_2_3_Simulated", 21) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_2_3_SimulatedSuite() {} + ~Test_TC_BINFO_2_3_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -407,17 +173,9 @@ class Test_TC_DM_2_3_SimulatedSuite : public TestCommand std::unique_ptr GetTestCommand(std::string testName) { - if (testName == "Test_TC_DM_1_3_Simulated") - { - return std::unique_ptr(new Test_TC_DM_1_3_SimulatedSuite()); - } - if (testName == "Test_TC_DM_3_3_Simulated") - { - return std::unique_ptr(new Test_TC_DM_3_3_SimulatedSuite()); - } - if (testName == "Test_TC_DM_2_3_Simulated") + if (testName == "Test_TC_BINFO_2_3_Simulated") { - return std::unique_ptr(new Test_TC_DM_2_3_SimulatedSuite()); + return std::unique_ptr(new Test_TC_BINFO_2_3_SimulatedSuite()); } return nullptr; @@ -426,7 +184,5 @@ std::unique_ptr GetTestCommand(std::string testName) void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); - ChipLogError(chipTool, "\t* Test_TC_DM_1_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DM_3_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DM_2_3_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_BINFO_2_3_Simulated"); } diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index ac30cebcbe163f..57a0e749365f1a 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -23,10 +23,10 @@ #include -class Test_TC_DM_1_3_SimulatedSuite : public TestCommand +class Test_TC_BINFO_2_3_SimulatedSuite : public TestCommand { public: - Test_TC_DM_1_3_SimulatedSuite() : TestCommand("Test_TC_DM_1_3_Simulated", 21) + Test_TC_BINFO_2_3_SimulatedSuite() : TestCommand("Test_TC_BINFO_2_3_Simulated", 21) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34,241 +34,7 @@ class Test_TC_DM_1_3_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_1_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Log OnOff Test Startup"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = chip::Span("*** Basic Cluster Tests Readygarbage: not in length on purpose", 29); - return Log(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "Query Data Model Revision"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::DataModelRevision::Id); - } - case 3: { - LogStep(3, "Query Vendor Name"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::VendorName::Id); - } - case 4: { - LogStep(4, "Query VendorID"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::VendorID::Id); - } - case 5: { - LogStep(5, "Query Product Name"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductName::Id); - } - case 6: { - LogStep(6, "Query ProductID"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductID::Id); - } - case 7: { - LogStep(7, "Query Node Label"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id); - } - case 8: { - LogStep(8, "Query User Location"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::Location::Id); - } - case 9: { - LogStep(9, "Query HardwareVersion"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersion::Id); - } - case 10: { - LogStep(10, "Query HardwareVersionString"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::HardwareVersionString::Id); - } - case 11: { - LogStep(11, "Query SoftwareVersion"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersion::Id); - } - case 12: { - LogStep(12, "Query SoftwareVersionString"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::SoftwareVersionString::Id); - } - case 13: { - LogStep(13, "Query ManufacturingDate"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ManufacturingDate::Id); - } - case 14: { - LogStep(14, "Query PartNumber"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::PartNumber::Id); - } - case 15: { - LogStep(15, "Query ProductURL"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductURL::Id); - } - case 16: { - LogStep(16, "Query ProductLabel"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::ProductLabel::Id); - } - case 17: { - LogStep(17, "Query SerialNumber"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::SerialNumber::Id); - } - case 18: { - LogStep(18, "Query LocalConfigDisabled"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::LocalConfigDisabled::Id); - } - case 19: { - LogStep(19, "Query Reachable"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::Reachable::Id); - } - case 20: { - LogStep(20, "Query UniqueID"); - return WaitAttribute(GetEndpoint(0), Basic::Id, Basic::Attributes::UniqueID::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_3_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DM_3_3_SimulatedSuite() : TestCommand("Test_TC_DM_3_3_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_3_3_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Wait for Scan Network Command"); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Commands::ScanNetworks::Id); - } - case 2: { - LogStep(2, "Wait for Add Wifi Network Command"); - VerifyOrDo(!ShouldSkip("WIFI"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id); - } - case 3: { - LogStep(3, "Wait for Update Thread Network Command"); - VerifyOrDo(!ShouldSkip("THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id); - } - case 4: { - LogStep(4, "Wait for Enable Network Command"); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Commands::ConnectNetwork::Id); - } - case 5: { - LogStep(5, "Wait for Remove Network Command"); - VerifyOrDo(!ShouldSkip("WIFI | THREAD"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), NetworkCommissioning::Id, NetworkCommissioning::Commands::RemoveNetwork::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_2_3_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DM_2_3_SimulatedSuite() : TestCommand("Test_TC_DM_2_3_Simulated", 21) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_2_3_SimulatedSuite() {} + ~Test_TC_BINFO_2_3_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -407,17 +173,9 @@ class Test_TC_DM_2_3_SimulatedSuite : public TestCommand std::unique_ptr GetTestCommand(std::string testName) { - if (testName == "Test_TC_DM_1_3_Simulated") - { - return std::unique_ptr(new Test_TC_DM_1_3_SimulatedSuite()); - } - if (testName == "Test_TC_DM_3_3_Simulated") - { - return std::unique_ptr(new Test_TC_DM_3_3_SimulatedSuite()); - } - if (testName == "Test_TC_DM_2_3_Simulated") + if (testName == "Test_TC_BINFO_2_3_Simulated") { - return std::unique_ptr(new Test_TC_DM_2_3_SimulatedSuite()); + return std::unique_ptr(new Test_TC_BINFO_2_3_SimulatedSuite()); } return nullptr; @@ -426,7 +184,5 @@ std::unique_ptr GetTestCommand(std::string testName) void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); - ChipLogError(chipTool, "\t* Test_TC_DM_1_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DM_3_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DM_2_3_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_BINFO_2_3_Simulated"); }