mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 16:54:04 -05:00
tests: Support older tshark versions
The -Y command line argument may need to be replaced with -R when an older tshark version is used. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8c6f6ac100
commit
84512f8c9b
@ -95,7 +95,16 @@ def test_cfg80211_tx_frame(dev, apdev, params):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if cmd:
|
if cmd:
|
||||||
freq = cmd.stdout.read().splitlines()
|
(out,err) = cmd.communicate()
|
||||||
|
res = cmd.wait()
|
||||||
|
if res == 1:
|
||||||
|
arg[3] = '-R'
|
||||||
|
cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
|
||||||
|
stderr=open('/dev/null', 'w'))
|
||||||
|
(out,err) = cmd.communicate()
|
||||||
|
res = cmd.wait()
|
||||||
|
|
||||||
|
freq = out.splitlines()
|
||||||
if len(freq) != 2:
|
if len(freq) != 2:
|
||||||
raise Exception("Unexpected number of Action frames (%d)" % len(freq))
|
raise Exception("Unexpected number of Action frames (%d)" % len(freq))
|
||||||
if freq[0] != "2422":
|
if freq[0] != "2422":
|
||||||
|
@ -144,8 +144,17 @@ def test_p2p_channel_random_social_with_op_class_change(dev, apdev, params):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if cmd:
|
if cmd:
|
||||||
|
(out,err) = cmd.communicate()
|
||||||
|
res = cmd.wait()
|
||||||
|
if res == 1:
|
||||||
|
arg[3] = '-R'
|
||||||
|
cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
|
||||||
|
stderr=open('/dev/null', 'w'))
|
||||||
|
(out,err) = cmd.communicate()
|
||||||
|
res = cmd.wait()
|
||||||
|
|
||||||
last = None
|
last = None
|
||||||
for l in cmd.stdout.read().splitlines():
|
for l in out.splitlines():
|
||||||
if "Operating Channel:" not in l:
|
if "Operating Channel:" not in l:
|
||||||
continue
|
continue
|
||||||
last = l
|
last = l
|
||||||
|
Loading…
Reference in New Issue
Block a user