tests: Hide stdout from Popen() to avoid undesired stdout prints
ap_cipher_tkip_countermeasures_{ap,sta} printed out the MAC addresses in stdout which resulted in the debug log not starting the PASS/FAIL information at the beginning of the line. Hide these unnecessary prints to avoid that. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
c50f0eac11
commit
9e669cb5ff
1 changed files with 12 additions and 4 deletions
|
@ -48,17 +48,21 @@ def test_ap_cipher_tkip_countermeasures_ap(dev, apdev):
|
|||
|
||||
dev[0].dump_monitor()
|
||||
cmd = subprocess.Popen(["sudo", "tee", testfile],
|
||||
stdin=subprocess.PIPE)
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
cmd.stdin.write(apdev[0]['bssid'])
|
||||
cmd.stdin.close()
|
||||
cmd.stdout.read()
|
||||
cmd.stdout.close()
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=1)
|
||||
if ev is not None:
|
||||
raise Exception("Unexpected disconnection on first Michael MIC failure")
|
||||
|
||||
cmd = subprocess.Popen(["sudo", "tee", testfile],
|
||||
stdin=subprocess.PIPE)
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
cmd.stdin.write("ff:ff:ff:ff:ff:ff")
|
||||
cmd.stdin.close()
|
||||
cmd.stdout.read()
|
||||
cmd.stdout.close()
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=10)
|
||||
if ev is None:
|
||||
raise Exception("No disconnection after two Michael MIC failures")
|
||||
|
@ -86,17 +90,21 @@ def test_ap_cipher_tkip_countermeasures_sta(dev, apdev):
|
|||
|
||||
dev[0].dump_monitor()
|
||||
cmd = subprocess.Popen(["sudo", "tee", testfile],
|
||||
stdin=subprocess.PIPE)
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
cmd.stdin.write(dev[0].p2p_dev_addr())
|
||||
cmd.stdin.close()
|
||||
cmd.stdout.read()
|
||||
cmd.stdout.close()
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=1)
|
||||
if ev is not None:
|
||||
raise Exception("Unexpected disconnection on first Michael MIC failure")
|
||||
|
||||
cmd = subprocess.Popen(["sudo", "tee", testfile],
|
||||
stdin=subprocess.PIPE)
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||
cmd.stdin.write("ff:ff:ff:ff:ff:ff")
|
||||
cmd.stdin.close()
|
||||
cmd.stdout.read()
|
||||
cmd.stdout.close()
|
||||
ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=10)
|
||||
if ev is None:
|
||||
raise Exception("No disconnection after two Michael MIC failures")
|
||||
|
|
Loading…
Reference in a new issue