Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TC-RC-1.1 failing at Step 11 #26065

Closed
yinyihu-silabs opened this issue Apr 12, 2023 · 7 comments · Fixed by #26106
Closed

[BUG] TC-RC-1.1 failing at Step 11 #26065

yinyihu-silabs opened this issue Apr 12, 2023 · 7 comments · Fixed by #26106

Comments

@yinyihu-silabs
Copy link
Contributor

Reproduction steps

  1. On your host machine, either linux/Mac, pull the SDK docker image that TH is using i..e docker pull connectedhomeip/chip-cert-bins:5a21d17fd2bb0a48f4a356937f4741f6c9dc7975
  2. Launch the docker container using docker run -it -v :/paa_roots -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket --privileged --network host -it connectedhomeip/chip-cert-bins:5a21d17fd2bb0a48f4a356937f4741f6c9dc7975
  3. Run the RR script using rm -f admin_storage.json && python3 python_testing/TC_RR_1_1.py --discriminator $DISCRIMINATOR --passcode $SETUP_PASSCODE --commissioning-method on-network --paa-trust-store-path /paa_roots --storage-path admin_storage.json

Bug prevalence

new to sha 5a21d17

GitHub hash of the SDK that was being used

SVE1.1

Platform

efr32, raspi

Platform Version(s)

No response

Anything else?

Test runs with all-cluster-app from THv2.7 using latest version of TC-RR-1.1 script.
th_test_rc_1_1_allclusters.log
tc_rr_all_cluster.log

@tehampson
Copy link
Contributor

This is the failure line, this is a real failure on the accessory side:

mobly.signals.TestFailure: Details=Failed Step 11: MaxGroupsPerFabric < 4 * counted_groups_clusters, Extras=None

Right above that error line we can see:

[1681267196.671956][12:16] CHIP:EM: >>> [E:19317i S:13575 M:12440790 (Ack:132712914)] (S) Msg RX from 1:0000000012344321 [401C] --- Type 0001:05 (IM:ReportData)
[1681267196.671990][12:16] CHIP:EM: Found matching exchange: 19317i, Delegate: 0xffffac1147a0
[1681267196.672044][12:16] CHIP:EM: Rxd Ack; Removing MessageCounter:132712914 from Retrans Table on exchange 19317i
[1681267196.672128][12:16] CHIP:DMG: ReportDataMessage =
[1681267196.672159][12:16] CHIP:DMG: {
[1681267196.672170][12:16] CHIP:DMG: 	AttributeReportIBs =
[1681267196.672187][12:16] CHIP:DMG: 	[
[1681267196.672198][12:16] CHIP:DMG: 		AttributeReportIB =
[1681267196.672214][12:16] CHIP:DMG: 		{
[1681267196.672225][12:16] CHIP:DMG: 			AttributeDataIB =
[1681267196.672237][12:16] CHIP:DMG: 			{
[1681267196.672251][12:16] CHIP:DMG: 				DataVersion = 0x41771aea,
[1681267196.672261][12:16] CHIP:DMG: 				AttributePathIB =
[1681267196.672274][12:16] CHIP:DMG: 				{
[1681267196.672286][12:16] CHIP:DMG: 					Endpoint = 0x0,
[1681267196.672298][12:16] CHIP:DMG: 					Cluster = 0x3f,
[1681267196.672309][12:16] CHIP:DMG: 					Attribute = 0x0000_0002,
[1681267196.672319][12:16] CHIP:DMG: 				}
[1681267196.672332][12:16] CHIP:DMG: 					
[1681267196.672345][12:16] CHIP:DMG: 				Data = 4, 
[1681267196.672354][12:16] CHIP:DMG: 			},
[1681267196.672368][12:16] CHIP:DMG: 			
[1681267196.672378][12:16] CHIP:DMG: 		},
[1681267196.672412][12:16] CHIP:DMG: 		
[1681267196.672422][12:16] CHIP:DMG: 	],
[1681267196.672438][12:16] CHIP:DMG: 	
[1681267196.672452][12:16] CHIP:DMG: 	SuppressResponse = true, 
[1681267196.672463][12:16] CHIP:DMG: 	InteractionModelRevision = 1
[1681267196.672472][12:16] CHIP:DMG: }

Note specifically, how this value is Data = 4, this is not right. It need to be correct.

It seems like CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC is not properly set to the number of groups clusters that you have. For the all clusters app it should be 3

@doublemis1
Copy link
Contributor

@tehampson I think, thats not the issue. Based on test plan the minimal value of MaxGroupsPerFabric is 4, however it is for per group cluster, so if the device supports multiple Group clusters for example on endpoint 0, 1 (which is this case), the device should supports at least 8 MaxGroupPerFabrics, 4 per each group cluster.

Verify the value of MaxGroupsPerFabric read from the Group Key Management Cluster is no less than the Group Limits requirements of 4 (groups) * counted_groups_clusters.

where counted_groups_clusters is a number of supported Group clusters (on endpoint 0 and endpoint 1)

@cjandhyala
Copy link
Contributor

@tehampson Per spec the The node SHALL support at least three group keys per fabric. and The node SHALL support at least four groups per fabric per endpoint having a Groups cluster instance.

Screenshot 2023-04-12 at 12 55 34 PM

@bzbarsky-apple based on your example , the device should support , 5 (max fabrics)*4 (max grps per fabric)*2 (two end pts) max grps

@doublemis1
Copy link
Contributor

@cjandhyala you are right, in my opinion, thus for that specific attribute (MaxGroupsPerFabric) should be at least 4 * 2 (endpoints supported group clusters 0, 1)

@tehampson
Copy link
Contributor

With the assumption that you are not setting CHIP_CONFIG_MAX_GROUPS_PER_FABRIC yourself, and the config is set for you by the SDK (from here):

#ifndef CHIP_CONFIG_MAX_GROUPS_PER_FABRIC
#define CHIP_CONFIG_MAX_GROUPS_PER_FABRIC (4 * CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC)
#endif

and if there are only 2 group clusters enpoints for your all clusters application (I just know there are 3 when I compile examples/all-clusters-app for linux) then CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC should be set to 2.

That should fix things for you, that way you will get the correct attribute read value in step 11 of this test.

@tehampson
Copy link
Contributor

(endpoints supported group clusters 0, 1)

@doublemis1 Where are you getting that group clusters are only one endpoint 0 and 1? When I look at th_test_rc_1_1_allclusters.log and I see that you have 3 group cluster on enpoints 0,1 and 2 from the wildcard attribute read of cluster 0x4. If I am correct then my initial point still stands CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC needs to be set to 3, and assuming CHIP_CONFIG_MAX_GROUPS_PER_FABRIC comes from the SDK default that will become 12 for you.

@cjandhyala
We are adding some clarification to the spec here https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6354. This is not a spec change, but merely a clarification.

@doublemis1
Copy link
Contributor

doublemis1 commented Apr 14, 2023

@tehampson ooo right I looked at first packet, but there are 2 packets for that wildcard read command.
Sorry for confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants