Skip to content

Commit 0f1d2fb

Browse files
pidarpedgmarcosb
authored andcommitted
Add TCP bitflag checks to TC_SC_4_3 test. (project-chip#37347)
1 parent 197127f commit 0f1d2fb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/python_testing/TC_SC_4_3.py

+13
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ def verify_t_value(self, t_value):
152152
return True, f"T value ({t_value}) is valid and bit 0 is clear."
153153
else:
154154
return False, f"Bit 0 is not clear. T value ({t_value})"
155+
156+
# Check that the value can be either 2, 4 or 6 depending on whether
157+
# DUT is a TCPClient, TCPServer or both.
158+
if self.check_pics("MCORE.SC.TCP"):
159+
if (T_int & 0x04 != 0):
160+
return True, f"T value ({t_value}) represents valid TCP support info."
161+
else:
162+
return False, f"T value ({t_value}) does not have TCP bits set even though the MCORE.SC.TCP PICS indicates it is required."
163+
else:
164+
if (T_int & 0x04 != 0):
165+
return False, f"T value ({t_value}) has the TCP bits set even though the MCORE.SC.TCP PICS is not set."
166+
else:
167+
return True, f"T value ({t_value}) is valid."
155168
except ValueError:
156169
return False, f"T value ({t_value}) is not a valid integer"
157170

0 commit comments

Comments
 (0)