Skip to content

Commit 4f4eceb

Browse files
committed
Add check to TC-ACL-2.11 for populated ARLs
1 parent b7895f2 commit 4f4eceb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/python_testing/TC_ACL_2_11.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import queue
3232

3333
import chip.clusters as Clusters
34+
from basic_composition_support import arls_populated
3435
from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction, ValueDecodeFailure
3536
from chip.clusters.ClusterObjects import ALL_ACCEPTED_COMMANDS, ALL_ATTRIBUTES, ALL_CLUSTERS, ClusterEvent
3637
from chip.clusters.Objects import AccessControl
@@ -79,7 +80,7 @@ def desc_TC_ACL_2_11(self) -> str:
7980

8081
def steps_TC_ACL_2_11(self) -> list[TestStep]:
8182
steps = [
82-
TestStep(1, "Commissioning, already done"),
83+
TestStep(1, "Commissioning (already done) and precondition checks", is_commissioning=True),
8384
TestStep(2, "TH1 reads DUT Endpoint 0 AccessControl cluster CommissioningARL attribute"),
8485
TestStep(3, "TH1 reads DUT Endpoint 0 AccessControl cluster ARL attribute"),
8586
TestStep(4, "For each entry in ARL, iterate over each restriction and attempt access the restriction's ID on the Endpoint and Cluster in the ARL entry.",
@@ -99,6 +100,14 @@ async def test_TC_ACL_2_11(self):
99100
dev_ctrl = self.default_controller
100101
dut_node_id = self.dut_node_id
101102
self.step(1)
103+
104+
wildcard_read = (await dev_ctrl.Read(self.dut_node_id, [()]))
105+
has_arl, has_carl = arls_populated(wildcard_read.tlvAttributes)
106+
asserts.assert_true(
107+
has_arl, "ARL attribute must contain at least one restriction to run this test. Please follow manufacturer-specific steps to add access restrictions and re-run this test")
108+
asserts.assert_true(
109+
has_carl, "CommissioningARL attribute must contain at least one restriction to run this test. Please follow manufacturer-specific steps to add access restrictions and re-run this test")
110+
102111
self.step(2)
103112
await self.read_single_attribute_check_success(
104113
endpoint=0,

0 commit comments

Comments
 (0)