Skip to content

Commit 89e4754

Browse files
committed
Add TCP bitflag checks to TC_SC_4_3 test. (project-chip#37347)
1 parent 19c3a7b commit 89e4754

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
@@ -145,6 +145,19 @@ def verify_t_value(self, t_value):
145145
return True, f"T value ({t_value}) is valid and bit 0 is clear."
146146
else:
147147
return False, f"Bit 0 is not clear. T value ({t_value})"
148+
149+
# Check that the value can be either 2, 4 or 6 depending on whether
150+
# DUT is a TCPClient, TCPServer or both.
151+
if self.check_pics("MCORE.SC.TCP"):
152+
if (T_int & 0x04 != 0):
153+
return True, f"T value ({t_value}) represents valid TCP support info."
154+
else:
155+
return False, f"T value ({t_value}) does not have TCP bits set even though the MCORE.SC.TCP PICS indicates it is required."
156+
else:
157+
if (T_int & 0x04 != 0):
158+
return False, f"T value ({t_value}) has the TCP bits set even though the MCORE.SC.TCP PICS is not set."
159+
else:
160+
return True, f"T value ({t_value}) is valid."
148161
except ValueError:
149162
return False, f"T value ({t_value}) is not a valid integer"
150163

0 commit comments

Comments
 (0)