thunderbolt_loopback¶
Source code: thunderbolt_loopback.py
Tests thunderbolt port with a loopback card.
Description¶
Verifies the thunderbolt port with a loopback card.
Test Procedure¶
Operator inserts the loopback card.
The tool sends payloads to the loopback card.
The tool receives payloads from the loopback card and checks correctness.
The tool collects lane margining data and uploads it to factory server or saves it to local factory report.
Operator removes the loopback card.
Dependency¶
Loopback card driver.
tdtl tool if we want to test lane margining.
Write serial number to device data before the test for data collecting.
(Optional) Be able to connect factory server when running the test.
Examples¶
Test controller 0-1 with port 0 with 60 seconds timeout:
{
"pytest_name": "thunderbolt_loopback"
"args": {
"usbpd_spec": {
"port": 0
},
"timeout_secs": 60,
"controller_patterns": [
"0-1.*"
]
}
}
Test controller 0-3 with CC1 port 1 with 60 seconds timeout:
{
"pytest_name": "thunderbolt_loopback"
"args": {
"usbpd_spec": {
"port": 1,
"polarity": 1
},
"timeout_secs": 60,
"controller_patterns": [
"0-3.*"
]
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
timeout_secs |
int, None |
(optional; default: |
expected_link_speed |
[‘Fast’, ‘Slow’] |
(optional; default: |
expected_link_width |
[‘Dual’, ‘Single’] |
(optional; default: |
packets_to_send |
int |
(optional; default: |
packets_to_receive |
int |
(optional; default: |
debugfs_path |
str, None |
(optional; default: |
controller_port |
str, None |
(optional; default: |
controller_patterns |
list, tuple |
(optional; default: |
usbpd_spec |
dict |
A dict which must contain “port” and optionally specify “polarity”. For example, {“port”: 1, “polarity”: 1}. |
load_module |
bool |
(optional; default: |
check_muxinfo_only |
bool |
(optional; default: |
lane_margining |
bool |
(optional; default: |
lane_margining_timeout_secs |
int, float |
(optional; default: |
lane_margining_csv |
bool |
(optional; default: |
check_card_removal |
bool |
(optional; default: |