diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 528323915f6cd4..fab5e7ddc07e5b 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -61,9 +61,9 @@ jobs: --enable-flashbundle \ --target tizen-arm-all-clusters \ --target tizen-arm-all-clusters-minimal-no-wifi \ - --target chip-tool-ubsan \ - --target light \ - --target light-no-ble-no-wifi \ + --target tizen-arm-chip-tool-ubsan \ + --target tizen-arm-light \ + --target tizen-arm-light-no-ble-no-wifi \ build \ --copy-artifacts-to out/artifacts \ " diff --git a/.gitmodules b/.gitmodules index 74addf59b3d0d7..048d1f48b7734b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -293,4 +293,4 @@ [submodule "third_party/libwebsockets/repo"] path = third_party/libwebsockets/repo url = https://github.com/warmcat/libwebsockets - platforms = linux,darwin + platforms = linux,darwin,tizen diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 18819d7ccec204..98bff77d169c2f 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -28,6 +28,7 @@ "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", "Test_TC_ACL_2_8", - "Test_TC_ACL_2_9" + "Test_TC_ACL_2_9", + "Test_TC_ACL_2_10" ] } diff --git a/examples/lighting-app/silabs/efr32/src/AppTask.cpp b/examples/lighting-app/silabs/efr32/src/AppTask.cpp index e061e40099cb38..b638a93bec8723 100644 --- a/examples/lighting-app/silabs/efr32/src/AppTask.cpp +++ b/examples/lighting-app/silabs/efr32/src/AppTask.cpp @@ -44,7 +44,7 @@ #include #ifdef ENABLE_WSTK_LEDS -#if SL_STATUS_LED +#if defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) #define LIGHT_LED &sl_led_led1 #else #define LIGHT_LED &sl_led_led0 diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 2cea929d311392..2a505b5fa74961 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -22,7 +22,8 @@ "Test_TC_OCC_2_2_Simulated", "Test_TC_OCC_2_4_Simulated", "Test_TC_ULABEL_3_1_Simulated", - "Test_TC_FLABEL_3_1_Simulated" + "Test_TC_FLABEL_3_1_Simulated", + "Test_TC_LTIME_1_1_Simulated" ], "collection": ["Test"] } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index a450e3060fa3ba..e4607579a70638 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -570,6 +570,34 @@ server cluster LocalizationConfiguration = 43 { readonly attribute int16u clusterRevision = 65533; } +server cluster TimeFormatLocalization = 44 { + enum CalendarType : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormat : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormat hourFormat = 0; + attribute CalendarType activeCalendarType = 1; + readonly attribute CalendarType supportedCalendarTypes[] = 2; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + client cluster UnitLocalization = 45 { enum TempUnit : ENUM8 { kFahrenheit = 0; @@ -2805,6 +2833,14 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster TimeFormatLocalization { + callback attribute hourFormat; + callback attribute activeCalendarType; + callback attribute supportedCalendarTypes; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster PowerSourceConfiguration { callback attribute sources; ram attribute featureMap; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 97bb36fb1b1997..1a8bab34c8582e 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -920,6 +920,122 @@ } ] }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 28dd9286eddd09..8bef18bf0df71a 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -563,6 +563,34 @@ server cluster LocalizationConfiguration = 43 { readonly attribute int16u clusterRevision = 65533; } +server cluster TimeFormatLocalization = 44 { + enum CalendarType : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormat : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormat hourFormat = 0; + attribute CalendarType activeCalendarType = 1; + readonly attribute CalendarType supportedCalendarTypes[] = 2; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster UnitLocalization = 45 { enum TempUnit : ENUM8 { kFahrenheit = 0; @@ -2789,6 +2817,14 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster TimeFormatLocalization { + callback attribute hourFormat; + callback attribute activeCalendarType; + callback attribute supportedCalendarTypes; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster UnitLocalization { ram attribute temperatureUnit; ram attribute featureMap; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 1410b0308db2d0..1c98dbc98892d6 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -920,6 +920,122 @@ } ] }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Localization Configuration", "code": 43, diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp index 6dc133e3330b3f..648f192087fd80 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/efr32/BaseApplication.cpp @@ -25,7 +25,7 @@ #include "AppEvent.h" #include "AppTask.h" -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) #include "LEDWidget.h" #include "sl_simple_led_instances.h" #endif // ENABLE_WSTK_LEDS @@ -74,7 +74,7 @@ #define APP_EVENT_QUEUE_SIZE 10 #define EXAMPLE_VENDOR_ID 0xcafe -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) #define SYSTEM_STATE_LED &sl_led_led0 #endif // ENABLE_WSTK_LEDS #ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT @@ -96,7 +96,7 @@ TimerHandle_t sLightTimer; TaskHandle_t sAppTaskHandle; QueueHandle_t sAppEventQueue; -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) LEDWidget sStatusLED; #endif // ENABLE_WSTK_LEDS @@ -212,7 +212,7 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) SILABS_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) LEDWidget::InitGpio(); sStatusLED.Init(SYSTEM_STATE_LED); #endif // ENABLE_WSTK_LEDS @@ -273,7 +273,7 @@ void BaseApplication::FunctionEventHandler(AppEvent * aEvent) mFunction = kFunction_FactoryReset; -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) // Turn off all LEDs before starting blink to make sure blink is // co-ordinated. sStatusLED.Set(false); @@ -334,7 +334,7 @@ void BaseApplication::LightEventHandler() { if ((gIdentifyptr != nullptr) && (gIdentifyptr->mActive)) { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(250, 250); #endif // ENABLE_WSTK_LEDS } @@ -342,19 +342,19 @@ void BaseApplication::LightEventHandler() { if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(50, 50); #endif // ENABLE_WSTK_LEDS } if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(1000, 1000); #endif // ENABLE_WSTK_LEDS } if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(300, 700); #endif // ENABLE_WSTK_LEDS } @@ -364,33 +364,33 @@ void BaseApplication::LightEventHandler() { if (sIsAttached) { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Set(true); #endif // ENABLE_WSTK_LEDS } else { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(950, 50); #endif } } else if (sHaveBLEConnections) { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(100, 100); #endif // ENABLE_WSTK_LEDS } else { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(50, 950); #endif // ENABLE_WSTK_LEDS } #endif // CHIP_DEVICE_CONFIG_ENABLE_SED } -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Animate(); #endif // ENABLE_WSTK_LEDS } @@ -504,7 +504,7 @@ void BaseApplication::StartStatusLEDTimer() void BaseApplication::StopStatusLEDTimer() { -#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED +#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Set(false); #endif // ENABLE_WSTK_LEDS diff --git a/scripts/build/build_examples.py b/scripts/build/build_examples.py index 14439f32289376..c70a5da7981d49 100755 --- a/scripts/build/build_examples.py +++ b/scripts/build/build_examples.py @@ -20,11 +20,11 @@ import click import coloredlogs - -import build from builders.builder import BuilderOptions from runner import PrintOnlyRunner, ShellRunner +import build + sys.path.append(os.path.abspath(os.path.dirname(__file__))) @@ -59,6 +59,18 @@ def ValidateRepoPath(context, parameter, value): return value +def ValidateTargetNames(context, parameter, values): + """ + Validates that the given target name is valid. + """ + for value in values: + if not any(target.StringIntoTargetParts(value.lower()) + for target in build.targets.BUILD_TARGETS): + raise click.BadParameter( + "'%s' is not a valid target name." % value) + return values + + @click.group(chain=True) @click.option( '--log-level', @@ -69,6 +81,7 @@ def ValidateRepoPath(context, parameter, value): '--target', default=[], multiple=True, + callback=ValidateTargetNames, help='Build target(s)' ) @click.option( diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index cef97a1328f93e..2067fd1acbdc26 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -14,6 +14,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/nlio.gni") +import("${chip_root}/src/platform/device.gni") import("${chip_root}/build/chip/buildconfig_header.gni") import("common_flags.gni") @@ -50,6 +51,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_IM_FORCE_FABRIC_QUOTA_CHECK=${chip_im_force_fabric_quota_check}", "CHIP_CONFIG_ENABLE_SESSION_RESUMPTION=${chip_enable_session_resumption}", "CHIP_CONFIG_ACCESS_CONTROL_POLICY_LOGGING_VERBOSITY=${chip_access_control_policy_logging_verbosity}", + "CHIP_CONFIG_PERSIST_SUBSCRIPTIONS=${chip_persist_subscriptions}", ] } @@ -173,8 +175,6 @@ static_library("app") { "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", - "SimpleSubscriptionResumptionStorage.cpp", - "SimpleSubscriptionResumptionStorage.h", "StatusResponse.cpp", "StatusResponse.h", "SubscriptionResumptionStorage.h", @@ -189,6 +189,13 @@ static_library("app") { "reporting/reporting.h", ] + if (chip_persist_subscriptions) { + sources += [ + "SimpleSubscriptionResumptionStorage.cpp", + "SimpleSubscriptionResumptionStorage.h", + ] + } + public_deps = [ ":app_config", "${chip_root}/src/access", diff --git a/src/app/SimpleSubscriptionResumptionStorage.cpp b/src/app/SimpleSubscriptionResumptionStorage.cpp index 1f51f751639522..f6f96978d5ba9d 100644 --- a/src/app/SimpleSubscriptionResumptionStorage.cpp +++ b/src/app/SimpleSubscriptionResumptionStorage.cpp @@ -23,9 +23,6 @@ #include -// TODO: move the conditional compilation into BUILD.gn config options -#if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - #include #include #include @@ -469,5 +466,3 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::DeleteAll(FabricIndex fabricInde } // namespace app } // namespace chip - -#endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS diff --git a/src/app/SimpleSubscriptionResumptionStorage.h b/src/app/SimpleSubscriptionResumptionStorage.h index 95efa2d032aac8..7cd6a0a98b49d8 100644 --- a/src/app/SimpleSubscriptionResumptionStorage.h +++ b/src/app/SimpleSubscriptionResumptionStorage.h @@ -25,9 +25,6 @@ #include -// TODO: move the conditional compilation into BUILD.gn config options -#if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - #include #include #include @@ -141,5 +138,3 @@ class SimpleSubscriptionResumptionStorage : public SubscriptionResumptionStorage }; } // namespace app } // namespace chip - -#endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index b2f023b3eb2db0..cc509b5ba7c952 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -105,7 +105,6 @@ chip_test_suite("tests") { "TestPendingNotificationMap.cpp", "TestReadInteraction.cpp", "TestReportingEngine.cpp", - "TestSimpleSubscriptionResumptionStorage.cpp", "TestStatusIB.cpp", "TestStatusResponseMessage.cpp", "TestTimedHandler.cpp", @@ -147,4 +146,8 @@ chip_test_suite("tests") { test_sources += [ "TestCommissionManager.cpp" ] public_deps += [ "${chip_root}/src/app/server" ] } + + if (chip_persist_subscriptions) { + test_sources += [ "TestSimpleSubscriptionResumptionStorage.cpp" ] + } } diff --git a/src/app/tests/TestSimpleSubscriptionResumptionStorage.cpp b/src/app/tests/TestSimpleSubscriptionResumptionStorage.cpp index 67b1f0757d7b14..5497fff30e2dd2 100644 --- a/src/app/tests/TestSimpleSubscriptionResumptionStorage.cpp +++ b/src/app/tests/TestSimpleSubscriptionResumptionStorage.cpp @@ -18,8 +18,6 @@ #include #include -#if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - #include #include @@ -468,15 +466,3 @@ int TestSimpleSubscriptionResumptionStorage() } CHIP_REGISTER_TEST_SUITE(TestSimpleSubscriptionResumptionStorage) - -#else // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - -/** - * Main - */ -int TestSimpleSubscriptionResumptionStorage() -{ - return 0; -} - -#endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml index 1e3993f4f7d72b..b340eaad4a8280 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml @@ -13,523 +13,340 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 131.2.10. [TC-ACL-2.10] Persistence +name: 133.2.3. [TC-ACL-2.10] Extension attribute PICS: - ACL.S config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Access Control" endpoint: 0 + nodeId2: + type: node_id + defaultValue: 0xCAFE + TH1CommissionerNodeId: + type: node_id + defaultValue: 112233 + TH2CommissionerNodeId: + type: node_id + defaultValue: 112233 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + D_OK_EMPTY: + type: octet_string + defaultValue: "hex:1718" + D_OK_SINGLE: + type: octet_string + defaultValue: "hex:17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" tests: - - label: "Pre-Conditions" - verification: | - 1.N1 is the node ID of TH1 - - 2.N2 is the node ID of TH2 - - 2.D_OK_EMPTY:"1718" which is an octstr of length 2 containing valid TLV: - - - top-level anonymous list (empty) - 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: - - - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - 4.Need to reboot on step 5 - Follow the below procedure for rebooting (Only applicable on raspi) - 1. create a file using touch command , something like touch suraj.txt - 2. chmod 777 suraj.txt - 3. launch the app ./chip-all-clusters-app --wifi --KVS ./suraj.txt - disabled: true - - - label: "TH1 commissions DUT using admin node ID N1" - verification: | - DUT is commissioned on TH1 fabric - disabled: true + - label: "Step 1:Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: - "TH1 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 - [1658329512.220471][3036:3041] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 - [1658329512.220529][3036:3041] CHIP:TOO: CurrentFabricIndex: 1 - [1658329512.220601][3036:3041] CHIP:EM: Sending Standalone Ack for MessageCounter:23447431 on exchange 2287i - disabled: true + "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex + attribute" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1FabricIndex - label: - "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin - node ID N2" - verification: | - Open a commissioning window On TH1(Chiptool)using below command - - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - - [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 - [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device - [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] - [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 - [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success - disabled: true + "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT + using admin node ID N2" + cluster: "Administrator Commissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: "TH2 starts a commissioning process with DUT" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT is commissioned by TH2 on Fabric ID2 " + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - label: - "TH2 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH2(Chiptool), verify to CurrentFabricIndex attribute of operationalCredential cluster as 2 - - 1658329570.828165][4563:4568] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 - [1658329570.831838][4563:4568] CHIP:TOO: CurrentFabricIndex: 2 - [1658329570.831929][4563:4568] CHIP:EM: Sending Standalone Ack for MessageCounter:4928928 on exchange 29185i - disabled: true + "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex + attribute" + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1, 1111] Targets field: null 2.struct Privilege field: - Operate (3) AuthMode field: Group (3) Subjects field: [3333] Targets - field: null" + "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects":[3333] , "targets": null}]" 1 0 - On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements - - [1658329787.635523][3056:3061] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658329787.635615][3056:3061] CHIP:DMG: WriteResponseMessage = - [1658329787.635661][3056:3061] CHIP:DMG: { - [1658329787.635701][3056:3061] CHIP:DMG: AttributeStatusIBs = - [1658329787.635758][3056:3061] CHIP:DMG: [ - [1658329787.635804][3056:3061] CHIP:DMG: AttributeStatusIB = - [1658329787.635864][3056:3061] CHIP:DMG: { - [1658329787.635913][3056:3061] CHIP:DMG: AttributePathIB = - [1658329787.635971][3056:3061] CHIP:DMG: { - [1658329787.636030][3056:3061] CHIP:DMG: Endpoint = 0x0, - [1658329787.636093][3056:3061] CHIP:DMG: Cluster = 0x1f, - [1658329787.636157][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, - [1658329787.636216][3056:3061] CHIP:DMG: } - [1658329787.636280][3056:3061] CHIP:DMG: - [1658329787.636334][3056:3061] CHIP:DMG: StatusIB = - [1658329787.636395][3056:3061] CHIP:DMG: { - [1658329787.636452][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329787.636509][3056:3061] CHIP:DMG: }, - [1658329787.636566][3056:3061] CHIP:DMG: - [1658329787.636613][3056:3061] CHIP:DMG: }, - [1658329787.636678][3056:3061] CHIP:DMG: - [1658329787.636723][3056:3061] CHIP:DMG: AttributeStatusIB = - [1658329787.636774][3056:3061] CHIP:DMG: { - [1658329787.636822][3056:3061] CHIP:DMG: AttributePathIB = - [1658329787.636880][3056:3061] CHIP:DMG: { - [1658329787.636937][3056:3061] CHIP:DMG: Endpoint = 0x0, - [1658329787.636998][3056:3061] CHIP:DMG: Cluster = 0x1f, - [1658329787.637066][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, - [1658329787.637131][3056:3061] CHIP:DMG: ListIndex = Null, - [1658329787.637194][3056:3061] CHIP:DMG: } - [1658329787.637263][3056:3061] CHIP:DMG: - [1658329787.637319][3056:3061] CHIP:DMG: StatusIB = - [1658329787.637376][3056:3061] CHIP:DMG: { - [1658329787.637626][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329787.637691][3056:3061] CHIP:DMG: }, - [1658329787.637750][3056:3061] CHIP:DMG: - [1658329787.637801][3056:3061] CHIP:DMG: }, - [1658329787.637868][3056:3061] CHIP:DMG: - [1658329787.637913][3056:3061] CHIP:DMG: AttributeStatusIB = - [1658329787.637966][3056:3061] CHIP:DMG: { - [1658329787.638017][3056:3061] CHIP:DMG: AttributePathIB = - [1658329787.638074][3056:3061] CHIP:DMG: { - [1658329787.638131][3056:3061] CHIP:DMG: Endpoint = 0x0, - [1658329787.638193][3056:3061] CHIP:DMG: Cluster = 0x1f, - [1658329787.638256][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, - [1658329787.638322][3056:3061] CHIP:DMG: ListIndex = Null, - [1658329787.638382][3056:3061] CHIP:DMG: } - [1658329787.638444][3056:3061] CHIP:DMG: - [1658329787.638505][3056:3061] CHIP:DMG: StatusIB = - [1658329787.638562][3056:3061] CHIP:DMG: { - [1658329787.638639][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329787.638698][3056:3061] CHIP:DMG: }, - [1658329787.638754][3056:3061] CHIP:DMG: - [1658329787.638801][3056:3061] CHIP:DMG: }, - [1658329787.638854][3056:3061] CHIP:DMG: - [1658329787.638899][3056:3061] CHIP:DMG: ], - [1658329787.638965][3056:3061] CHIP:DMG: - [1658329787.639009][3056:3061] CHIP:DMG: InteractionModelRevision = 1 - [1658329787.639053][3056:3061] CHIP:DMG: } - [1658329787.639281][3056:3061] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658329787.639370][3056:3061] CHIP:EM: Sending Standalone Ack for MessageCounter:32017076 on exchange 14424i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [3333], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N2, 2222] Targets field: null 2.struct Privilege field: - Operate (3) AuthMode field: Group (3) Subjects field: [4444] Targets - field: null" + "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects":[4444] , "targets": null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - - - On TH2(Chiptool), Verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 2 elements - - - [1658329868.113411][4587:4592] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658329868.113469][4587:4592] CHIP:DMG: WriteResponseMessage = - [1658329868.113496][4587:4592] CHIP:DMG: { - [1658329868.113537][4587:4592] CHIP:DMG: AttributeStatusIBs = - [1658329868.113568][4587:4592] CHIP:DMG: [ - [1658329868.113602][4587:4592] CHIP:DMG: AttributeStatusIB = - [1658329868.113646][4587:4592] CHIP:DMG: { - [1658329868.113672][4587:4592] CHIP:DMG: AttributePathIB = - [1658329868.113712][4587:4592] CHIP:DMG: { - [1658329868.113745][4587:4592] CHIP:DMG: Endpoint = 0x0, - [1658329868.113788][4587:4592] CHIP:DMG: Cluster = 0x1f, - [1658329868.113833][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, - [1658329868.113868][4587:4592] CHIP:DMG: } - [1658329868.113914][4587:4592] CHIP:DMG: - [1658329868.113951][4587:4592] CHIP:DMG: StatusIB = - [1658329868.113984][4587:4592] CHIP:DMG: { - [1658329868.114028][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329868.114091][4587:4592] CHIP:DMG: }, - [1658329868.114124][4587:4592] CHIP:DMG: - [1658329868.114160][4587:4592] CHIP:DMG: }, - [1658329868.114197][4587:4592] CHIP:DMG: - [1658329868.114229][4587:4592] CHIP:DMG: AttributeStatusIB = - [1658329868.114266][4587:4592] CHIP:DMG: { - [1658329868.114294][4587:4592] CHIP:DMG: AttributePathIB = - [1658329868.114335][4587:4592] CHIP:DMG: { - [1658329868.114367][4587:4592] CHIP:DMG: Endpoint = 0x0, - [1658329868.114411][4587:4592] CHIP:DMG: Cluster = 0x1f, - [1658329868.114458][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, - [1658329868.114491][4587:4592] CHIP:DMG: ListIndex = Null, - [1658329868.114529][4587:4592] CHIP:DMG: } - [1658329868.114563][4587:4592] CHIP:DMG: - [1658329868.114604][4587:4592] CHIP:DMG: StatusIB = - [1658329868.114645][4587:4592] CHIP:DMG: { - [1658329868.114677][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329868.114716][4587:4592] CHIP:DMG: }, - [1658329868.114747][4587:4592] CHIP:DMG: - [1658329868.114782][4587:4592] CHIP:DMG: }, - [1658329868.114826][4587:4592] CHIP:DMG: - [1658329868.114850][4587:4592] CHIP:DMG: AttributeStatusIB = - [1658329868.114884][4587:4592] CHIP:DMG: { - [1658329868.114910][4587:4592] CHIP:DMG: AttributePathIB = - [1658329868.114948][4587:4592] CHIP:DMG: { - [1658329868.114980][4587:4592] CHIP:DMG: Endpoint = 0x0, - [1658329868.115024][4587:4592] CHIP:DMG: Cluster = 0x1f, - [1658329868.115067][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, - [1658329868.115102][4587:4592] CHIP:DMG: ListIndex = Null, - [1658329868.115145][4587:4592] CHIP:DMG: } - [1658329868.115188][4587:4592] CHIP:DMG: - [1658329868.115222][4587:4592] CHIP:DMG: StatusIB = - [1658329868.115260][4587:4592] CHIP:DMG: { - [1658329868.115291][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329868.115333][4587:4592] CHIP:DMG: }, - [1658329868.115371][4587:4592] CHIP:DMG: - [1658329868.115398][4587:4592] CHIP:DMG: }, - [1658329868.115438][4587:4592] CHIP:DMG: - [1658329868.115463][4587:4592] CHIP:DMG: ], - [1658329868.115507][4587:4592] CHIP:DMG: - [1658329868.115531][4587:4592] CHIP:DMG: InteractionModelRevision = 1 - [1658329868.115565][4587:4592] CHIP:DMG: } - [1658329868.115702][4587:4592] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658329868.115764][4587:4592] CHIP:EM: Sending Standalone Ack for MessageCounter:240702602 on exchange 57878i - disabled: true + identity: "beta" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [4444], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, - value is list of AccessControlExtensionStruct containing 1 element 1. - struct Data field: D_OK_EMPTY" + "Step 7:TH1 writes DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element 1.struct, Data field: D_OK_EMPTY" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 - On TH1(Chiptool) , Verify Successfully to extension attribute list containg one element - [1658330105.863185][3079:3084] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658330105.863237][3079:3084] CHIP:DMG: WriteResponseMessage = - [1658330105.863262][3079:3084] CHIP:DMG: { - [1658330105.863284][3079:3084] CHIP:DMG: AttributeStatusIBs = - [1658330105.863315][3079:3084] CHIP:DMG: [ - [1658330105.863339][3079:3084] CHIP:DMG: AttributeStatusIB = - [1658330105.863367][3079:3084] CHIP:DMG: { - [1658330105.863393][3079:3084] CHIP:DMG: AttributePathIB = - [1658330105.863428][3079:3084] CHIP:DMG: { - [1658330105.863460][3079:3084] CHIP:DMG: Endpoint = 0x0, - [1658330105.863495][3079:3084] CHIP:DMG: Cluster = 0x1f, - [1658330105.863529][3079:3084] CHIP:DMG: Attribute = 0x0000_0001, - [1658330105.863589][3079:3084] CHIP:DMG: } - [1658330105.863670][3079:3084] CHIP:DMG: - [1658330105.863745][3079:3084] CHIP:DMG: StatusIB = - [1658330105.863812][3079:3084] CHIP:DMG: { - [1658330105.863877][3079:3084] CHIP:DMG: status = 0x00 (SUCCESS), - [1658330105.863945][3079:3084] CHIP:DMG: }, - [1658330105.864010][3079:3084] CHIP:DMG: - [1658330105.864068][3079:3084] CHIP:DMG: }, - [1658330105.864146][3079:3084] CHIP:DMG: - [1658330105.864197][3079:3084] CHIP:DMG: AttributeStatusIB = - [1658330105.864257][3079:3084] CHIP:DMG: { - [1658330105.864315][3079:3084] CHIP:DMG: AttributePathIB = - [1658330105.864379][3079:3084] CHIP:DMG: { - [1658330105.864444][3079:3084] CHIP:DMG: Endpoint = 0x0, - [1658330105.864516][3079:3084] CHIP:DMG: Cluster = 0x1f, - [1658330105.864592][3079:3084] CHIP:DMG: Attribute = 0x0000_0001, - [1658330105.864669][3079:3084] CHIP:DMG: ListIndex = Null, - [1658330105.864736][3079:3084] CHIP:DMG: } - [1658330105.864808][3079:3084] CHIP:DMG: - [1658330105.864871][3079:3084] CHIP:DMG: StatusIB = - [1658330105.864936][3079:3084] CHIP:DMG: { - [1658330105.865001][3079:3084] CHIP:DMG: status = 0x00 (SUCCESS), - [1658330105.865068][3079:3084] CHIP:DMG: }, - [1658330105.865134][3079:3084] CHIP:DMG: - [1658330105.865188][3079:3084] CHIP:DMG: }, - [1658330105.865251][3079:3084] CHIP:DMG: - [1658330105.865302][3079:3084] CHIP:DMG: ], - [1658330105.865370][3079:3084] CHIP:DMG: - [1658330105.865421][3079:3084] CHIP:DMG: InteractionModelRevision = 1 - [1658330105.865472][3079:3084] CHIP:DMG: } - [1658330105.865672][3079:3084] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658330105.865769][3079:3084] CHIP:EM: Sending Standalone Ack for MessageCounter:104745751 on exchange 216i - disabled: true + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }] - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute - value is list of AccessControlExtensionStruct containing 1 element - 1.struct Data field: D_OK_SINGLE" + "Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element 1.struct, Data field: D_OK_SINGLE" + identity: "beta" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - - On TH2(Chiptool), Verify Successfully extension attribute list containg one element . + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }] - [1658819083.842765][8349:8354] CHIP:EM: Removed CHIP MessageCounter:249057275 from RetransTable on exchange 59888i - [1658819083.842800][8349:8354] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658819083.842907][8349:8354] CHIP:DMG: WriteResponseMessage = - [1658819083.842939][8349:8354] CHIP:DMG: { - [1658819083.842963][8349:8354] CHIP:DMG: AttributeStatusIBs = - [1658819083.843000][8349:8354] CHIP:DMG: [ - [1658819083.843026][8349:8354] CHIP:DMG: AttributeStatusIB = - [1658819083.843057][8349:8354] CHIP:DMG: { - [1658819083.843086][8349:8354] CHIP:DMG: AttributePathIB = - [1658819083.843120][8349:8354] CHIP:DMG: { - [1658819083.843161][8349:8354] CHIP:DMG: Endpoint = 0x0, - [1658819083.843201][8349:8354] CHIP:DMG: Cluster = 0x1f, - [1658819083.843242][8349:8354] CHIP:DMG: Attribute = 0x0000_0001, - [1658819083.843277][8349:8354] CHIP:DMG: } - [1658819083.843319][8349:8354] CHIP:DMG: - [1658819083.843355][8349:8354] CHIP:DMG: StatusIB = - [1658819083.843393][8349:8354] CHIP:DMG: { - [1658819083.843431][8349:8354] CHIP:DMG: status = 0x00 (SUCCESS), - [1658819083.843466][8349:8354] CHIP:DMG: }, - [1658819083.843504][8349:8354] CHIP:DMG: - [1658819083.843534][8349:8354] CHIP:DMG: }, - [1658819083.843575][8349:8354] CHIP:DMG: - [1658819083.843604][8349:8354] CHIP:DMG: AttributeStatusIB = - [1658819083.843636][8349:8354] CHIP:DMG: { - [1658819083.843666][8349:8354] CHIP:DMG: AttributePathIB = - [1658819083.843700][8349:8354] CHIP:DMG: { - [1658819083.843734][8349:8354] CHIP:DMG: Endpoint = 0x0, - [1658819083.843774][8349:8354] CHIP:DMG: Cluster = 0x1f, - [1658819083.843814][8349:8354] CHIP:DMG: Attribute = 0x0000_0001, - [1658819083.843853][8349:8354] CHIP:DMG: ListIndex = Null, - [1658819083.843888][8349:8354] CHIP:DMG: } - [1658819083.843926][8349:8354] CHIP:DMG: - [1658819083.843962][8349:8354] CHIP:DMG: StatusIB = - [1658819083.843996][8349:8354] CHIP:DMG: { - [1658819083.844030][8349:8354] CHIP:DMG: status = 0x00 (SUCCESS), - [1658819083.844065][8349:8354] CHIP:DMG: }, - [1658819083.844103][8349:8354] CHIP:DMG: - [1658819083.844133][8349:8354] CHIP:DMG: }, - [1658819083.844168][8349:8354] CHIP:DMG: - [1658819083.844194][8349:8354] CHIP:DMG: ], - [1658819083.844230][8349:8354] CHIP:DMG: - [1658819083.844256][8349:8354] CHIP:DMG: InteractionModelRevision = 1 - [1658819083.844282][8349:8354] CHIP:DMG: } - [1658819083.844389][8349:8354] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658819083.844452][8349:8354] CHIP:EM: Sending Standalone Ack for MessageCounter:27055873 on exchange 59888i - disabled: true + - label: "Step 9: Reboot DUT" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "Reboot" - - label: "Reboot the DUT" + - label: "Step 9: Reboot DUT" verification: | - Follow the below procedure for rebooting (Only applicable on raspi) - - - Kill DUT and launch again, without commission follow the next steps - - And in this step use kill DUT and launch again, without commission follow the next steps - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Reboot the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "TH1 Connects to the device again" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH2 Connects to the device again" + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 - - [1657289627.393651][5251:5256] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 - [1657289627.393731][5251:5256] CHIP:TOO: ACL: 2 entries - [1657289627.393798][5251:5256] CHIP:TOO: [1]: { - [1657289627.393858][5251:5256] CHIP:TOO: Privilege: 5 - [1657289627.393889][5251:5256] CHIP:TOO: AuthMode: 2 - [1657289627.393935][5251:5256] CHIP:TOO: Subjects: 2 entries - [1657289627.393970][5251:5256] CHIP:TOO: [1]: 112233 - [1657289627.394013][5251:5256] CHIP:TOO: [2]: 1111 - [1657289627.394044][5251:5256] CHIP:TOO: Targets: null - [1657289627.394085][5251:5256] CHIP:TOO: FabricIndex: 1 - [1657289627.394110][5251:5256] CHIP:TOO: } - [1657289627.394157][5251:5256] CHIP:TOO: [2]: { - [1657289627.394183][5251:5256] CHIP:TOO: Privilege: 3 - [1657289627.394212][5251:5256] CHIP:TOO: AuthMode: 3 - [1657289627.394243][5251:5256] CHIP:TOO: Subjects: 1 entries - [1657289627.394286][5251:5256] CHIP:TOO: [1]: 3333 - [1657289627.394318][5251:5256] CHIP:TOO: Targets: null - [1657289627.394356][5251:5256] CHIP:TOO: FabricIndex: 1 - [1657289627.394385][5251:5256] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [3333], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 11:TH1 resds DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 1 0 - On TH1(Chiptool) , Verify Successfully AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 - - - [1657289676.947323][5260:5265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 - [1657289676.947388][5260:5265] CHIP:TOO: Extension: 1 entries - [1657289676.947438][5260:5265] CHIP:TOO: [1]: { - [1657289676.947467][5260:5265] CHIP:TOO: Data: 1718 - [1657289676.947504][5260:5265] CHIP:TOO: FabricIndex: 1 - [1657289676.947528][5260:5265] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }] - - label: "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F1 - - - [1657289713.626327][19279:19284] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 - [1657289713.626381][19279:19284] CHIP:TOO: ACL: 2 entries - [1657289713.626417][19279:19284] CHIP:TOO: [1]: { - [1657289713.626431][19279:19284] CHIP:TOO: Privilege: 5 - [1657289713.626443][19279:19284] CHIP:TOO: AuthMode: 2 - [1657289713.626457][19279:19284] CHIP:TOO: Subjects: 2 entries - [1657289713.626472][19279:19284] CHIP:TOO: [1]: 223344 - [1657289713.626485][19279:19284] CHIP:TOO: [2]: 2222 - [1657289713.626497][19279:19284] CHIP:TOO: Targets: null - [1657289713.626508][19279:19284] CHIP:TOO: FabricIndex: 2 - [1657289713.626519][19279:19284] CHIP:TOO: } - [1657289713.626537][19279:19284] CHIP:TOO: [2]: { - [1657289713.626547][19279:19284] CHIP:TOO: Privilege: 3 - [1657289713.626556][19279:19284] CHIP:TOO: AuthMode: 3 - [1657289713.626568][19279:19284] CHIP:TOO: Subjects: 1 entries - [1657289713.626580][19279:19284] CHIP:TOO: [1]: 4444 - [1657289713.626591][19279:19284] CHIP:TOO: Targets: null - [1657289713.626601][19279:19284] CHIP:TOO: FabricIndex: 2 - [1657289713.626611][19279:19284] CHIP:TOO: } - disabled: true + identity: "beta" + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [4444], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + ] - label: - "TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension + attribute" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool) , Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 - - [1657289746.737641][19293:19298] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 - [1657289746.737713][19293:19298] CHIP:TOO: Extension: 1 entries - [1657289746.737778][19293:19298] CHIP:TOO: [1]: { - [1657289746.737803][19293:19298] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1657289746.737844][19293:19298] CHIP:TOO: FabricIndex: 2 - [1657289746.737862][19293:19298] CHIP:TOO: } - disabled: true + identity: "beta" + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }] - label: - "If DUT is an app on host, examine persistent storage in /tmp/chip_kvs - text file" + "Step 14: If DUT is an app on host, examine persistent storage in + /tmp/chip_kvs text file" verification: | sudo vi kvs text file - disabled: true - - - label: "TH1 removes fabric F2 from DUT" - verification: | - ./chip-tool operationalcredentials remove-fabric 2 1 0 - + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 15:TH1 removes fabric F2 from DUT" + PICS: OPCREDS.S.C0a.Rsp + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex - On TH1(Chiptool), Verify successfully removed fabric F2 with statusCode as 0(Success) - - [1661404505.702969][18706:18711] CHIP:DMG: - [1661404505.702979][18706:18711] CHIP:DMG: InteractionModelRevision = 1 - [1661404505.702987][18706:18711] CHIP:DMG: }, - [1661404505.703020][18706:18711] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1661404505.703047][18706:18711] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - [1661404505.703081][18706:18711] CHIP:TOO: NOCResponse: { - [1661404505.703104][18706:18711] CHIP:TOO: statusCode: 0 - [1661404505.703126][18706:18711] CHIP:TOO: fabricIndex: 2 - [1661404505.703139][18706:18711] CHIP:TOO: } - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 - - - - [1657289848.956276][5274:5279] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 - [1657289848.956366][5274:5279] CHIP:TOO: ACL: 2 entries - [1657289848.956445][5274:5279] CHIP:TOO: [1]: { - [1657289848.956502][5274:5279] CHIP:TOO: Privilege: 5 - [1657289848.956538][5274:5279] CHIP:TOO: AuthMode: 2 - [1657289848.956578][5274:5279] CHIP:TOO: Subjects: 2 entries - [1657289848.956620][5274:5279] CHIP:TOO: [1]: 112233 - [1657289848.956659][5274:5279] CHIP:TOO: [2]: 1111 - [1657289848.956696][5274:5279] CHIP:TOO: Targets: null - [1657289848.956730][5274:5279] CHIP:TOO: FabricIndex: 1 - [1657289848.956764][5274:5279] CHIP:TOO: } - [1657289848.956811][5274:5279] CHIP:TOO: [2]: { - [1657289848.956846][5274:5279] CHIP:TOO: Privilege: 3 - [1657289848.956879][5274:5279] CHIP:TOO: AuthMode: 3 - [1657289848.956916][5274:5279] CHIP:TOO: Subjects: 1 entries - [1657289848.956954][5274:5279] CHIP:TOO: [1]: 3333 - [1657289848.956990][5274:5279] CHIP:TOO: Targets: null - [1657289848.957023][5274:5279] CHIP:TOO: FabricIndex: 1 - [1657289848.957055][5274:5279] CHIP:TOO: } - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [3333], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 1 0 - On TH1(Chiptool), Verify Successfully to AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 - - - [1657289881.142883][5283:5288] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 - [1657289881.142955][5283:5288] CHIP:TOO: Extension: 1 entries - [1657289881.143019][5283:5288] CHIP:TOO: [1]: { - [1657289881.143056][5283:5288] CHIP:TOO: Data: 1718 - [1657289881.143107][5283:5288] CHIP:TOO: FabricIndex: 1 - [1657289881.143138][5283:5288] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: CurrentFabricIndex }] - label: - "If DUT is an app on host, examine persistent storage in /tmp/chip_kvs - text file" + "Step 18: If DUT is an app on host, examine persistent storage in + /tmp/chip_kvs text file" verification: | sudo vi kvs text file - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml deleted file mode 100644 index 2acf169a605092..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 4.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] - -PICS: - - LTIME.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - - Commission TH(all-clusters-app) to TH(chip-tool) using below command - - TH(all-clusters-app) : ./chip-all-clusters-app --trace_decode 1 - TH(chip-tool) : ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - disabled: true - - - label: "Commission DUT to TH" - verification: | - - disabled: true - - - label: "{DUTread} (0xFFFD) ClusterRevision attribute" - PICS: LTIME.C.Afffd - verification: | - ./chip-tool timeformatlocalization read cluster-revision 1 0 - Verify " ClusterRevision " value is of unit16 and reflects the highest revision number, in RPI the value of ClusterRevision is 1 on the TH(all-clusters-app) Log: - ReportDataMessage = - [1666853258.399517][19861:19861] CHIP:DMG: { - [1666853258.399520][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853258.399527][19861:19861] CHIP:DMG: [ - [1666853258.399531][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853258.399537][19861:19861] CHIP:DMG: { - [1666853258.399541][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853258.399546][19861:19861] CHIP:DMG: { - [1666853258.399551][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853258.399555][19861:19861] CHIP:DMG: AttributePathIB = - [1666853258.399560][19861:19861] CHIP:DMG: { - [1666853258.399565][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853258.399569][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853258.399574][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFD, - [1666853258.399579][19861:19861] CHIP:DMG: } - [1666853258.399584][19861:19861] CHIP:DMG: - [1666853258.399589][19861:19861] CHIP:DMG: Data = 1, - [1666853258.399593][19861:19861] CHIP:DMG: }, - [1666853258.399598][19861:19861] CHIP:DMG: - [1666853258.399602][19861:19861] CHIP:DMG: }, - [1666853258.399607][19861:19861] CHIP:DMG: - [1666853258.399611][19861:19861] CHIP:DMG: ], - [1666853258.399617][19861:19861] CHIP:DMG: - [1666853258.399621][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853258.399623][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853258.399628][19861:19861] CHIP:DMG: } - disabled: true - - - label: "{DUTread} (0xFFFC) FeatureMap attribute" - PICS: LTIME.C.Afffc - verification: | - Out of scope for V1.0 - - https://github.com/project-chip/connectedhomeip/issues/18989 - disabled: true - - - label: "{DUTread} (0xFFFB) AttributeList attribute" - PICS: LTIME.C.Afffb - verification: | - ./chip-tool timeformatlocalization read attribute-list 1 0 - Verify " AttributeList " value consists the list of mandatory attributes (values 0, 1 and 2), global attributes (65528, 65529, 65531, 65532, 65533) on the TH(all-clusters-app) Log: - ReportDataMessage = - [1666853311.208553][19861:19861] CHIP:DMG: { - [1666853311.208555][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853311.208561][19861:19861] CHIP:DMG: [ - [1666853311.208564][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208570][19861:19861] CHIP:DMG: { - [1666853311.208573][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208577][19861:19861] CHIP:DMG: { - [1666853311.208582][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208585][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208588][19861:19861] CHIP:DMG: { - [1666853311.208592][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208595][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208601][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208607][19861:19861] CHIP:DMG: } - [1666853311.208613][19861:19861] CHIP:DMG: - [1666853311.208617][19861:19861] CHIP:DMG: Data = [ - [1666853311.208621][19861:19861] CHIP:DMG: - [1666853311.208625][19861:19861] CHIP:DMG: ], - [1666853311.208629][19861:19861] CHIP:DMG: }, - [1666853311.208635][19861:19861] CHIP:DMG: - [1666853311.208638][19861:19861] CHIP:DMG: }, - [1666853311.208648][19861:19861] CHIP:DMG: - [1666853311.208651][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208658][19861:19861] CHIP:DMG: { - [1666853311.208662][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208666][19861:19861] CHIP:DMG: { - [1666853311.208670][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208676][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208680][19861:19861] CHIP:DMG: { - [1666853311.208684][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208688][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208693][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208696][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208703][19861:19861] CHIP:DMG: } - [1666853311.208708][19861:19861] CHIP:DMG: - [1666853311.208713][19861:19861] CHIP:DMG: Data = 0, - [1666853311.208717][19861:19861] CHIP:DMG: }, - [1666853311.208724][19861:19861] CHIP:DMG: - [1666853311.208727][19861:19861] CHIP:DMG: }, - [1666853311.208735][19861:19861] CHIP:DMG: - [1666853311.208738][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208745][19861:19861] CHIP:DMG: { - [1666853311.208749][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208753][19861:19861] CHIP:DMG: { - [1666853311.208758][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208762][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208767][19861:19861] CHIP:DMG: { - [1666853311.208771][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208776][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208781][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208786][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208791][19861:19861] CHIP:DMG: } - [1666853311.208797][19861:19861] CHIP:DMG: - [1666853311.208801][19861:19861] CHIP:DMG: Data = 1, - [1666853311.208805][19861:19861] CHIP:DMG: }, - [1666853311.208812][19861:19861] CHIP:DMG: - [1666853311.208815][19861:19861] CHIP:DMG: }, - [1666853311.208824][19861:19861] CHIP:DMG: - [1666853311.208827][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208834][19861:19861] CHIP:DMG: { - [1666853311.208838][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208842][19861:19861] CHIP:DMG: { - [1666853311.208846][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208850][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208854][19861:19861] CHIP:DMG: { - [1666853311.208858][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208863][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208867][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208872][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208877][19861:19861] CHIP:DMG: } - [1666853311.208883][19861:19861] CHIP:DMG: - [1666853311.208887][19861:19861] CHIP:DMG: Data = 2, - [1666853311.208892][19861:19861] CHIP:DMG: }, - [1666853311.208899][19861:19861] CHIP:DMG: - [1666853311.208902][19861:19861] CHIP:DMG: }, - [1666853311.208911][19861:19861] CHIP:DMG: - [1666853311.208914][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208921][19861:19861] CHIP:DMG: { - [1666853311.208926][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208929][19861:19861] CHIP:DMG: { - [1666853311.208934][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208938][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208943][19861:19861] CHIP:DMG: { - [1666853311.208947][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208952][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208956][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208960][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208964][19861:19861] CHIP:DMG: } - [1666853311.208970][19861:19861] CHIP:DMG: - [1666853311.208975][19861:19861] CHIP:DMG: Data = 65528, - [1666853311.208979][19861:19861] CHIP:DMG: }, - [1666853311.208984][19861:19861] CHIP:DMG: - [1666853311.208988][19861:19861] CHIP:DMG: }, - [1666853311.208995][19861:19861] CHIP:DMG: - [1666853311.208998][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209005][19861:19861] CHIP:DMG: { - [1666853311.209008][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209013][19861:19861] CHIP:DMG: { - [1666853311.209017][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209023][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209028][19861:19861] CHIP:DMG: { - [1666853311.209033][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209039][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209042][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209047][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209051][19861:19861] CHIP:DMG: } - [1666853311.209055][19861:19861] CHIP:DMG: - [1666853311.209060][19861:19861] CHIP:DMG: Data = 65529, - [1666853311.209064][19861:19861] CHIP:DMG: }, - [1666853311.209069][19861:19861] CHIP:DMG: - [1666853311.209074][19861:19861] CHIP:DMG: }, - [1666853311.209083][19861:19861] CHIP:DMG: - [1666853311.209086][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209092][19861:19861] CHIP:DMG: { - [1666853311.209095][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209100][19861:19861] CHIP:DMG: { - [1666853311.209104][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209108][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209113][19861:19861] CHIP:DMG: { - [1666853311.209118][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209122][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209127][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209131][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209135][19861:19861] CHIP:DMG: } - [1666853311.209140][19861:19861] CHIP:DMG: - [1666853311.209145][19861:19861] CHIP:DMG: Data = 65531, - [1666853311.209149][19861:19861] CHIP:DMG: }, - [1666853311.209155][19861:19861] CHIP:DMG: - [1666853311.209157][19861:19861] CHIP:DMG: }, - [1666853311.209166][19861:19861] CHIP:DMG: - [1666853311.209169][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209175][19861:19861] CHIP:DMG: { - [1666853311.209178][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209183][19861:19861] CHIP:DMG: { - [1666853311.209187][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209193][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209197][19861:19861] CHIP:DMG: { - [1666853311.209200][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209204][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209210][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209214][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209219][19861:19861] CHIP:DMG: } - [1666853311.209224][19861:19861] CHIP:DMG: - [1666853311.209229][19861:19861] CHIP:DMG: Data = 65532, - [1666853311.209233][19861:19861] CHIP:DMG: }, - [1666853311.209240][19861:19861] CHIP:DMG: - [1666853311.209244][19861:19861] CHIP:DMG: }, - [1666853311.209254][19861:19861] CHIP:DMG: - [1666853311.209257][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209264][19861:19861] CHIP:DMG: { - [1666853311.209268][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209272][19861:19861] CHIP:DMG: { - [1666853311.209276][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209280][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209285][19861:19861] CHIP:DMG: { - [1666853311.209288][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209294][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209299][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209303][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209308][19861:19861] CHIP:DMG: } - [1666853311.209313][19861:19861] CHIP:DMG: - [1666853311.209319][19861:19861] CHIP:DMG: Data = 65533, - [1666853311.209323][19861:19861] CHIP:DMG: }, - [1666853311.209329][19861:19861] CHIP:DMG: - [1666853311.209334][19861:19861] CHIP:DMG: }, - [1666853311.209339][19861:19861] CHIP:DMG: - [1666853311.209343][19861:19861] CHIP:DMG: ], - [1666853311.209364][19861:19861] CHIP:DMG: - [1666853311.209368][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853311.209372][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853311.209376][19861:19861] CHIP:DMG: } - disabled: true - - - label: "{DUTread} (0xFFFA) EventList attribute" - PICS: LTIME.C.Afffa - verification: | - Out of scope for V1.0 - disabled: true - - - label: "{DUTread} (0xFFF9) AcceptedCommandList attribute" - PICS: LTIME.C.Afff9 - verification: | - ./chip-tool timeformatlocalization read accepted-command-list 1 0 - Verify "AcceptedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(all-clusters-app) Log: - - ReportDataMessage = - [1666853382.409750][19861:19861] CHIP:DMG: { - [1666853382.409753][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853382.409758][19861:19861] CHIP:DMG: [ - [1666853382.409761][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853382.409766][19861:19861] CHIP:DMG: { - [1666853382.409769][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853382.409772][19861:19861] CHIP:DMG: { - [1666853382.409776][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853382.409779][19861:19861] CHIP:DMG: AttributePathIB = - [1666853382.409782][19861:19861] CHIP:DMG: { - [1666853382.409786][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853382.409790][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853382.409795][19861:19861] CHIP:DMG: Attribute = 0x0000_FFF9, - [1666853382.409798][19861:19861] CHIP:DMG: } - [1666853382.409802][19861:19861] CHIP:DMG: - [1666853382.409805][19861:19861] CHIP:DMG: Data = [ - [1666853382.409809][19861:19861] CHIP:DMG: - [1666853382.409813][19861:19861] CHIP:DMG: ], - [1666853382.409816][19861:19861] CHIP:DMG: }, - [1666853382.409821][19861:19861] CHIP:DMG: - [1666853382.409824][19861:19861] CHIP:DMG: }, - [1666853382.409828][19861:19861] CHIP:DMG: - [1666853382.409831][19861:19861] CHIP:DMG: ], - [1666853382.409837][19861:19861] CHIP:DMG: - [1666853382.409840][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853382.409843][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853382.409846][19861:19861] CHIP:DMG: } - disabled: true - - - label: "{DUTread} (0xFFF8) GeneratedCommandList attribute" - PICS: LTIME.C.Afff8 - verification: | - ./chip-tool timeformatlocalization read generated-command-list 1 0 - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(all-clusters-app) Log: - ReportDataMessage = - [1666853414.158719][19861:19861] CHIP:DMG: { - [1666853414.158722][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853414.158729][19861:19861] CHIP:DMG: [ - [1666853414.158733][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853414.158741][19861:19861] CHIP:DMG: { - [1666853414.158746][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853414.158751][19861:19861] CHIP:DMG: { - [1666853414.158756][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853414.158761][19861:19861] CHIP:DMG: AttributePathIB = - [1666853414.158764][19861:19861] CHIP:DMG: { - [1666853414.158768][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853414.158771][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853414.158775][19861:19861] CHIP:DMG: Attribute = 0x0000_FFF8, - [1666853414.158778][19861:19861] CHIP:DMG: } - [1666853414.158781][19861:19861] CHIP:DMG: - [1666853414.158785][19861:19861] CHIP:DMG: Data = [ - [1666853414.158788][19861:19861] CHIP:DMG: - [1666853414.158791][19861:19861] CHIP:DMG: ], - [1666853414.158794][19861:19861] CHIP:DMG: }, - [1666853414.158799][19861:19861] CHIP:DMG: - [1666853414.158801][19861:19861] CHIP:DMG: }, - [1666853414.158806][19861:19861] CHIP:DMG: - [1666853414.158809][19861:19861] CHIP:DMG: ], - [1666853414.158814][19861:19861] CHIP:DMG: - [1666853414.158817][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853414.158820][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853414.158822][19861:19861] CHIP:DMG: } - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml new file mode 100644 index 00000000000000..d92644f4ebf741 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 108.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] + +PICS: + - LTIME.C + +config: + nodeId: 0x12344321 + cluster: "Time Format Localization" + endpoint: 0 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "DUT read (0xFFFD) ClusterRevision attribute" + PICS: LTIME.C.Afffd + wait: "readAttribute" + attribute: "ClusterRevision" + + - label: "DUT read (0xFFFC) FeatureMap attribute" + PICS: LTIME.C.Afffc + wait: "readAttribute" + attribute: "FeatureMap" + + - label: "DUT read (0xFFFB) AttributeList attribute" + PICS: LTIME.C.Afffb + wait: "readAttribute" + attribute: "AttributeList" + + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: "DUT read (0xFFFA) EventList attribute" + # PICS: LTIME.C.Afffa + # wait: "readAttribute" + # attribute: "EventList" + + - label: "DUT read (0xFFF9) AcceptedCommandList attribute" + PICS: LTIME.C.Afff9 + wait: "readAttribute" + attribute: "AcceptedCommandList" + + - label: "DUT read (0xFFF8) GeneratedCommandList attribute" + PICS: LTIME.C.Afff8 + wait: "readAttribute" + attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 51998c81303378..3f89dfc8331129 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -8,7 +8,8 @@ "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", "Test_TC_ACL_2_8", - "Test_TC_ACL_2_9" + "Test_TC_ACL_2_9", + "Test_TC_ACL_2_10" ], "AccessControlEnforcement": ["Test_TC_ACE_1_5"], "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index f821ed9049e9fe..9b2572bda680d8 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -282,11 +282,7 @@ "Test_TC_DGTHREAD_3_5" ], "Actions": ["Test_TC_ACT_2_1", "Test_TC_ACT_2_2", "Test_TC_ACT_3_2"], - "TimeFormatLocalization": [ - "Test_TC_LTIME_1_1", - "Test_TC_LTIME_2_1", - "Test_TC_LTIME_3_1" - ], + "TimeFormatLocalization": ["Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1"], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], "Scenes": [ @@ -297,7 +293,7 @@ "Test_TC_S_3_1" ], "PumpConfigurationControl": ["Test_TC_PCC_3_1"], - "AccessControl": ["Test_TC_ACL_2_5", "Test_TC_ACL_2_6", "Test_TC_ACL_2_10"], + "AccessControl": ["Test_TC_ACL_2_5", "Test_TC_ACL_2_6"], "UserLabel": [], "BridgedDeviceBasicInformation": [ "Test_TC_BRBINFO_2_2", diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 1d2a7f9f3508a3..c66d7f2974d5a6 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1358,17 +1358,6 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; * @} */ -/** - * @def CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - * - * @brief - * Enable persistence and resumption of subscriptions on servers. - * - */ -#ifndef CHIP_CONFIG_PERSIST_SUBSCRIPTIONS -#define CHIP_CONFIG_PERSIST_SUBSCRIPTIONS 0 -#endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - /** * @def CHIP_CONFIG_MAX_SUBSCRIPTION_RESUMPTION_STORAGE_CONCURRENT_ITERATORS * diff --git a/src/platform/Darwin/CHIPPlatformConfig.h b/src/platform/Darwin/CHIPPlatformConfig.h index 892812acd89fd6..e3e1a99aebe5a1 100644 --- a/src/platform/Darwin/CHIPPlatformConfig.h +++ b/src/platform/Darwin/CHIPPlatformConfig.h @@ -62,6 +62,3 @@ #ifndef CHIP_CONFIG_KVS_PATH #define CHIP_CONFIG_KVS_PATH "/tmp/chip_kvs" #endif // CHIP_CONFIG_KVS_PATH - -// Enable subscription persistence and resumption for CI -#define CHIP_CONFIG_PERSIST_SUBSCRIPTIONS 1 diff --git a/src/platform/Linux/CHIPPlatformConfig.h b/src/platform/Linux/CHIPPlatformConfig.h index 0e36ed76144cd2..788fe9b80c75d9 100644 --- a/src/platform/Linux/CHIPPlatformConfig.h +++ b/src/platform/Linux/CHIPPlatformConfig.h @@ -64,9 +64,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS 1 #endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS -// Enable subscription persistence and resumption for CI -#define CHIP_CONFIG_PERSIST_SUBSCRIPTIONS 1 - // ==================== Security Configuration Overrides ==================== #ifndef CHIP_CONFIG_KVS_PATH diff --git a/src/platform/cc13x2_26x2/CHIPPlatformConfig.h b/src/platform/cc13x2_26x2/CHIPPlatformConfig.h index b60ebd2db042e9..2a5981d4bbdea6 100644 --- a/src/platform/cc13x2_26x2/CHIPPlatformConfig.h +++ b/src/platform/cc13x2_26x2/CHIPPlatformConfig.h @@ -68,5 +68,3 @@ #ifndef CHIP_CONFIG_MAX_FABRICS #define CHIP_CONFIG_MAX_FABRICS 5 #endif - -#define CHIP_CONFIG_PERSIST_SUBSCRIPTIONS 0 diff --git a/src/platform/device.gni b/src/platform/device.gni index bddd80e6e8f973..a17bf0b9c706b2 100755 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -97,6 +97,14 @@ declare_args() { } else { chip_mdns = "none" } + + # Enable Subscription persistence / resumption for CI and supported platforms + if (chip_device_platform == "darwin" || chip_device_platform == "linux" || + chip_device_platform == "fake") { + chip_persist_subscriptions = true + } else { + chip_persist_subscriptions = false + } } if (chip_device_platform == "bl702" && chip_enable_openthread) { diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index 026220c9ceb9ba..1f691b8e925ab9 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -75,12 +75,19 @@ async def test_TC_RR_1_1(self): skip_user_label_cluster_steps = self.user_params.get("skip_user_label_cluster_steps", False) # Whether to do the local session ID comparison checks to prove new sessions have not been established. check_local_session_id_unchanged = self.user_params.get("check_local_session_id_unchanged", False) + # Whether to check heap statistics. Add `--bool-arg check_heap_watermarks:true` to command line to enable + check_heap_watermarks = self.user_params.get("check_heap_watermarks", False) BEFORE_LABEL = "Before Subscriptions 12345678912" AFTER_LABEL = "After Subscriptions 123456789123" # Pre-conditions + # Do a read-out of heap statistics before the test begins + if check_heap_watermarks: + logging.info("Read Heap info before stress test") + high_watermark_before, current_usage_before = await self.read_heap_statistics(dev_ctrl) + # Make sure all certificates are installed with maximal size dev_ctrl.fabricAdmin.certificateAuthority.maximizeCertChains = True @@ -406,6 +413,14 @@ async def test_TC_RR_1_1(self): num_fabrics_to_commission, fabric_unique_clients, group_key_map, groups_cluster_endpoints, indicated_max_groups_per_fabric) await self.validate_group_table(num_fabrics_to_commission, fabric_unique_clients, group_table_written) + # Read heap watermarks after the test + if check_heap_watermarks: + logging.info("Read Heap info after stress test") + high_watermark_after, current_usage_after = await self.read_heap_statistics(dev_ctrl) + logging.info("=== Heap Usage Diagnostics ===\nHigh watermark: {} (before) / {} (after)\n" + "Current usage: {} (before) / {} (after)".format(high_watermark_before, high_watermark_after, + current_usage_before, current_usage_after)) + def random_string(self, length) -> str: rnd = self._pseudo_random_generator return "".join([rnd.choice("abcdef0123456789") for _ in range(length)])[:length] @@ -619,7 +634,7 @@ def build_acl(self, fabric_number, client_by_name, num_controllers_per_fabric): # - Subjects field: [0x3000_0000_0000_0001, 0x3000_0000_0000_0002, 0x3000_0000_0000_0003, 0x3000_0000_0000_0004] # - Targets field: [{Cluster: 0xFFF1_FC40, DeviceType: 0xFFF1_FC20}, {Cluster: 0xFFF1_FC41, DeviceType: 0xFFF1_FC21}, {Cluster: 0xFFF1_FC02, DeviceType: 0xFFF1_FC42}] # . struct - # - Privilege field: View (3) + # - Privilege field: View (1) # - AuthMode field: CASE (2) # - Subjects field: [0x4000_0000_0000_0001, 0x4000_0000_0000_0002, 0x4000_0000_0000_0003, 0x4000_0000_0000_0004] # - Targets field: [{Cluster: 0xFFF1_FC80, DeviceType: 0xFFF1_FC20}, {Cluster: 0xFFF1_FC81, DeviceType: 0xFFF1_FC21}, {Cluster: 0xFFF1_FC82, DeviceType: 0xFFF1_FC22}] @@ -666,7 +681,7 @@ def build_acl(self, fabric_number, client_by_name, num_controllers_per_fabric): targets=operate_targets) acl.append(operate_acl_entry) - # Operate ACL entry + # View ACL entry view_subjects = [0x4000_0000_0000_0001, 0x4000_0000_0000_0002, 0x4000_0000_0000_0003, 0x4000_0000_0000_0004] view_targets = [ Clusters.AccessControl.Structs.Target(cluster=0xFFF1_FC80, deviceType=0xFFF1_BC20), @@ -701,6 +716,25 @@ def build_group_key(self, fabric_index: int, group_key_index: int, keys_per_fabr epochKey2=self.random_string(16).encode(), epochStartTime2=(set_id * 4 + 2)) + async def read_heap_statistics(self, dev_ctrl): + diagnostics_contents = [ + Clusters.SoftwareDiagnostics.Attributes.CurrentHeapHighWatermark, + Clusters.SoftwareDiagnostics.Attributes.CurrentHeapUsed, + ] + diagnostics_paths = [(0, attrib) for attrib in diagnostics_contents] + swdiag_info = await dev_ctrl.ReadAttribute(self.dut_node_id, diagnostics_paths) + + # Make sure everything came back from the read that we expected + asserts.assert_true(0 in swdiag_info.keys(), "Must have read endpoint 0 data") + asserts.assert_true(Clusters.SoftwareDiagnostics in swdiag_info[0].keys( + ), "Must have read Software Diagnostics cluster data") + for attribute in diagnostics_contents: + asserts.assert_true(attribute in swdiag_info[0][Clusters.SoftwareDiagnostics], + "Must have read back attribute %s" % (attribute.__name__)) + high_watermark = swdiag_info[0][Clusters.SoftwareDiagnostics][Clusters.SoftwareDiagnostics.Attributes.CurrentHeapHighWatermark] + current_usage = swdiag_info[0][Clusters.SoftwareDiagnostics][Clusters.SoftwareDiagnostics.Attributes.CurrentHeapUsed] + return high_watermark, current_usage + if __name__ == "__main__": default_matter_test_main(maximize_cert_chains=True, controller_cat_tags=[0x0001_0001]) diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 76a2377835e66d..8c4167cd4f2c50 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -123,8 +123,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/radio/rail_lib/common", "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32", "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/rf/common/cortex", - "${efr32_sdk_root}/platform/radio/rail_lib/hal", - "${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32", "${efr32_sdk_root}/platform/radio/rail_lib/protocol/ieee802154", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_pti", @@ -177,6 +175,13 @@ template("efr32_sdk") { "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen", ] + if (silabs_family != "mgm24") { + _include_dirs += [ + "${efr32_sdk_root}/platform/radio/rail_lib/hal", + "${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32", + ] + } + # Note that we're setting the mbedTLS and PSA configuration files through a # define. This means the build system by default does not pick up changes in # the content of these, only when changing the filename itself. @@ -476,7 +481,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/emlib/src/em_system.c", "${efr32_sdk_root}/platform/emlib/src/em_timer.c", "${efr32_sdk_root}/platform/peripheral/src/peripheral_sysrtc.c", - "${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32/hal_efr.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_conversions_efr32.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_pti/sl_rail_util_pti.c", "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/aes_aes.c", @@ -625,6 +629,11 @@ template("efr32_sdk") { "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_event_handler.c", ] + if (silabs_family != "mgm24") { + sources += + [ "${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32/hal_efr.c" ] + } + if (use_wstk_buttons) { sources += [ "${efr32_sdk_root}/platform/driver/button/src/sl_button.c", @@ -815,7 +824,6 @@ template("efr32_sdk") { sources += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/startup_mgm24.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/system_mgm24.c", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_curves_efr32.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index cfc9d78c7565c8..881c8e46cd2745 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit cfc9d78c7565c867948435c823b07aefc5835a81 +Subproject commit 881c8e46cd2745f800c77ca40aa1f0fa2c1accdf diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7bad657aa3545a..b4d4de70032db5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -44,6 +44,7 @@ class TestList : public Command printf("Test_TC_ACL_2_7\n"); printf("Test_TC_ACL_2_8\n"); printf("Test_TC_ACL_2_9\n"); + printf("Test_TC_ACL_2_10\n"); printf("Test_TC_ACE_1_5\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); @@ -543,7 +544,6 @@ class ManualTestList : public Command printf("Test_TC_ACT_2_1\n"); printf("Test_TC_ACT_2_2\n"); printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); printf("Test_TC_BIND_2_1\n"); @@ -557,7 +557,6 @@ class ManualTestList : public Command printf("Test_TC_PCC_3_1\n"); printf("Test_TC_ACL_2_5\n"); printf("Test_TC_ACL_2_6\n"); - printf("Test_TC_ACL_2_10\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_2_3\n"); printf("Test_TC_ACE_1_1\n"); @@ -6778,6 +6777,603 @@ class Test_TC_ACL_2_9Suite : public TestCommand } }; +class Test_TC_ACL_2_10Suite : public TestCommand +{ +public: + Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 23, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("TH1CommissionerNodeId", 0, UINT64_MAX, &mTH1CommissionerNodeId); + AddArgument("TH2CommissionerNodeId", 0, UINT64_MAX, &mTH2CommissionerNodeId); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("D_OK_EMPTY", &mDOkEmpty); + AddArgument("D_OK_SINGLE", &mDOkSingle); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ACL_2_10Suite() {} + + 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 mNodeId2; + chip::Optional mTH1CommissionerNodeId; + chip::Optional mTH2CommissionerNodeId; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mDOkEmpty; + chip::Optional mDOkSingle; + chip::Optional mTimeout; + + uint8_t TH1FabricIndex; + uint8_t TH2FabricIndex; + + 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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 2222ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 2)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 4444ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); + } + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1: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, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH2 starts a commissioning process with DUT"); + 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 4: { + LogStep(4, "DUT is commissioned by TH2 on Fabric ID2 "); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 5: { + LogStep(5, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[1] = 1111ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 3333ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[1] = 2222ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 4444ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 8: { + LogStep(8, + "Step 7:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_EMPTY"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = + mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 9: { + LogStep(9, + "Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_SINGLE"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 71); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 9: Reboot DUT"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Step 9: Reboot DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Reboot the DUT and enter 'y' after successgarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH1 Connects to the device again"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH2 Connects to the device again"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 14: { + LogStep(14, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, + "Step 11:TH1 resds DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 71); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 18: { + LogStep(18, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "Step 15:TH1 removes fabric F2 from DUT"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = TH2FabricIndex; + return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); + } + case 20: { + LogStep(20, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[1] = 1111ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 3333ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 21: { + LogStep(21, + "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_ACE_1_5Suite : public TestCommand { public: @@ -115742,236 +116338,56 @@ class Test_TC_TMP_2_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - valueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); - } - 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; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Operate on device to change the temperature significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_3_1Suite : public TestCommand -{ -public: - Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TMP_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - 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; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_3_1Suite : public TestCommand -{ -public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_TSTAT_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + valueBeforeChange = value; + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -115992,15 +116408,57 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); (void) commissionerNodeId; switch (testIndex) - {} + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Operate on device to change the temperature significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + } return CHIP_NO_ERROR; } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_TMP_3_1Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116008,7 +116466,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_TMP_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116066,10 +116524,10 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand } }; -class Test_TC_TSUIC_3_1Suite : public TestCommand +class Test_TC_TSTAT_3_1Suite : public TestCommand { public: - Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) + Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116077,7 +116535,7 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSUIC_3_1Suite() {} + ~Test_TC_TSTAT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116135,11 +116593,10 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116147,7 +116604,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116205,11 +116662,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_1Suite : public TestCommand +class Test_TC_TSUIC_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) + Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116217,7 +116673,7 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1Suite() {} + ~Test_TC_TSUIC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116275,11 +116731,11 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_2Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116287,7 +116743,7 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_2Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116345,11 +116801,11 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_3Suite : public TestCommand +class Test_TC_DGTHREAD_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116357,7 +116813,7 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_3Suite() {} + ~Test_TC_DGTHREAD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116415,11 +116871,11 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_4Suite : public TestCommand +class Test_TC_DGTHREAD_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116427,7 +116883,7 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_4Suite() {} + ~Test_TC_DGTHREAD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116485,11 +116941,11 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_5Suite : public TestCommand +class Test_TC_DGTHREAD_3_3Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116497,7 +116953,7 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_5Suite() {} + ~Test_TC_DGTHREAD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116555,10 +117011,11 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_4Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116566,7 +117023,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_DGTHREAD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116624,10 +117081,11 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_DGTHREAD_3_5Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116635,7 +117093,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_DGTHREAD_3_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116693,10 +117151,10 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116704,7 +117162,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116762,10 +117220,10 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_1_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116773,7 +117231,7 @@ class Test_TC_LTIME_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116831,10 +117289,10 @@ class Test_TC_LTIME_1_1Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116842,7 +117300,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116900,10 +117358,10 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_LTIME_2_1Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116911,7 +117369,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_3_1Suite() {} + ~Test_TC_LTIME_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116969,10 +117427,10 @@ class Test_TC_LTIME_3_1Suite : public TestCommand } }; -class Test_TC_BIND_2_1Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116980,7 +117438,7 @@ class Test_TC_BIND_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_1Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117038,10 +117496,10 @@ class Test_TC_BIND_2_1Suite : public TestCommand } }; -class Test_TC_BIND_2_2Suite : public TestCommand +class Test_TC_BIND_2_1Suite : public TestCommand { public: - Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) + Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117049,7 +117507,7 @@ class Test_TC_BIND_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_2Suite() {} + ~Test_TC_BIND_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117107,10 +117565,10 @@ class Test_TC_BIND_2_2Suite : public TestCommand } }; -class Test_TC_BIND_2_3Suite : public TestCommand +class Test_TC_BIND_2_2Suite : public TestCommand { public: - Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) + Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117118,7 +117576,7 @@ class Test_TC_BIND_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_3Suite() {} + ~Test_TC_BIND_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117176,10 +117634,10 @@ class Test_TC_BIND_2_3Suite : public TestCommand } }; -class Test_TC_S_1_1Suite : public TestCommand +class Test_TC_BIND_2_3Suite : public TestCommand { public: - Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 0, credsIssuerConfig) + Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117187,7 +117645,7 @@ class Test_TC_S_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_1_1Suite() {} + ~Test_TC_BIND_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117245,10 +117703,10 @@ class Test_TC_S_1_1Suite : public TestCommand } }; -class Test_TC_S_2_1Suite : public TestCommand +class Test_TC_S_1_1Suite : public TestCommand { public: - Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 0, credsIssuerConfig) + Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117256,7 +117714,7 @@ class Test_TC_S_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_1Suite() {} + ~Test_TC_S_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117314,10 +117772,10 @@ class Test_TC_S_2_1Suite : public TestCommand } }; -class Test_TC_S_2_2Suite : public TestCommand +class Test_TC_S_2_1Suite : public TestCommand { public: - Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 0, credsIssuerConfig) + Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117325,7 +117783,7 @@ class Test_TC_S_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_2Suite() {} + ~Test_TC_S_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117383,10 +117841,10 @@ class Test_TC_S_2_2Suite : public TestCommand } }; -class Test_TC_S_2_3Suite : public TestCommand +class Test_TC_S_2_2Suite : public TestCommand { public: - Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 0, credsIssuerConfig) + Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117394,7 +117852,7 @@ class Test_TC_S_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_3Suite() {} + ~Test_TC_S_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117452,10 +117910,10 @@ class Test_TC_S_2_3Suite : public TestCommand } }; -class Test_TC_S_3_1Suite : public TestCommand +class Test_TC_S_2_3Suite : public TestCommand { public: - Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) + Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117463,7 +117921,7 @@ class Test_TC_S_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_3_1Suite() {} + ~Test_TC_S_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117521,10 +117979,10 @@ class Test_TC_S_3_1Suite : public TestCommand } }; -class Test_TC_PCC_3_1Suite : public TestCommand +class Test_TC_S_3_1Suite : public TestCommand { public: - Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) + Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117532,7 +117990,7 @@ class Test_TC_PCC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PCC_3_1Suite() {} + ~Test_TC_S_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117590,10 +118048,10 @@ class Test_TC_PCC_3_1Suite : public TestCommand } }; -class Test_TC_ACL_2_5Suite : public TestCommand +class Test_TC_PCC_3_1Suite : public TestCommand { public: - Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 0, credsIssuerConfig) + Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117601,7 +118059,7 @@ class Test_TC_ACL_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_5Suite() {} + ~Test_TC_PCC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117659,10 +118117,10 @@ class Test_TC_ACL_2_5Suite : public TestCommand } }; -class Test_TC_ACL_2_6Suite : public TestCommand +class Test_TC_ACL_2_5Suite : public TestCommand { public: - Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 0, credsIssuerConfig) + Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117670,7 +118128,7 @@ class Test_TC_ACL_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_6Suite() {} + ~Test_TC_ACL_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117728,10 +118186,10 @@ class Test_TC_ACL_2_6Suite : public TestCommand } }; -class Test_TC_ACL_2_10Suite : public TestCommand +class Test_TC_ACL_2_6Suite : public TestCommand { public: - Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 0, credsIssuerConfig) + Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117739,7 +118197,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_10Suite() {} + ~Test_TC_ACL_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -118094,6 +118552,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -118582,7 +119041,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), @@ -118596,7 +119054,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), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index a59e5b40c62bbe..2cc8f1f37ee3a8 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -2421,6 +2421,109 @@ class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand } }; +class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_1_Simulated", 6) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LTIME_1_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT read (0xFFFD) ClusterRevision attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::ClusterRevision::Id); + } + case 2: { + LogStep(2, "DUT read (0xFFFC) FeatureMap attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); + } + case 3: { + LogStep(3, "DUT read (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); + } + case 4: { + LogStep(4, "DUT read (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AcceptedCommandList::Id); + } + case 5: { + LogStep(5, "DUT read (0xFFF8) GeneratedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::GeneratedCommandList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -2515,6 +2618,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); } + if (testName == "Test_TC_LTIME_1_1_Simulated") + { + return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); + } return nullptr; } @@ -2545,4 +2652,5 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); } diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index a59e5b40c62bbe..2cc8f1f37ee3a8 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -2421,6 +2421,109 @@ class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand } }; +class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_1_Simulated", 6) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LTIME_1_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT read (0xFFFD) ClusterRevision attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::ClusterRevision::Id); + } + case 2: { + LogStep(2, "DUT read (0xFFFC) FeatureMap attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); + } + case 3: { + LogStep(3, "DUT read (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); + } + case 4: { + LogStep(4, "DUT read (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AcceptedCommandList::Id); + } + case 5: { + LogStep(5, "DUT read (0xFFF8) GeneratedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::GeneratedCommandList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -2515,6 +2618,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); } + if (testName == "Test_TC_LTIME_1_1_Simulated") + { + return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); + } return nullptr; } @@ -2545,4 +2652,5 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); }