[PATCH v2 12/12] tests: P2PS channel handling
Peer, Ilan
ilan.peer
Mon Oct 12 06:34:54 PDT 2015
> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Sunday, October 11, 2015 19:16
> To: Peer, Ilan
> Cc: hostap at lists.shmoo.com
> Subject: Re: [PATCH v2 12/12] tests: P2PS channel handling
>
> On Thu, Oct 08, 2015 at 12:36:07PM +0300, Ilan Peer wrote:
> > Add tests to verify proper handling of channel considerations in P2PS
> > PD.
>
> > diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py
>
> > +def test_p2ps_channel_both_connected_same(dev, apdev):
> > + """P2PS connection with P2PS method - stations connected on same
> channel"""
>
> This fails for me every time even when run as a single test case with vm-
> run.sh. This is with unmodified test scripts and configuration. The failure is
> "Exception: P2P-GROUP-STARTED timeout on 02:00:00:00:00:00".
> It looks like dev[0] has some strange issues with scan when trying to join the
> group. This happens when processing the "P2P_CONNECT
> 42:00:00:00:01:00 12345670 p2ps persistent join" command. This sends a
> scan triger to the driver and that command seems to succeed and there is
> even a scan trigger event indicating that the scan started. However, the test
> script times out after ten seconds of not having seen scan results.
>
I thought that I've eliminated this when using the same frequency for the listen
channel and operating frequency (got clean results on 2 different setups and VM). I'll
try to have another look at this in mac80211_hwsim.
> It looks like the scans of all channels while associated takes a bit over ten
> seconds. Increasing the timeout for P2P-GROUP-STARTED in
> p2ps_connect_pd() for the join case is enough to make this pass.
> However, there is not really much need for making this test case take so long
> by forcing a full channel scan while connected. "freq=2437"
> argument should be added to the P2P_CONNECT-join command to make this
> use a single channel scan.
>
> > + dev[0].global_request("P2P_SET listen_channel 6")
> > + dev[1].global_request("P2P_SET listen_channel 6")
>
> I don't want to do this for dev[0] and ideally not for dev[1] either.
> Using random listen channels on the devices gives a significant extra coverage
> for testing and that needs to remain until such time that there is proper test
> cases going through all different combinations of P2P operations and
> matching vs. non-matching listen channels.
>
> For now, I'll replace this with use of dev[2] and dev[1] and setting a random
> listen_chan at the end of the test case.
>
Sure. This is much cleaner.
> > +def test_p2ps_channel_active_go_and_station_same(dev, apdev):
>
> > + dev[0].global_request("P2P_SET listen_channel 11")
> > + dev[1].global_request("P2P_SET listen_channel 11")
>
> Same here..
>
> > + p2ps_connect_pd(dev[0], dev[1], ev0, ev1)
>
> This was also timing out on full scan while connected, so fixed it with
> "freq=2462" added to the P2P_CONNECT-join command.
>
> > +def test_p2ps_channel_active_go_and_station_different(dev, apdev):
> > + # Add a P2P GO on the seeker. Force the listen channel to be the
> same,
> > + # as extended listen will not kick as long as P2P GO is waiting for
> > + # initial connection.
> > + dev[1].global_request("P2P_SET listen_channel 11")
>
> Same as above, i.e., returning random listen channel at the end of the test
> case.
>
> --
Thanks again,
Ilan.
More information about the Hostap
mailing list