From 57aa28d507decbbd2f30ae363e6283c4ab8f79a5 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Tue, 6 Aug 2024 10:34:51 -0400 Subject: [PATCH 1/5] Update ICDM 4.1 Test script --- .../certification/Test_TC_ICDM_4_1.yaml | 90 +++++++++---------- src/app/tests/suites/ciTests.json | 3 +- src/app/tests/suites/manualTests.json | 1 - 3 files changed, 46 insertions(+), 48 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml index b845764732f841..20e146ad3806ab 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml @@ -17,58 +17,56 @@ name: "[TC-ICDM-4.1] Stay Active Request with DUT as Server" PICS: - ICDM.S - - ICDM.S.C00.Rsp - - ICDM.S.C02.Rsp - - ICDM.S.C03.Rsp + - ICDM.S.F02 config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "ICD Management" endpoint: 0 tests: - - label: "Preconditions" - verification: | - 1.Commission DUT to TH (can be skipped if done in a preceding test). - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: - "Step 1: TH sends StayActiveRequest command with StayActiveDuration." - PICS: ICDM.S.C03.Rsp - verification: | - ./chip-tool icdmanagement stay-active-request 1 0 + "TH sends StayActiveRequest command with StayActiveDuration greater + than or equal 30000 milliseconds." + command: "StayActiveRequest" + arguments: + values: + - name: "StayActiveDuration" + value: 30000 + response: + values: + - name: "PromisedActiveDuration" + saveAs: ActiveDuration + constraints: + type: int32u + minValue: 30000 - Via the TH (chip-tool), verify the SUCCESS response for StayActiveRequest command. - - [1702414315.312084][3787:3789] CHIP:DMG: InvokeResponseMessage = - [1702414315.312130][3787:3789] CHIP:DMG: { - [1702414315.312244][3787:3789] CHIP:DMG: suppressResponse = false, - [1702414315.312295][3787:3789] CHIP:DMG: InvokeResponseIBs = - [1702414315.312360][3787:3789] CHIP:DMG: [ - [1702414315.312497][3787:3789] CHIP:DMG: InvokeResponseIB = - [1702414315.312572][3787:3789] CHIP:DMG: { - [1702414315.312626][3787:3789] CHIP:DMG: CommandStatusIB = - [1702414315.312709][3787:3789] CHIP:DMG: { - [1702414315.312774][3787:3789] CHIP:DMG: CommandPathIB = - [1702414315.312857][3787:3789] CHIP:DMG: { - [1702414315.312921][3787:3789] CHIP:DMG: EndpointId = 0x0, - [1702414315.312994][3787:3789] CHIP:DMG: ClusterId = 0x46, - [1702414315.313060][3787:3789] CHIP:DMG: CommandId = 0x3, - [1702414315.313155][3787:3789] CHIP:DMG: }, - [1702414315.313234][3787:3789] CHIP:DMG: - [1702414315.313293][3787:3789] CHIP:DMG: StatusIB = - [1702414315.313382][3787:3789] CHIP:DMG: { - [1702414315.313450][3787:3789] CHIP:DMG: status = 0x81 (UNSUPPORTED_COMMAND), - [1702414315.313536][3787:3789] CHIP:DMG: }, - [1702414315.313603][3787:3789] CHIP:DMG: - [1702414315.313679][3787:3789] CHIP:DMG: }, - [1702414315.313747][3787:3789] CHIP:DMG: - [1702414315.313799][3787:3789] CHIP:DMG: }, - [1702414315.313878][3787:3789] CHIP:DMG: - [1702414315.313928][3787:3789] CHIP:DMG: ], - [1702414315.313989][3787:3789] CHIP:DMG: - [1702414315.314057][3787:3789] CHIP:DMG: InteractionModelRevision = 11 - [1702414315.314106][3787:3789] CHIP:DMG: }, - [1702414315.314254][3787:3789] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0003 Status=0x81 - [1702414315.314359][3787:3789] CHIP:TOO: Error: IM Error 0x00000581: General error: 0x81 (UNSUPPORTED_COMMAND) - disabled: true + - label: "Wait for the PromisedActiveDuration to end" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: ActiveDuration + + - label: + "TH sends StayActiveRequest command with StayActiveDuration less than 30000 milliseconds." + command: "StayActiveRequest" + arguments: + values: + - name: "StayActiveDuration" + value: 20000 + response: + values: + - name: "PromisedActiveDuration" + constraints: + type: int32u + minValue: 20000 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index a96ef4aebc8fff..1e2410650bf1bc 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -71,7 +71,8 @@ "IcdManagement": [ "TestIcdManagementCluster", "Test_TC_ICDM_1_1", - "Test_TC_ICDM_3_4" + "Test_TC_ICDM_3_4", + "Test_TC_ICDM_4_1" ], "Identify": ["Test_TC_I_2_1", "Test_TC_I_2_2", "Test_TC_I_2_3"], "IlluminanceMeasurement": ["Test_TC_ILL_2_1", "Test_TC_ILL_2_2"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index bbb86f7092b715..e246001c590c29 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -119,7 +119,6 @@ "Identify": ["Test_TC_I_3_2"], "IcdManagement": [ "Test_TC_ICDM_3_2", - "Test_TC_ICDM_4_1", "Test_TC_ICDM_5_1" ], "IlluminanceMeasurement": [], From a5e39f37edb010765d550687545bacfbb6f5eca0 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 6 Aug 2024 14:36:18 +0000 Subject: [PATCH 2/5] Restyled by whitespace --- src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml index 20e146ad3806ab..a66ffd339c0fed 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml @@ -56,7 +56,7 @@ tests: values: - name: "ms" value: ActiveDuration - + - label: "TH sends StayActiveRequest command with StayActiveDuration less than 30000 milliseconds." command: "StayActiveRequest" From 711ef5bac01925258dee40855bf7afe762c07289 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 6 Aug 2024 14:36:20 +0000 Subject: [PATCH 3/5] Restyled by prettier-json --- src/app/tests/suites/manualTests.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index e246001c590c29..5edf1cbe71a264 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -117,10 +117,7 @@ "GeneralCommissioning": ["Test_TC_CGEN_2_2"], "GeneralDiagnostics": ["Test_TC_DGGEN_2_2"], "Identify": ["Test_TC_I_3_2"], - "IcdManagement": [ - "Test_TC_ICDM_3_2", - "Test_TC_ICDM_5_1" - ], + "IcdManagement": ["Test_TC_ICDM_3_2", "Test_TC_ICDM_5_1"], "IlluminanceMeasurement": [], "InteractionDataModel": [ "Test_TC_IDM_1_1", From e7257ed653be2d65e3081ecaf2dd74deb543ebb8 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 6 Aug 2024 14:36:22 +0000 Subject: [PATCH 4/5] Restyled by prettier-yaml --- src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml index a66ffd339c0fed..4b31943584800a 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml @@ -58,7 +58,8 @@ tests: value: ActiveDuration - label: - "TH sends StayActiveRequest command with StayActiveDuration less than 30000 milliseconds." + "TH sends StayActiveRequest command with StayActiveDuration less than + 30000 milliseconds." command: "StayActiveRequest" arguments: values: From 0e979f77bfbaf6c7415e707c16fdaec3d929edc5 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Tue, 6 Aug 2024 14:38:49 -0400 Subject: [PATCH 5/5] Add a slight tolerance to avoid false negatives --- src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml index 4b31943584800a..3539da03333a5f 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_4_1.yaml @@ -47,7 +47,7 @@ tests: saveAs: ActiveDuration constraints: type: int32u - minValue: 30000 + minValue: 29995 - label: "Wait for the PromisedActiveDuration to end" cluster: "DelayCommands" @@ -70,4 +70,4 @@ tests: - name: "PromisedActiveDuration" constraints: type: int32u - minValue: 20000 + minValue: 19995