From: Jouni Malinen Date: Sun, 7 Dec 2014 21:45:05 +0000 (+0200) Subject: tests: wpa_supplicant ctrl_iface mesh command error cases X-Git-Tag: hostap_2_4~887 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e2a8ec9e750cbfe715bd6efb9d7140527c8aeb2;p=thirdparty%2Fhostap.git tests: wpa_supplicant ctrl_iface mesh command error cases Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 32183bafc..8bdaa5dcd 100644 --- a/tests/hwsim/test_wpas_mesh.py +++ b/tests/hwsim/test_wpas_mesh.py @@ -336,3 +336,18 @@ def _test_wpas_mesh_secure_no_auto(dev, apdev, test_connectivity): def test_wpas_mesh_secure_no_auto(dev, apdev): return wrap_wpas_mesh_test(_test_wpas_mesh_secure_no_auto, dev, apdev) + +def test_wpas_mesh_ctrl(dev): + """wpa_supplicant ctrl_iface mesh command error cases""" + if "FAIL" not in dev[0].request("MESH_GROUP_ADD 123"): + raise Exception("Unexpected MESH_GROUP_ADD success") + id = dev[0].add_network() + if "FAIL" not in dev[0].request("MESH_GROUP_ADD %d" % id): + raise Exception("Unexpected MESH_GROUP_ADD success") + dev[0].set_network(id, "mode", "5") + dev[0].set_network(id, "key_mgmt", "WPA-PSK") + if "FAIL" not in dev[0].request("MESH_GROUP_ADD %d" % id): + raise Exception("Unexpected MESH_GROUP_ADD success") + + if "FAIL" not in dev[0].request("MESH_GROUP_REMOVE foo"): + raise Exception("Unexpected MESH_GROUP_REMOVE success")