* [PATCH] auto-t: separate PEAP + SIM test
@ 2021-08-17 21:50 James Prestwood
2021-08-17 22:02 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2021-08-17 21:50 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 2605 bytes --]
Remove EAP-SIM from the generic PEAP test case since skipping
(if ofono is not on system) would skip the entire test rather
than just the EAP-SIM portion.
---
autotests/testEAP/connection_test.py | 29 ++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/autotests/testEAP/connection_test.py b/autotests/testEAP/connection_test.py
index 9a51bb8a..f072845b 100644
--- a/autotests/testEAP/connection_test.py
+++ b/autotests/testEAP/connection_test.py
@@ -142,9 +142,31 @@ class Test(unittest.TestCase):
#
# EAP-PEAP
#
- # * Test all combinations of PEAP, PEAPv0, PEAPv1 with MD5, GTC, SIM, MSCHAPv2
+ # * Test all combinations of PEAP, PEAPv0, PEAPv1 with MD5, GTC, MSCHAPv2
#
def test_eap_peap(self):
+ for ver in ['PEAP', 'PEAPv0', 'PEAPv1']:
+ for inner in ['MD5', 'GTC', 'MSCHAPv2']:
+ self.copy_network('peap/ssidEAP-%s-%s.8021x' % (ver, inner))
+
+ try:
+ self.validate_connection(self.wd)
+ except Exception as e:
+ # Catch an error here and print the actual PEAP combo that failed
+ traceback.print_exc()
+ raise Exception("%s-%s test failed" % (ver, inner))
+
+ self.remove_network()
+
+ #
+ # EAP-PEAP + SIM
+ #
+ # * Tests EAP-PEAP + SIM separately to allow skipping if ofono is not found
+ #
+ def test_eap_peap_sim(self):
+ if not ctx.is_process_running('ofonod'):
+ self.skipTest("ofono not running")
+
ofono = Ofono()
ofono.enable_modem('/phonesim')
ofono.wait_for_sim_auth()
@@ -152,8 +174,7 @@ class Test(unittest.TestCase):
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim/sim.db')
for ver in ['PEAP', 'PEAPv0', 'PEAPv1']:
- for inner in ['MD5', 'GTC', 'SIM', 'MSCHAPv2']:
- self.copy_network('peap/ssidEAP-%s-%s.8021x' % (ver, inner))
+ self.copy_network('peap/ssidEAP-%s-SIM.8021x' % ver)
try:
self.validate_connection(self.wd)
@@ -161,7 +182,7 @@ class Test(unittest.TestCase):
# Catch an error here and print the actual PEAP combo that failed
traceback.print_exc()
auth.stop()
- raise Exception("%s-%s test failed" % (ver, inner))
+ raise Exception("%s-SIM test failed" % ver)
self.remove_network()
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] auto-t: separate PEAP + SIM test
2021-08-17 21:50 [PATCH] auto-t: separate PEAP + SIM test James Prestwood
@ 2021-08-17 22:02 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-08-17 22:02 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 402 bytes --]
Hi James,
On 8/17/21 4:50 PM, James Prestwood wrote:
> Remove EAP-SIM from the generic PEAP test case since skipping
> (if ofono is not on system) would skip the entire test rather
> than just the EAP-SIM portion.
> ---
> autotests/testEAP/connection_test.py | 29 ++++++++++++++++++++++++----
> 1 file changed, 25 insertions(+), 4 deletions(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-17 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 21:50 [PATCH] auto-t: separate PEAP + SIM test James Prestwood
2021-08-17 22:02 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.