tests: More robust error handling for wifi_display_parsing
Check explicitly that wfd_subelems is present in the dict instead of failing on a key error when trying to fetch it. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
2b7277d3f0
commit
3935d78e7b
1 changed files with 2 additions and 0 deletions
|
@ -430,6 +430,8 @@ def _test_wifi_display_parsing(dev):
|
||||||
bssid = dev[0].get_group_status_field('bssid')
|
bssid = dev[0].get_group_status_field('bssid')
|
||||||
dev[2].scan_for_bss(bssid, freq=2412, force_scan=True)
|
dev[2].scan_for_bss(bssid, freq=2412, force_scan=True)
|
||||||
bss = dev[2].get_bss(bssid)
|
bss = dev[2].get_bss(bssid)
|
||||||
|
if 'wfd_subelems' not in bss:
|
||||||
|
raise Exception("Missing WFD elements in scan results")
|
||||||
if bss['wfd_subelems'] != "000006" + wfd_devinfo:
|
if bss['wfd_subelems'] != "000006" + wfd_devinfo:
|
||||||
raise Exception("Unexpected WFD elements in scan results: " + bss['wfd_subelems'])
|
raise Exception("Unexpected WFD elements in scan results: " + bss['wfd_subelems'])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue