[PATCH 3/9] tests: Clear scan cache on reset

Peer, Ilan ilan.peer at intel.com
Wed Jul 8 09:47:49 EDT 2015

> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Wednesday, July 08, 2015 15:58
> To: Peer, Ilan
> Cc: hostap at lists.shmoo.com
> Subject: Re: [PATCH 3/9] tests: Clear scan cache on reset
> On Thu, Jul 02, 2015 at 04:14:54PM +0300, Ilan Peer wrote:
> > Scan cache is kept in the kernel between different tests and may
> > affect the tests. Clear scan cache in reset().
> Do you have example test sequences where this is still causing issues? I have
> purposefully not done this type of change to force scan flushing for every
> device since that adds extra latency to testing. In addition, number of real
> issues in the past have been found because of the old results showing up in a
> new test case, so forcefully clearing the state would actually reduce coverage
> here.

We needed to reset the scan cache for some of tests in order to pass them as part of this refactoring (they were not failing originally).
Actually the cache should be reset for each test that performs p2p connection.
We initially handled this per test case as needed, but after contemplating about it we decided to add it to the reset(), since people are not always aware that each test may start with a totally irrelevant cache. This caused some random failures depending on the tests shuffling.
So maybe it is preferable to start each test from a well-known state, as otherwise an absolute test result is not really possible.
Also, clearing cache adds only few tens of ms delay, so it may worth it.


Ilan & Andrei :)

More information about the HostAP mailing list