From 444152349e853e6f5d9e0029543e765d2ca5eda1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 8 Jun 2022 21:57:09 -0400 Subject: [PATCH] Revert "MF Test Added May 17 (#18521)" (#19354) This reverts commit 2b5ec743e06b78495299b9613fa68f4338b47b30. --- .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, 1149 insertions(+), 2033 deletions(-) diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 0f0f57b57104a5..c6603eaac00f4e 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: 135 + timeout-minutes: 120 strategy: matrix: @@ -96,7 +96,7 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 60 + timeout-minutes: 45 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 171f583f7b0bbf..771c4949340f04 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: 140 + timeout-minutes: 120 strategy: matrix: @@ -90,7 +90,7 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 60 + timeout-minutes: 40 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: 130 + timeout-minutes: 120 strategy: matrix: @@ -190,7 +190,7 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 60 + timeout-minutes: 50 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 1789f09fb322fa..7e2defdcc22f02 100644 --- a/examples/darwin-framework-tool/templates/tests/tests.js +++ b/examples/darwin-framework-tool/templates/tests/tests.js @@ -57,12 +57,6 @@ 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 2b0a84a4fd1027..af86c1cb5ed809 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,377 +18,63 @@ name: config: nodeId: 0x12344321 - timeout: 550 - nodeIdForDuplicateCommissioning: - type: NODE_ID - defaultValue: 0x11 - nodeId2: - type: NODE_ID - defaultValue: 0xCAFE - nodeId3: - type: NODE_ID - defaultValue: 0xC00FEE + cluster: "Basic" 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" - 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 + 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 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 d0f4bf1728d29c..966145dea3b4ab 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,7 +167,31 @@ tests: arguments: values: - name: "ms" - value: 180000 + 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 - label: "TH_CR1 re-opens new commissioning window on DUT_CE" identity: "alpha" @@ -229,7 +253,31 @@ tests: arguments: values: - name: "ms" - value: 180000 + 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 - 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 e04f931bcce9bf..e3eee90b82d022 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,7 +76,31 @@ tests: arguments: values: - name: "ms" - value: 190000 + 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 - 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 2fb15ce3b7dbed..c749c95dc5c958 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,7 +75,31 @@ tests: arguments: values: - name: "ms" - value: 190000 + 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 - 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 ea3095f580225e..4022bf84d2996e 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,385 +18,46 @@ name: config: nodeId: 0x12344321 - timeout: 550 - nodeIdForDuplicateCommissioning: - type: NODE_ID - defaultValue: 0x11 - nodeId2: - type: NODE_ID - defaultValue: 0xCAFE - nodeId3: - type: NODE_ID - defaultValue: 0xC00FEE + cluster: "Basic" 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" - 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 + verification: | + 1. Provision the device using 1st python controller on the raspi (use above instructions) + 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 + "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. - - 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 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 + "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. - - 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 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 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 21st commissioning process" + verification: | + 1. On 2nd controller using chip tool connect using correct passcode. - - 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 + ./chip-tool pairing code 1 36177160937 (correct passcode) + disabled: true diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index 92d7ebd213bb73..a20e5c49dff21f 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -224,6 +224,8 @@ 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', @@ -620,8 +622,6 @@ 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 bf9e39a45dc67e..0fac39c6b39018 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -122,8 +122,6 @@ 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"); @@ -386,6 +384,8 @@ 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", 14, credsIssuerConfig) + Test_TC_MF_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_5", 17, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -21736,26 +21736,38 @@ class Test_TC_MF_1_5Suite : public TestCommand shouldContinue = true; break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 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; @@ -21763,14 +21775,14 @@ class Test_TC_MF_1_5Suite : public TestCommand VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); } break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -21826,46 +21838,29 @@ 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 = 190000UL; + value.ms = 54000UL; return WaitForMs(kIdentityAlpha, value); } case 4: { - LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(5, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { - LogStep(6, "TH_CR1 revokes the commissioning window on DUT_CE"); + LogStep(6, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); 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::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); @@ -21876,30 +21871,7 @@ class Test_TC_MF_1_5Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 8: { - LogStep(8, "TH_CR1 revokes the commissioning window on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 10: { - LogStep(10, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE"); + LogStep(8, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -21918,206 +21890,8 @@ class Test_TC_MF_1_5Suite : public TestCommand ); } - 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"); + 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, @@ -22126,16 +21900,16 @@ class Test_TC_MF_1_6Suite : public TestCommand ); } - case 8: { - LogStep(8, "Commission from beta"); + case 10: { + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 9: { - LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); + case 11: { + LogStep(11, "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, @@ -22144,230 +21918,21 @@ class Test_TC_MF_1_6Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + case 12: { + LogStep(12, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); ListFreer listFreer; chip::CharSpan value; value = chip::Span("chiptestgarbage: not in length on purpose", 8); return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + case 13: { + LogStep(13, "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_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"); + LogStep(14, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -22377,7 +21942,7 @@ class Test_TC_MF_1_9Suite : 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 = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + 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, @@ -22386,176 +21951,17 @@ class Test_TC_MF_1_9Suite : 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 using Invalid setup code"); + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 16: { - LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 17: { - LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 21: { - LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 23: { - LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 24: { - LogStep(24, "TH_CR3 starts a commissioning process with DUT_CE"); + LogStep(16, "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; @@ -22567,10 +21973,10 @@ class Test_TC_MF_1_9Suite : public TestCommand } }; -class Test_TC_MF_1_10Suite : public TestCommand +class Test_TC_MF_1_6Suite : public TestCommand { public: - Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_10", 25, credsIssuerConfig) + Test_TC_MF_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_6", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -22580,12 +21986,11 @@ class Test_TC_MF_1_10Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); - AddArgument("payload2", &mPayload2); } - ~Test_TC_MF_1_10Suite() {} + ~Test_TC_MF_1_6Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(550)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: chip::Optional mNodeId; @@ -22596,7 +22001,6 @@ class Test_TC_MF_1_10Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; - chip::Optional mPayload2; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -22620,25 +22024,25 @@ class Test_TC_MF_1_10Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 8: @@ -22646,12 +22050,10 @@ class Test_TC_MF_1_10Suite : public TestCommand shouldContinue = true; break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -22659,56 +22061,33 @@ class Test_TC_MF_1_10Suite : 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), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + } break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 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)); } @@ -22725,20 +22104,28 @@ class Test_TC_MF_1_10Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Reboot target device"); + LogStep(0, "Stop target device"); ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot(kIdentityAlpha, value); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 2: { - LogStep(2, "TH_CR1 opens a commissioning window on DUT_CE"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -22748,180 +22135,126 @@ class Test_TC_MF_1_10Suite : 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"); + LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(5, "Wait for PIXIT_COMM_WIN(180) + 10"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(6, "Wait for PIXIT_COMM_WIN(180) + 10"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(7, "Wait for PIXIT_COMM_WIN(180) + 10"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(8, "Commission from beta"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 9: { - LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(9, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(10, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 11: { - LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(11, "Commission from beta"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 12: { - LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(12, "TH_CR1 revokes the commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(13, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, + chip::NullOptional, chip::NullOptional); } case 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); + 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); } case 15: { - LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(15, "TH_CR1 opens a commissioning window on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 16: { - LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(16, "Commission from beta"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 17: { - LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(17, "TH_CR2 starts a commissioning process on DUT_CE"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 21: { - LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 23: { - LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 24: { - LogStep(24, "TH_CR3 starts a commissioning process with DUT_CE"); + LogStep(18, "TH_CR3 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityGamma, value); } } @@ -22932,7 +22265,7 @@ class Test_TC_MF_1_10Suite : public TestCommand class Test_TC_MF_1_15Suite : public TestCommand { public: - Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_15", 18, credsIssuerConfig) + Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_15", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -23032,11 +22365,23 @@ 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), EMBER_ZCL_STATUS_FAILURE)); + 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: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -23056,14 +22401,26 @@ class Test_TC_MF_1_15Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 15: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 17: + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; default: @@ -23186,11 +22543,32 @@ 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 = 180000UL; + value.ms = 54000UL; return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "TH_CR1 re-opens new commissioning window on DUT_CE"); + 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"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -23209,8 +22587,8 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH_CR3 opens a new commissioning window on DUT_CE"); + case 16: { + LogStep(16, "TH_CR3 opens a new commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -23229,20 +22607,41 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 14: { - LogStep(14, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 17: { + LogStep(17, "TH_CR1 reads the list of Fabrics on DUT_CE"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 15: { - LogStep(15, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + 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 = 180000UL; + value.ms = 54000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH_CR1 opens a new commissioning window on DUT_CE"); + 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"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 18000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "TH_CR1 opens a new commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -23261,8 +22660,8 @@ class Test_TC_MF_1_15Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH_CR2 opens a new commissioning window on DUT_CE"); + case 23: { + LogStep(23, "TH_CR2 opens a new commissioning window on DUT_CE"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -74805,138 +74204,422 @@ 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; + 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) + { default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -74952,187 +74635,15 @@ class Test_TC_MC_6_4Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Media content in a paused state at the beginning of the content"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Pause::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Pause::Id, value, - chip::NullOptional - - ); - } - case 2: { - LogStep(2, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Reads the CurrentState attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads the PlaybackSpeed attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Verify that the media is playinggarbage: not in length on purpose", 32); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Reads the CurrentState attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 9: { - LogStep(9, "Sends a FastForward command"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::FastForward::Id, value, - chip::NullOptional - - ); - } - case 10: { - LogStep(10, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that the media play speed has increasedgarbage: not in length on purpose", 46); - return UserPrompt(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Reads the PlaybackSpeed attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "Sends a Rewind command to the DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Commands::Rewind::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "log a command"); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); - return UserPrompt(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "Reads the CurrentState attribute"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::CurrentState::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "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 +class Test_TC_MC_7_3Suite : public TestCommand { public: - Test_TC_MC_6_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_5", 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); @@ -75140,7 +74651,7 @@ class Test_TC_MC_6_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_6_5Suite() {} + ~Test_TC_MC_7_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75185,10 +74696,10 @@ class Test_TC_MC_6_5Suite : public TestCommand } }; -class Test_TC_MC_6_7Suite : public TestCommand +class Test_TC_MC_7_4Suite : public TestCommand { public: - Test_TC_MC_6_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_7", 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); @@ -75196,7 +74707,7 @@ class Test_TC_MC_6_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_6_7Suite() {} + ~Test_TC_MC_7_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75241,10 +74752,10 @@ class Test_TC_MC_6_7Suite : public TestCommand } }; -class Test_TC_MC_7_3Suite : public TestCommand +class Test_TC_MC_10_3Suite : public TestCommand { public: - Test_TC_MC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_3", 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); @@ -75252,7 +74763,7 @@ class Test_TC_MC_7_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_7_3Suite() {} + ~Test_TC_MC_10_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75297,10 +74808,10 @@ class Test_TC_MC_7_3Suite : public TestCommand } }; -class Test_TC_MC_7_4Suite : public TestCommand +class Test_TC_MC_10_5Suite : public TestCommand { public: - Test_TC_MC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_7_4", 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); @@ -75308,7 +74819,7 @@ class Test_TC_MC_7_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_7_4Suite() {} + ~Test_TC_MC_10_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75353,10 +74864,10 @@ class Test_TC_MC_7_4Suite : public TestCommand } }; -class Test_TC_MC_10_3Suite : public TestCommand +class Test_TC_MC_10_7Suite : public TestCommand { public: - Test_TC_MC_10_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_3", 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); @@ -75364,7 +74875,7 @@ class Test_TC_MC_10_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_3Suite() {} + ~Test_TC_MC_10_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75409,10 +74920,10 @@ class Test_TC_MC_10_3Suite : public TestCommand } }; -class Test_TC_MC_10_5Suite : public TestCommand +class Test_TC_MC_11_1Suite : public TestCommand { public: - Test_TC_MC_10_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_5", 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); @@ -75420,7 +74931,7 @@ class Test_TC_MC_10_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_5Suite() {} + ~Test_TC_MC_11_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75465,10 +74976,10 @@ class Test_TC_MC_10_5Suite : public TestCommand } }; -class Test_TC_MC_10_7Suite : public TestCommand +class Test_TC_MC_11_2Suite : public TestCommand { public: - Test_TC_MC_10_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_10_7", 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); @@ -75476,7 +74987,7 @@ class Test_TC_MC_10_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_7Suite() {} + ~Test_TC_MC_11_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75521,10 +75032,10 @@ class Test_TC_MC_10_7Suite : public TestCommand } }; -class Test_TC_MC_11_1Suite : public TestCommand +class Test_TC_MF_1_1Suite : public TestCommand { public: - Test_TC_MC_11_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_1", 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); @@ -75532,7 +75043,7 @@ class Test_TC_MC_11_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_11_1Suite() {} + ~Test_TC_MF_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75577,10 +75088,10 @@ class Test_TC_MC_11_1Suite : public TestCommand } }; -class Test_TC_MC_11_2Suite : public TestCommand +class Test_TC_MF_1_2Suite : public TestCommand { public: - Test_TC_MC_11_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_11_2", 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); @@ -75588,7 +75099,7 @@ class Test_TC_MC_11_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_11_2Suite() {} + ~Test_TC_MF_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75633,10 +75144,10 @@ class Test_TC_MC_11_2Suite : public TestCommand } }; -class Test_TC_MF_1_1Suite : public TestCommand +class Test_TC_MF_1_7Suite : public TestCommand { public: - Test_TC_MF_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_1", 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); @@ -75644,7 +75155,7 @@ class Test_TC_MF_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_1Suite() {} + ~Test_TC_MF_1_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75689,10 +75200,10 @@ class Test_TC_MF_1_1Suite : public TestCommand } }; -class Test_TC_MF_1_2Suite : public TestCommand +class Test_TC_MF_1_8Suite : public TestCommand { public: - Test_TC_MF_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_2", 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); @@ -75700,7 +75211,7 @@ class Test_TC_MF_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_2Suite() {} + ~Test_TC_MF_1_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75745,10 +75256,10 @@ class Test_TC_MF_1_2Suite : public TestCommand } }; -class Test_TC_MF_1_7Suite : public TestCommand +class Test_TC_MF_1_9Suite : public TestCommand { public: - Test_TC_MF_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_7", 0, credsIssuerConfig) + Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75756,7 +75267,7 @@ class Test_TC_MF_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_7Suite() {} + ~Test_TC_MF_1_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75801,10 +75312,10 @@ class Test_TC_MF_1_7Suite : public TestCommand } }; -class Test_TC_MF_1_8Suite : public TestCommand +class Test_TC_MF_1_10Suite : public TestCommand { public: - Test_TC_MF_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_8", 0, credsIssuerConfig) + Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MF_1_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75812,7 +75323,7 @@ class Test_TC_MF_1_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_8Suite() {} + ~Test_TC_MF_1_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82975,8 +82486,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), @@ -83228,6 +82737,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), 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 13d935543c861d..dd7bff137d6365 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -36334,48 +36334,60 @@ class Test_TC_MF_1_5 : public TestCommandBridge { err = TestWaitForPixitCommWin18010Seconds_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); + err = TestWaitForPixitCommWin18010Seconds_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); + err = TestWaitForPixitCommWin18010Seconds_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); + err = TestWaitForPixitCommWin18010Seconds_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 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_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 read the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE\n"); + 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"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThCr2StartsACommissioningProcessWithDutCe_12(); + err = TestThCr2StartsACommissioningProcessWithDutCe_15(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_13(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_16(); break; } @@ -36401,7 +36413,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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36413,21 +36425,30 @@ 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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); + 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; } @@ -36440,7 +36461,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mTimeout; @@ -36498,11 +36519,32 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestWaitForPixitCommWin18010Seconds_3() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; + 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; return WaitForMs("alpha", value); } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_4() + CHIP_ERROR TestWaitForPixitCommWin18010Seconds_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36510,7 +36552,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_5() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36541,7 +36583,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_6() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36560,7 +36602,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_10() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36568,7 +36610,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_8() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36586,7 +36628,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9() + CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -36606,7 +36648,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10() + CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -36628,7 +36670,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_11() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_14() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36659,7 +36701,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_12() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_15() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36667,7 +36709,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_13() + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_16() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; @@ -36740,48 +36782,60 @@ class Test_TC_MF_1_6 : public TestCommandBridge { err = TestWaitForPixitCommWin18010_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Commission from beta\n"); - err = TestCommissionFromBeta_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for PIXIT_COMM_WIN(180) + 10\n"); + err = TestWaitForPixitCommWin18010_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait for PIXIT_COMM_WIN(180) + 10\n"); + err = TestWaitForPixitCommWin18010_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for PIXIT_COMM_WIN(180) + 10\n"); + err = TestWaitForPixitCommWin18010_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 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Commission from beta\n"); + err = TestCommissionFromBeta_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Commission from beta\n"); - err = TestCommissionFromBeta_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process on DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessOnDutCe_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_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(); break; } @@ -36810,7 +36864,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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36822,16 +36876,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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36840,6 +36894,15 @@ 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; } @@ -36852,7 +36915,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mTimeout; @@ -36909,11 +36972,32 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestWaitForPixitCommWin18010_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; + value.ms = 54000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestWaitForPixitCommWin18010_5() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCommissionFromBeta_5() + 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::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36921,7 +37005,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_6() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36943,7 +37027,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_7() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36962,7 +37046,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionFromBeta_8() + CHIP_ERROR TestCommissionFromBeta_11() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -36970,7 +37054,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_12() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36988,7 +37072,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10() + CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -37008,7 +37092,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11() + CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_14() { CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -37030,7 +37114,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_12() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_15() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37052,7 +37136,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionFromBeta_13() + CHIP_ERROR TestCommissionFromBeta_16() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -37060,14 +37144,14 @@ class Test_TC_MF_1_6 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestThCr2StartsACommissioningProcessOnDutCe_14() + CHIP_ERROR TestThCr2StartsACommissioningProcessOnDutCe_17() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee("beta", value); } - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_15() + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_18() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; @@ -37167,28 +37251,52 @@ class Test_TC_MF_1_15 : public TestCommandBridge { err = TestWaitForTheExpirationOfPixitCommWinSeconds_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 re-opens new commissioning window on DUT_CE\n"); - err = TestThCr1ReOpensNewCommissioningWindowOnDutCe_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); + err = TestWaitForTheExpirationOfPixitCommWinSeconds_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 opens a new commissioning window on DUT_CE\n"); - err = TestThCr3OpensANewCommissioningWindowOnDutCe_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); + err = TestWaitForTheExpirationOfPixitCommWinSeconds_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); - err = TestThCr1ReadsTheListOfFabricsOnDutCe_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); + err = TestWaitForTheExpirationOfPixitCommWinSeconds_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR1 re-opens new commissioning window on DUT_CE\n"); + err = TestThCr1ReOpensNewCommissioningWindowOnDutCe_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR3 opens a new commissioning window on DUT_CE\n"); + err = TestThCr3OpensANewCommissioningWindowOnDutCe_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH_CR2 opens a new commissioning window on DUT_CE\n"); - err = TestThCr2OpensANewCommissioningWindowOnDutCe_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(); break; } @@ -37241,7 +37349,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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -37250,9 +37358,27 @@ 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), 0)); + 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: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; } @@ -37265,7 +37391,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mTimeout; @@ -37452,11 +37578,32 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; + 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; return WaitForMs("alpha", value); } - CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_12() + CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_14() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 18000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_15() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37487,7 +37634,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_13() + CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_16() { CHIPDevice * device = GetDevice("gamma"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37517,7 +37664,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_14() + CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_17() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device @@ -37551,14 +37698,35 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_15() + 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::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; + value.ms = 18000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_16() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37589,7 +37757,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_17() + CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_23() { CHIPDevice * device = GetDevice("beta"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device