From 30c2f5802358c6ab3a0b7099a3c89f319da933d4 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Thu, 9 Jun 2022 03:17:39 +0530 Subject: [PATCH] MF Test Added May 17 (#18521) * Added MF tests TC-MF-1.9 TC-MF-1.10 modified tests TC-MF-1.5 TC-MF-1.6 TC-MF-1.15 * Added auto generated files * Modified scripts * Added auto generated files * Added auto generated files * Removed MF-1,10 from Darwin test * Auto generated files * Increased timeout for tests.yaml file * Modified darwin workflow timeout --- .github/workflows/darwin-tests.yaml | 4 +- .github/workflows/tests.yaml | 8 +- .../templates/tests/tests.js | 6 + .../suites/certification/Test_TC_MF_1_10.yaml | 426 +++- .../suites/certification/Test_TC_MF_1_15.yaml | 52 +- .../suites/certification/Test_TC_MF_1_5.yaml | 26 +- .../suites/certification/Test_TC_MF_1_6.yaml | 26 +- .../suites/certification/Test_TC_MF_1_9.yaml | 397 +++- src/app/tests/suites/tests.js | 4 +- .../chip-tool/zap-generated/test/Commands.h | 1875 +++++++++++------ .../zap-generated/test/Commands.h | 358 +--- 11 files changed, 2033 insertions(+), 1149 deletions(-) diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index c6603eaac00f4e..0f0f57b57104a5 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -29,7 +29,7 @@ concurrency: jobs: test_suites_chip_tool_darwin: name: Test Suites - Darwin - timeout-minutes: 120 + timeout-minutes: 135 strategy: matrix: @@ -96,7 +96,7 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 45 + timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 771c4949340f04..171f583f7b0bbf 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,7 +28,7 @@ concurrency: jobs: test_suites_linux: name: Test Suites - Linux - timeout-minutes: 120 + timeout-minutes: 140 strategy: matrix: @@ -90,7 +90,7 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 40 + timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ @@ -121,7 +121,7 @@ jobs: retention-days: 5 test_suites_darwin: name: Test Suites - Darwin - timeout-minutes: 120 + timeout-minutes: 130 strategy: matrix: @@ -190,7 +190,7 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 50 + timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ diff --git a/examples/darwin-framework-tool/templates/tests/tests.js b/examples/darwin-framework-tool/templates/tests/tests.js index 7e2defdcc22f02..1789f09fb322fa 100644 --- a/examples/darwin-framework-tool/templates/tests/tests.js +++ b/examples/darwin-framework-tool/templates/tests/tests.js @@ -57,6 +57,12 @@ function getTests() { // TODO: Test_TC_DIAG_TH_NW_2_3 does not work on Darwin for now. tests.disable('Test_TC_DIAG_TH_NW_2_3'); + // TODO: Test_TC_MF_1_9 does not work on Darwin for now. + tests.disable('Test_TC_MF_1_9'); + + // TODO: Test_TC_MF_1_10 does not work on Darwin for now. + tests.disable('Test_TC_MF_1_10'); + return tests; } diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_10.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_10.yaml index af86c1cb5ed809..2b0a84a4fd1027 100644 --- a/src/app/tests/suites/certification/Test_TC_MF_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_MF_1_10.yaml @@ -18,63 +18,377 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 550 + nodeIdForDuplicateCommissioning: + type: NODE_ID + defaultValue: 0x11 + nodeId2: + type: NODE_ID + defaultValue: 0xCAFE + nodeId3: + type: NODE_ID + defaultValue: 0xC00FEE endpoint: 0 + discriminator: + type: INT16U + defaultValue: 3840 + payload: + type: CHAR_STRING + defaultValue: "MT:0000000000I31506010" + payload2: + type: CHAR_STRING + defaultValue: "MT:0000000000I.0648G00" tests: + - label: "Reboot target device" + cluster: "SystemCommands" + command: "Reboot" + arguments: + values: + - name: "discriminator" + value: discriminator + - label: "TH_CR1 starts a commissioning process with DUT_CE" - verification: | - 1. Provision the device using 1st python controller on the raspi (use above instructions) - disabled: true - - - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT_COMM_WIN seconds using BCM" - verification: | - On 1st controller using chip tool, open commissioning window using BCM - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 - - - [1635871562.958905][4336:4341] CHIP:DMG: InvokeCommand = - [1635871562.958976][4336:4341] CHIP:DMG: { - [1635871562.959031][4336:4341] CHIP:DMG: CommandList = - [1635871562.959095][4336:4341] CHIP:DMG: [ - [1635871562.959161][4336:4341] CHIP:DMG: CommandDataIB = - [1635871562.959225][4336:4341] CHIP:DMG: { - [1635871562.959290][4336:4341] CHIP:DMG: CommandPathIB = - [1635871562.959368][4336:4341] CHIP:DMG: { - [1635871562.959434][4336:4341] CHIP:DMG: EndpointId = 0x0, - [1635871562.959530][4336:4341] CHIP:DMG: ClusterId = 0x3c, - [1635871562.959625][4336:4341] CHIP:DMG: CommandId = 0x1, - [1635871562.959698][4336:4341] CHIP:DMG: }, - [1635871562.959776][4336:4341] CHIP:DMG: - [1635871562.959841][4336:4341] CHIP:DMG: StatusIB = - [1635871562.959911][4336:4341] CHIP:DMG: { - [1635871562.959980][4336:4341] CHIP:DMG: status = 0x0, - [1635871562.960064][4336:4341] CHIP:DMG: }, - [1635871562.960313][4336:4341] CHIP:DMG: - [1635871562.960459][4336:4341] CHIP:DMG: }, - [1635871562.960544][4336:4341] CHIP:DMG: - [1635871562.960604][4336:4341] CHIP:DMG: ], - [1635871562.960668][4336:4341] CHIP:DMG: - [1635871562.960723][4336:4341] CHIP:DMG: } - [1635871562.960824][4336:4341] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 - [1635871562.960894][4336:4341] CHIP:TOO: Default Success Response - disabled: true - - - label: - "Set up a TH_CR2 to start attempting to do PASE to DUT_CE and failing - 20 times. This can be done using an invalid passcode" - verification: | - On 2nd controller, using chip-tool connect using wrong passcode. Repeat the step for 20 times. - - ./chip-tool pairing onnetwork 1 20202019 (With wrong passcode) - disabled: true - - - label: "TH_CR2 starts a 21st commissioning process" - verification: | - On 2nd controller, using chip tool connect using correct passcode. - - ./chip-tool pairing onnetwork 1 20202021 (correct passcode) - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: "TH_CR3 starts a commissioning process with DUT_CE" + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + response: + error: FAILURE diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_15.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_15.yaml index 966145dea3b4ab..d0f4bf1728d29c 100644 --- a/src/app/tests/suites/certification/Test_TC_MF_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_MF_1_15.yaml @@ -167,31 +167,7 @@ tests: arguments: values: - name: "ms" - value: 54000 - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 18000 + value: 180000 - label: "TH_CR1 re-opens new commissioning window on DUT_CE" identity: "alpha" @@ -253,31 +229,7 @@ tests: arguments: values: - name: "ms" - value: 54000 - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 18000 + value: 180000 - label: "TH_CR1 opens a new commissioning window on DUT_CE" identity: "alpha" diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_5.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_5.yaml index e3eee90b82d022..e04f931bcce9bf 100644 --- a/src/app/tests/suites/certification/Test_TC_MF_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_MF_1_5.yaml @@ -76,31 +76,7 @@ tests: arguments: values: - name: "ms" - value: 54000 - - - label: "Wait for PIXIT_COMM_WIN(180) + 10 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for PIXIT_COMM_WIN(180) + 10 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for PIXIT_COMM_WIN(180) + 10 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 28000 + value: 190000 - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_6.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_6.yaml index c749c95dc5c958..2fb15ce3b7dbed 100644 --- a/src/app/tests/suites/certification/Test_TC_MF_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_MF_1_6.yaml @@ -75,31 +75,7 @@ tests: arguments: values: - name: "ms" - value: 54000 - - - label: "Wait for PIXIT_COMM_WIN(180) + 10" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for PIXIT_COMM_WIN(180) + 10" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 54000 - - - label: "Wait for PIXIT_COMM_WIN(180) + 10" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 28000 + value: 190000 - label: "Commission from beta" identity: "beta" diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_9.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_9.yaml index 4022bf84d2996e..ea3095f580225e 100644 --- a/src/app/tests/suites/certification/Test_TC_MF_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_MF_1_9.yaml @@ -18,46 +18,385 @@ name: config: nodeId: 0x12344321 - cluster: "Basic" + timeout: 550 + nodeIdForDuplicateCommissioning: + type: NODE_ID + defaultValue: 0x11 + nodeId2: + type: NODE_ID + defaultValue: 0xCAFE + nodeId3: + type: NODE_ID + defaultValue: 0xC00FEE endpoint: 0 + discriminator: + type: INT16U + defaultValue: 3840 + payload: + type: CHAR_STRING + defaultValue: "MT:-24J0AFN00KA0648G00" + payload2: + type: CHAR_STRING + defaultValue: "MT:0000000000I.0648G00" tests: + - label: "Reboot target device" + cluster: "SystemCommands" + command: "Reboot" + arguments: + values: + - name: "discriminator" + value: discriminator + - label: "TH_CR1 starts a commissioning process with DUT_CE" - verification: | - 1. Provision the device using 1st python controller on the raspi (use above instructions) - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH_CR1 opens a new commissioning window on DUT_CE" + cluster: "AdministratorCommissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEVerifier" + value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + - name: "discriminator" + value: discriminator + - name: "iterations" + value: 1000 + - name: "salt" + value: "SPAKE2P Key Salt" + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - label: - "TH_CR1 opens a commissioning window on DUT_CE using a commissioning - timeout of PIXIT_COMM_WIN seconds using ECM" - verification: | - On 1st controller, using chip-tool, send the open-commissioning-window CMD for ECM. -t stands for timeout value, -o for OriginalSetupCode/TokenWithRandomPIN/TokenWithProvidedPIN , -d for descriminator -i for iteration count. Ref to cmd help. + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - ./chip-tool pairing open-commissioning-window 1 1 200 1000 3840 + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] - [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] - [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] - [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i - [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 60688i with MessageCounter:3019982536. - [1635864513.699737][3850:3855] CHIP:IN: Sending plaintext msg 0xffff8a7cd960 with MessageCounter:3019982536 to 0x0000000000000000 at monotonic time: 6085358 msec - [1635864513.699834][3850:3855] CHIP:EM: Flushed pending ack for MessageCounter:2599714227 on exchange 60688i + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - The setup pin code is extracted from the manual pairing code in the log and that will be used when pairing the 2nd admin controller. - disabled: true + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - label: - "Set up a TH_CR2 to start attempting to do PASE to DUT_CE and failing - 20 times. This can be done using an invalid passcode" - verification: | - 1. On 2nd controller using chip-tool connect using wrong manual code. Repeat the step for 20 times. + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - ./chip-tool pairing code 1 36177160938 (With wrong manual code) - disabled: true + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - - label: "TH_CR2 starts a 21st commissioning process" - verification: | - 1. On 2nd controller using chip tool connect using correct passcode. + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE + + - label: + "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup + code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload2 + response: + error: FAILURE - ./chip-tool pairing code 1 36177160937 (correct passcode) - disabled: true + - label: "TH_CR3 starts a commissioning process with DUT_CE" + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + response: + error: FAILURE diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index a20e5c49dff21f..92d7ebd213bb73 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -224,8 +224,6 @@ function getManualTests() { 'Test_TC_MF_1_2', 'Test_TC_MF_1_7', 'Test_TC_MF_1_8', - 'Test_TC_MF_1_9', - 'Test_TC_MF_1_10', 'Test_TC_MF_1_11', 'Test_TC_MF_1_12', 'Test_TC_MF_1_13', @@ -622,6 +620,8 @@ function getTests() { 'Test_TC_MF_1_4', 'Test_TC_MF_1_5', 'Test_TC_MF_1_6', + 'Test_TC_MF_1_9', + 'Test_TC_MF_1_10', 'Test_TC_MF_1_15', ]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0fac39c6b39018..bf9e39a45dc67e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -122,6 +122,8 @@ class TestList : public Command printf("Test_TC_MF_1_4\n"); printf("Test_TC_MF_1_5\n"); printf("Test_TC_MF_1_6\n"); + printf("Test_TC_MF_1_9\n"); + printf("Test_TC_MF_1_10\n"); printf("Test_TC_MF_1_15\n"); printf("OTA_SuccessfulTransfer\n"); printf("Test_TC_OCC_1_1\n"); @@ -384,8 +386,6 @@ class ManualTestList : public Command printf("Test_TC_MF_1_2\n"); printf("Test_TC_MF_1_7\n"); printf("Test_TC_MF_1_8\n"); - printf("Test_TC_MF_1_9\n"); - printf("Test_TC_MF_1_10\n"); printf("Test_TC_MF_1_11\n"); printf("Test_TC_MF_1_12\n"); printf("Test_TC_MF_1_13\n"); @@ -21682,7 +21682,7 @@ class Test_TC_MF_1_4Suite : public TestCommand class Test_TC_MF_1_5Suite : public TestCommand { public: - Test_TC_MF_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_5", 17, 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); @@ -21736,38 +21736,26 @@ class Test_TC_MF_1_5Suite : public TestCommand 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)); - 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), 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)); break; case 9: 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; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -21775,14 +21763,14 @@ class Test_TC_MF_1_5Suite : public TestCommand VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); } break; - case 14: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -21838,29 +21826,46 @@ class Test_TC_MF_1_5Suite : public TestCommand LogStep(3, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; + value.ms = 190000UL; return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(kIdentityAlpha, value); + 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 5: { - LogStep(5, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); + LogStep(5, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(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 = 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, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); + LogStep(6, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 28000UL; - return WaitForMs(kIdentityAlpha, 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"); @@ -21871,7 +21876,30 @@ class Test_TC_MF_1_5Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 8: { - LogStep(8, "TH_CR1 opens a new commissioning window on DUT_CE"); + 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; @@ -21890,8 +21918,206 @@ class Test_TC_MF_1_5Suite : public TestCommand ); } - case 9: { - LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); + 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); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MF_1_6Suite : public TestCommand +{ +public: + 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); + 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_6Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } + +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)); + shouldContinue = true; + 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), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + 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), 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)); + break; + case 11: + 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 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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; + 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, "Stop target device"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(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); + } + 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 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 + + ); + } + case 4: { + LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + 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; + 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"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, @@ -21900,16 +22126,16 @@ class Test_TC_MF_1_5Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); + 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 11: { - LogStep(11, "TH_CR1 revokes the commissioning window on DUT_CE"); + 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, @@ -21918,21 +22144,230 @@ class Test_TC_MF_1_5Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + case 10: { + 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 13: { - LogStep(13, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + case 11: { + 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 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 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_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::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); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MF_1_9Suite : public TestCommand +{ +public: + Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_9", 25, 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); + } + + ~Test_TC_MF_1_9Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(550)); } + +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::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), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 4: + 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), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 6: + 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), 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 new commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -21942,7 +22377,7 @@ class Test_TC_MF_1_5Suite : public TestCommand "\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.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, @@ -21951,17 +22386,176 @@ class Test_TC_MF_1_5Suite : public TestCommand ); } + 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"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 16: { - LogStep(16, "TH_CR3 starts a commissioning process with DUT_CE"); + 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; @@ -21973,10 +22567,10 @@ class Test_TC_MF_1_5Suite : public TestCommand } }; -class Test_TC_MF_1_6Suite : public TestCommand +class Test_TC_MF_1_10Suite : public TestCommand { public: - Test_TC_MF_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_6", 19, credsIssuerConfig) + Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_10", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -21986,11 +22580,12 @@ class Test_TC_MF_1_6Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); + AddArgument("payload2", &mPayload2); } - ~Test_TC_MF_1_6Suite() {} + ~Test_TC_MF_1_10Suite() {} - 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(550)); } private: chip::Optional mNodeId; @@ -22001,6 +22596,7 @@ class Test_TC_MF_1_6Suite : 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; } @@ -22024,25 +22620,25 @@ class Test_TC_MF_1_6Suite : 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: @@ -22050,10 +22646,12 @@ class Test_TC_MF_1_6Suite : public TestCommand 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)); @@ -22061,33 +22659,56 @@ class Test_TC_MF_1_6Suite : public TestCommand 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), 0)); + 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), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - } + 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), 0)); + 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), 0)); + 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), 0)); + 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)); } @@ -22104,28 +22725,20 @@ class Test_TC_MF_1_6Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Stop target device"); + LogStep(0, "Reboot target device"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop(kIdentityAlpha, value); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); + 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 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + 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; @@ -22135,126 +22748,180 @@ class Test_TC_MF_1_6Suite : public TestCommand ); } + 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, "Wait for PIXIT_COMM_WIN(180) + 10"); + LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(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 5: { - LogStep(5, "Wait for PIXIT_COMM_WIN(180) + 10"); + LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(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, "Wait for PIXIT_COMM_WIN(180) + 10"); + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(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 PIXIT_COMM_WIN(180) + 10"); + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 28000UL; - return WaitForMs(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, "Commission from beta"); + 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 = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 9: { - LogStep(9, "TH_CR1 opens a commissioning window on DUT_CE"); + LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); 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::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_CR1 revokes the commissioning window on DUT_CE"); + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); 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 - - ); + 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, "Commission from beta"); + 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 = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 12: { - LogStep(12, "TH_CR1 revokes the commissioning window on DUT_CE"); + LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); 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 - - ); + 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_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); 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); + 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_CR1 read the mandatory attribute NodeLabel of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); + 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_CR1 opens a commissioning window on DUT_CE"); + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); 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::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, "Commission from beta"); + 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 = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + 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 on DUT_CE"); + LogStep(17, "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 = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, 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 18: { - LogStep(18, "TH_CR3 starts a commissioning process with DUT_CE"); + 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); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); return PairWithCode(kIdentityGamma, value); } } @@ -22265,7 +22932,7 @@ class Test_TC_MF_1_6Suite : public TestCommand class Test_TC_MF_1_15Suite : public TestCommand { public: - Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_15", 24, credsIssuerConfig) + 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); @@ -22365,23 +23032,11 @@ class Test_TC_MF_1_15Suite : public TestCommand 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)); - 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), 0)); - break; - case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 17: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -22401,26 +23056,14 @@ class Test_TC_MF_1_15Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; default: @@ -22543,32 +23186,11 @@ class Test_TC_MF_1_15Suite : public TestCommand LogStep(11, "Wait for the expiration of PIXIT_COMM_WIN seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; + value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 18000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "TH_CR1 re-opens new commissioning window on DUT_CE"); + 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; @@ -22587,8 +23209,8 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH_CR3 opens a new commissioning window on DUT_CE"); + 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; @@ -22607,41 +23229,20 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH_CR1 reads the list of Fabrics on DUT_CE"); + 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 18: { - LogStep(18, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + 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 = 18000UL; + value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH_CR1 opens a new commissioning window on DUT_CE"); + 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; @@ -22660,8 +23261,8 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 23: { - LogStep(23, "TH_CR2 opens a new commissioning window on DUT_CE"); + 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; @@ -74204,422 +74805,138 @@ 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, 1)); - } - 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, 0)); - } - 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, 0)); - } - 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))); - } - 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::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - 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 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); - 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, "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, "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 16: { - LogStep(16, "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 17: { - LogStep(17, "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 18: { - LogStep(18, "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 19: { - LogStep(19, "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 20: { - LogStep(20, "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 21: { - LogStep(21, "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; - } -}; - -class Test_TC_MC_6_5Suite : public TestCommand -{ -public: - Test_TC_MC_6_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_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_MC_6_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)); - } - - 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_7Suite : public TestCommand -{ -public: - Test_TC_MC_6_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_7", 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_MC_6_7Suite() {} - - 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, 1)); + } + 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, 0)); + } + 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, 0)); + } + 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))); + } + 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::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: + 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 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -74635,15 +74952,187 @@ class Test_TC_MC_6_7Suite : 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, "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 16: { + LogStep(16, "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 17: { + LogStep(17, "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 18: { + LogStep(18, "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 19: { + LogStep(19, "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 20: { + LogStep(20, "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 21: { + LogStep(21, "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; } }; -class Test_TC_MC_7_3Suite : public TestCommand +class Test_TC_MC_6_5Suite : public TestCommand { public: - Test_TC_MC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_3", 0, credsIssuerConfig) + Test_TC_MC_6_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74651,7 +75140,7 @@ class Test_TC_MC_7_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_7_3Suite() {} + ~Test_TC_MC_6_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74696,10 +75185,10 @@ class Test_TC_MC_7_3Suite : public TestCommand } }; -class Test_TC_MC_7_4Suite : public TestCommand +class Test_TC_MC_6_7Suite : public TestCommand { public: - Test_TC_MC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_4", 0, credsIssuerConfig) + Test_TC_MC_6_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74707,7 +75196,7 @@ class Test_TC_MC_7_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_7_4Suite() {} + ~Test_TC_MC_6_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74752,10 +75241,10 @@ class Test_TC_MC_7_4Suite : public TestCommand } }; -class Test_TC_MC_10_3Suite : public TestCommand +class Test_TC_MC_7_3Suite : public TestCommand { public: - Test_TC_MC_10_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_3", 0, credsIssuerConfig) + Test_TC_MC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74763,7 +75252,7 @@ class Test_TC_MC_10_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_3Suite() {} + ~Test_TC_MC_7_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74808,10 +75297,10 @@ class Test_TC_MC_10_3Suite : public TestCommand } }; -class Test_TC_MC_10_5Suite : public TestCommand +class Test_TC_MC_7_4Suite : public TestCommand { public: - Test_TC_MC_10_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_5", 0, credsIssuerConfig) + Test_TC_MC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74819,7 +75308,7 @@ class Test_TC_MC_10_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_5Suite() {} + ~Test_TC_MC_7_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74864,10 +75353,10 @@ class Test_TC_MC_10_5Suite : public TestCommand } }; -class Test_TC_MC_10_7Suite : public TestCommand +class Test_TC_MC_10_3Suite : public TestCommand { public: - Test_TC_MC_10_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_7", 0, credsIssuerConfig) + Test_TC_MC_10_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74875,7 +75364,7 @@ class Test_TC_MC_10_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_7Suite() {} + ~Test_TC_MC_10_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74920,10 +75409,10 @@ class Test_TC_MC_10_7Suite : public TestCommand } }; -class Test_TC_MC_11_1Suite : public TestCommand +class Test_TC_MC_10_5Suite : public TestCommand { public: - Test_TC_MC_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_1", 0, credsIssuerConfig) + Test_TC_MC_10_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74931,7 +75420,7 @@ class Test_TC_MC_11_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_11_1Suite() {} + ~Test_TC_MC_10_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74976,10 +75465,10 @@ class Test_TC_MC_11_1Suite : public TestCommand } }; -class Test_TC_MC_11_2Suite : public TestCommand +class Test_TC_MC_10_7Suite : public TestCommand { public: - Test_TC_MC_11_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_2", 0, credsIssuerConfig) + Test_TC_MC_10_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74987,7 +75476,7 @@ class Test_TC_MC_11_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_11_2Suite() {} + ~Test_TC_MC_10_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75032,10 +75521,10 @@ class Test_TC_MC_11_2Suite : public TestCommand } }; -class Test_TC_MF_1_1Suite : public TestCommand +class Test_TC_MC_11_1Suite : public TestCommand { public: - Test_TC_MF_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_1", 0, credsIssuerConfig) + Test_TC_MC_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75043,7 +75532,7 @@ class Test_TC_MF_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_1Suite() {} + ~Test_TC_MC_11_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75088,10 +75577,10 @@ class Test_TC_MF_1_1Suite : public TestCommand } }; -class Test_TC_MF_1_2Suite : public TestCommand +class Test_TC_MC_11_2Suite : public TestCommand { public: - Test_TC_MF_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_2", 0, credsIssuerConfig) + Test_TC_MC_11_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75099,7 +75588,7 @@ class Test_TC_MF_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_2Suite() {} + ~Test_TC_MC_11_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75144,10 +75633,10 @@ class Test_TC_MF_1_2Suite : public TestCommand } }; -class Test_TC_MF_1_7Suite : public TestCommand +class Test_TC_MF_1_1Suite : public TestCommand { public: - Test_TC_MF_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_7", 0, credsIssuerConfig) + Test_TC_MF_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75155,7 +75644,7 @@ class Test_TC_MF_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_7Suite() {} + ~Test_TC_MF_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75200,10 +75689,10 @@ class Test_TC_MF_1_7Suite : public TestCommand } }; -class Test_TC_MF_1_8Suite : public TestCommand +class Test_TC_MF_1_2Suite : public TestCommand { public: - Test_TC_MF_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_8", 0, credsIssuerConfig) + Test_TC_MF_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75211,7 +75700,7 @@ class Test_TC_MF_1_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_8Suite() {} + ~Test_TC_MF_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75256,10 +75745,10 @@ class Test_TC_MF_1_8Suite : public TestCommand } }; -class Test_TC_MF_1_9Suite : public TestCommand +class Test_TC_MF_1_7Suite : public TestCommand { public: - Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_9", 0, credsIssuerConfig) + Test_TC_MF_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75267,7 +75756,7 @@ class Test_TC_MF_1_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_9Suite() {} + ~Test_TC_MF_1_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75312,10 +75801,10 @@ class Test_TC_MF_1_9Suite : public TestCommand } }; -class Test_TC_MF_1_10Suite : public TestCommand +class Test_TC_MF_1_8Suite : public TestCommand { public: - Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_10", 0, credsIssuerConfig) + Test_TC_MF_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75323,7 +75812,7 @@ class Test_TC_MF_1_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_10Suite() {} + ~Test_TC_MF_1_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82486,6 +82975,8 @@ 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), @@ -82737,8 +83228,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), 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 dd7bff137d6365..13d935543c861d 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -36334,60 +36334,48 @@ class Test_TC_MF_1_5 : public TestCommandBridge { err = TestWaitForPixitCommWin18010Seconds_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); - err = TestWaitForPixitCommWin18010Seconds_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); - err = TestWaitForPixitCommWin18010Seconds_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); - err = TestWaitForPixitCommWin18010Seconds_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); err = TestThCr2StartsACommissioningProcessWithDutCe_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR2 starts a commissioning process with DUT_CE\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThCr2StartsACommissioningProcessWithDutCe_15(); + err = TestThCr2StartsACommissioningProcessWithDutCe_12(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_16(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_13(); break; } @@ -36413,7 +36401,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36425,30 +36413,21 @@ class Test_TC_MF_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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), EMBER_ZCL_STATUS_FAILURE)); break; } @@ -36461,7 +36440,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mTimeout; @@ -36519,32 +36498,11 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestWaitForPixitCommWin18010Seconds_3() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForPixitCommWin18010Seconds_4() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForPixitCommWin18010Seconds_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; + value.ms = 190000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestWaitForPixitCommWin18010Seconds_6() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 28000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_4() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36552,7 +36510,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_8() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36583,7 +36541,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36602,7 +36560,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_10() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36610,7 +36568,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_11() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36628,7 +36586,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_12() + CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -36648,7 +36606,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_13() + CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -36670,7 +36628,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_14() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36701,7 +36659,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_15() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_12() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36709,7 +36667,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_16() + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_13() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; @@ -36782,60 +36740,48 @@ class Test_TC_MF_1_6 : public TestCommandBridge { err = TestWaitForPixitCommWin18010_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for PIXIT_COMM_WIN(180) + 10\n"); - err = TestWaitForPixitCommWin18010_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Commission from beta\n"); + err = TestCommissionFromBeta_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait for PIXIT_COMM_WIN(180) + 10\n"); - err = TestWaitForPixitCommWin18010_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for PIXIT_COMM_WIN(180) + 10\n"); - err = TestWaitForPixitCommWin18010_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_7(); break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Commission from beta\n"); err = TestCommissionFromBeta_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Commission from beta\n"); - err = TestCommissionFromBeta_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Commission from beta\n"); + err = TestCommissionFromBeta_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process on DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessOnDutCe_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Commission from beta\n"); - err = TestCommissionFromBeta_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH_CR2 starts a commissioning process on DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessOnDutCe_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_18(); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_15(); break; } @@ -36864,7 +36810,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36876,16 +36822,16 @@ class Test_TC_MF_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36894,15 +36840,6 @@ class Test_TC_MF_1_6 : public TestCommandBridge { 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; - case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; } @@ -36915,7 +36852,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mTimeout; @@ -36972,32 +36909,11 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestWaitForPixitCommWin18010_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForPixitCommWin18010_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; + value.ms = 190000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestWaitForPixitCommWin18010_6() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForPixitCommWin18010_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 28000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCommissionFromBeta_8() + CHIP_ERROR TestCommissionFromBeta_5() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -37005,7 +36921,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_9() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37027,7 +36943,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_10() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37046,7 +36962,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionFromBeta_11() + CHIP_ERROR TestCommissionFromBeta_8() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -37054,7 +36970,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_12() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37072,7 +36988,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_13() + CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -37092,7 +37008,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_14() + CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -37114,7 +37030,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_15() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37136,7 +37052,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionFromBeta_16() + CHIP_ERROR TestCommissionFromBeta_13() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -37144,14 +37060,14 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr2StartsACommissioningProcessOnDutCe_17() + CHIP_ERROR TestThCr2StartsACommissioningProcessOnDutCe_14() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee("beta", value); } - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_18() + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_15() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; @@ -37251,52 +37167,28 @@ class Test_TC_MF_1_15 : public TestCommandBridge { err = TestWaitForTheExpirationOfPixitCommWinSeconds_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 re-opens new commissioning window on DUT_CE\n"); + err = TestThCr1ReOpensNewCommissioningWindowOnDutCe_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 opens a new commissioning window on DUT_CE\n"); + err = TestThCr3OpensANewCommissioningWindowOnDutCe_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); + err = TestThCr1ReadsTheListOfFabricsOnDutCe_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR1 re-opens new commissioning window on DUT_CE\n"); - err = TestThCr1ReOpensNewCommissioningWindowOnDutCe_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); + err = TestWaitForTheExpirationOfPixitCommWinSeconds_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR3 opens a new commissioning window on DUT_CE\n"); - err = TestThCr3OpensANewCommissioningWindowOnDutCe_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); - err = TestThCr1ReadsTheListOfFabricsOnDutCe_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH_CR2 opens a new commissioning window on DUT_CE\n"); - err = TestThCr2OpensANewCommissioningWindowOnDutCe_23(); + ChipLogProgress(chipTool, " ***** Test Step 17 : TH_CR2 opens a new commissioning window on DUT_CE\n"); + err = TestThCr2OpensANewCommissioningWindowOnDutCe_17(); break; } @@ -37349,7 +37241,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -37358,27 +37250,9 @@ class Test_TC_MF_1_15 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; } @@ -37391,7 +37265,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mTimeout; @@ -37578,32 +37452,11 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_12() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_13() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; + value.ms = 180000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 18000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_15() + CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37634,7 +37487,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_16() + CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_13() { CHIPDevice * device = GetDevice("gamma"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37664,7 +37517,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_17() + CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_14() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device @@ -37698,35 +37551,14 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_18() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_20() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 54000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_21() + CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 18000UL; + value.ms = 180000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_22() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37757,7 +37589,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_23() + CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_17() { CHIPDevice * device = GetDevice("beta"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device