From 47c34473f909a0407c1a42f5a319f4d11ad0b897 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 17 Mar 2013 11:19:24 +0200 Subject: [PATCH] tests: Give document string for each test case as a description Signed-hostap: Jouni Malinen --- tests/hwsim/run-p2p-tests.py | 2 ++ tests/hwsim/test_p2p_autogo.py | 3 +++ tests/hwsim/test_p2p_discovery.py | 1 + tests/hwsim/test_p2p_grpform.py | 7 +++++++ 4 files changed, 13 insertions(+) diff --git a/tests/hwsim/run-p2p-tests.py b/tests/hwsim/run-p2p-tests.py index 151c538d8..c0174abc2 100755 --- a/tests/hwsim/run-p2p-tests.py +++ b/tests/hwsim/run-p2p-tests.py @@ -61,6 +61,8 @@ def main(): for d in dev: d.reset() print "START " + t.__name__ + if t.__doc__: + print "Test: " + t.__doc__ for d in dev: d.request("NOTE TEST-START " + t.__name__) try: diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py index eb8c35f70..616d7c3c2 100644 --- a/tests/hwsim/test_p2p_autogo.py +++ b/tests/hwsim/test_p2p_autogo.py @@ -27,6 +27,7 @@ def connect_cli(go, client): hwsim_utils.test_connectivity_p2p(go, client) def test_autogo(dev): + """P2P autonomous GO and client joining group""" autogo(dev[0]) connect_cli(dev[0], dev[1]) dev[0].remove_group() @@ -36,6 +37,7 @@ def test_autogo(dev): pass def test_autogo_2cli(dev): + """P2P autonomous GO and two clients joining group""" autogo(dev[0]) connect_cli(dev[0], dev[1]) connect_cli(dev[0], dev[2]) @@ -57,6 +59,7 @@ def wlantest_tdls_clear(bssid, addr1, addr2): "clear_tdls_counters", bssid, addr1, addr2]); def test_autogo_tdls(dev): + """P2P autonomous GO and two clients using TDLS""" go = dev[0] logger.info("Start autonomous GO with fixed parameters " + go.ifname) id = go.add_network() diff --git a/tests/hwsim/test_p2p_discovery.py b/tests/hwsim/test_p2p_discovery.py index 44f8aa37e..ed520a2c3 100644 --- a/tests/hwsim/test_p2p_discovery.py +++ b/tests/hwsim/test_p2p_discovery.py @@ -10,6 +10,7 @@ import logging logger = logging.getLogger(__name__) def test_discovery(dev): + """P2P device discovery and provision discovery""" addr0 = dev[0].p2p_dev_addr() addr1 = dev[1].p2p_dev_addr() logger.info("Start device discovery") diff --git a/tests/hwsim/test_p2p_grpform.py b/tests/hwsim/test_p2p_grpform.py index e86aeae62..6fa1ebc95 100644 --- a/tests/hwsim/test_p2p_grpform.py +++ b/tests/hwsim/test_p2p_grpform.py @@ -109,6 +109,7 @@ def go_neg_pbc(i_dev, r_dev, i_intent=None, r_intent=None): return [i_res, r_res] def test_grpform(dev): + """P2P group formation using PIN and authorized connection (init -> GO)""" go_neg_pin_authorized(i_dev=dev[0], i_intent=15, r_dev=dev[1], r_intent=0) dev[0].remove_group() try: @@ -117,6 +118,7 @@ def test_grpform(dev): pass def test_grpform2(dev): + """P2P group formation using PIN and authorized connection (resp -> GO)""" go_neg_pin_authorized(i_dev=dev[0], i_intent=0, r_dev=dev[1], r_intent=15) dev[0].remove_group() try: @@ -125,6 +127,7 @@ def test_grpform2(dev): pass def test_grpform3(dev): + """P2P group formation using PIN and re-init GO Negotiation""" go_neg_pin(i_dev=dev[0], i_intent=15, r_dev=dev[1], r_intent=0) dev[0].remove_group() try: @@ -133,6 +136,7 @@ def test_grpform3(dev): pass def test_grpform_pbc(dev): + """P2P group formation using PBC and re-init GO Negotiation""" [i_res, r_res] = go_neg_pbc(i_dev=dev[0], i_intent=15, r_dev=dev[1], r_intent=0) check_grpform_results(i_res, r_res) if i_res['role'] != 'GO' or r_res['role'] != 'client': @@ -144,12 +148,15 @@ def test_grpform_pbc(dev): pass def test_both_go_intent_15(dev): + """P2P GO Negotiation with both devices using GO intent 15""" go_neg_pin_authorized(i_dev=dev[0], i_intent=15, r_dev=dev[1], r_intent=15, expect_failure=True, i_go_neg_status=9) def test_both_go_neg_display(dev): + """P2P GO Negotiation with both devices trying to display PIN""" go_neg_pin_authorized(i_dev=dev[0], r_dev=dev[1], expect_failure=True, i_go_neg_status=10, i_method='display', r_method='display') def test_both_go_neg_enter(dev): + """P2P GO Negotiation with both devices trying to enter PIN""" go_neg_pin_authorized(i_dev=dev[0], r_dev=dev[1], expect_failure=True, i_go_neg_status=10, i_method='enter', r_method='enter') def add_tests(tests):