dev[0].remove_group()
dev[1].wait_go_ending_session()
dev[2].wait_go_ending_session()
+
+def test_p2p_invite_invalid(dev):
+ """Invalid parameters to P2P_INVITE"""
+ id = dev[0].add_network()
+ for cmd in [ "foo=bar",
+ "persistent=123 peer=foo",
+ "persistent=123",
+ "persistent=%d" % id,
+ "group=foo",
+ "group=foo peer=foo",
+ "group=foo peer=00:11:22:33:44:55 go_dev_addr=foo" ]:
+ if "FAIL" not in dev[0].request("P2P_INVITE " + cmd):
+ raise Exception("Invalid P2P_INVITE accepted: " + cmd)
sa = s[2]
id = s[3]
freq = s[4]
+ logger.info("Invalid P2P_INVITE test coverage")
+ if "FAIL" not in dev[0].global_request("P2P_INVITE persistent=" + id + " peer=" + sa + " freq=0"):
+ raise Exception("Invalid P2P_INVITE accepted")
+ if "FAIL" not in dev[0].global_request("P2P_INVITE persistent=" + id + " peer=" + sa + " pref=0"):
+ raise Exception("Invalid P2P_INVITE accepted")
logger.info("Re-initiate invitation based on upper layer acceptance")
if "OK" not in dev[0].global_request("P2P_INVITE persistent=" + id + " peer=" + sa + " freq=" + freq):
raise Exception("Invitation command failed")