All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect
@ 2020-05-06 15:58 James Prestwood
  2020-05-06 15:58 ` [PATCH 2/2] auto-t: remove scanning wait from testHiddenNetworks James Prestwood
  2020-05-06 16:46 ` [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect Kourt, Tim A
  0 siblings, 2 replies; 5+ messages in thread
From: James Prestwood @ 2020-05-06 15:58 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

In certain cases the test was reaching this point once already finished
with a scan. This caused the wait for 'scanning' to time out. At this point
in the test we don't need to wait for scanning and only need to wait for
scanning to finish. If scanning is already finished before validation we
can simply validate at that time.
---
 autotests/testConnectAutoconnect/validation.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/autotests/testConnectAutoconnect/validation.py b/autotests/testConnectAutoconnect/validation.py
index 43cbaf02..b1e3accc 100644
--- a/autotests/testConnectAutoconnect/validation.py
+++ b/autotests/testConnectAutoconnect/validation.py
@@ -54,9 +54,6 @@ class TestConnectAutoConnect(unittest.TestCase):
         self.assertIsNotNone(devices)
         device = devices[0]
 
-        condition = 'obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
         condition = 'not obj.scanning'
         wd.wait_for_object_condition(device, condition)
 
-- 
2.21.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] auto-t: remove scanning wait from testHiddenNetworks
  2020-05-06 15:58 [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect James Prestwood
@ 2020-05-06 15:58 ` James Prestwood
  2020-05-06 16:46 ` [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect Kourt, Tim A
  1 sibling, 0 replies; 5+ messages in thread
From: James Prestwood @ 2020-05-06 15:58 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Same deal as with testKnownNetworks, the wait for scanning to stop
has been removed since scanning may not be running at this point.
---
 autotests/testHiddenNetworks/validation.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/autotests/testHiddenNetworks/validation.py b/autotests/testHiddenNetworks/validation.py
index 9c433623..551f12c7 100644
--- a/autotests/testHiddenNetworks/validation.py
+++ b/autotests/testHiddenNetworks/validation.py
@@ -50,8 +50,6 @@ class TestConnectAutoConnect(unittest.TestCase):
         device = devices[0]
 
         if autoconnect:
-            condition = 'obj.scanning'
-            wd.wait_for_object_condition(device, condition)
             condition = 'not obj.scanning'
             wd.wait_for_object_condition(device, condition)
 
-- 
2.21.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect
  2020-05-06 15:58 [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect James Prestwood
  2020-05-06 15:58 ` [PATCH 2/2] auto-t: remove scanning wait from testHiddenNetworks James Prestwood
@ 2020-05-06 16:46 ` Kourt, Tim A
  2020-05-06 16:52   ` James Prestwood
  1 sibling, 1 reply; 5+ messages in thread
From: Kourt, Tim A @ 2020-05-06 16:46 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

Hi James,

On 5/6/2020 8:58 AM, James Prestwood wrote:
> In certain cases the test was reaching this point once already finished
> with a scan. This caused the wait for 'scanning' to time out. At this point
> in the test we don't need to wait for scanning and only need to wait for
> scanning to finish. If scanning is already finished before validation we
> can simply validate at that time.
> ---
>   autotests/testConnectAutoconnect/validation.py | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/autotests/testConnectAutoconnect/validation.py b/autotests/testConnectAutoconnect/validation.py
> index 43cbaf02..b1e3accc 100644
> --- a/autotests/testConnectAutoconnect/validation.py
> +++ b/autotests/testConnectAutoconnect/validation.py
> @@ -54,9 +54,6 @@ class TestConnectAutoConnect(unittest.TestCase):
>           self.assertIsNotNone(devices)
>           device = devices[0]
>   
> -        condition = 'obj.scanning'
> -        wd.wait_for_object_condition(device, condition)
> -
What if the scan has never started yet? Since iwd is started from 
Python, it looks suspicious that it goes through the scan before it hits 
the conditional wait a few lines down the script. Perhaps changing to 
wd.list_devices(1) API has introduced this issue. Would it help to 
increase the conditional wait time out so it goes into the second round 
of scans for these certain cases?

>           condition = 'not obj.scanning'
>           wd.wait_for_object_condition(device, condition)
>   
Best,
Tim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect
  2020-05-06 16:46 ` [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect Kourt, Tim A
@ 2020-05-06 16:52   ` James Prestwood
  2020-05-06 17:02     ` Kourt, Tim A
  0 siblings, 1 reply; 5+ messages in thread
From: James Prestwood @ 2020-05-06 16:52 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 2017 bytes --]

Hi Tim,

On Wed, May 6, 2020 at 9:46 AM Kourt, Tim A <tim.a.kourt@linux.intel.com> wrote:
>
> Hi James,
>
> On 5/6/2020 8:58 AM, James Prestwood wrote:
> > In certain cases the test was reaching this point once already finished
> > with a scan. This caused the wait for 'scanning' to time out. At this point
> > in the test we don't need to wait for scanning and only need to wait for
> > scanning to finish. If scanning is already finished before validation we
> > can simply validate at that time.
> > ---
> >   autotests/testConnectAutoconnect/validation.py | 3 ---
> >   1 file changed, 3 deletions(-)
> >
> > diff --git a/autotests/testConnectAutoconnect/validation.py b/autotests/testConnectAutoconnect/validation.py
> > index 43cbaf02..b1e3accc 100644
> > --- a/autotests/testConnectAutoconnect/validation.py
> > +++ b/autotests/testConnectAutoconnect/validation.py
> > @@ -54,9 +54,6 @@ class TestConnectAutoConnect(unittest.TestCase):
> >           self.assertIsNotNone(devices)
> >           device = devices[0]
> >
> > -        condition = 'obj.scanning'
> > -        wd.wait_for_object_condition(device, condition)
> > -
> What if the scan has never started yet? Since iwd is started from
> Python, it looks suspicious that it goes through the scan before it hits
> the conditional wait a few lines down the script. Perhaps changing to
> wd.list_devices(1) API has introduced this issue. Would it help to
> increase the conditional wait time out so it goes into the second round
> of scans for these certain cases?

I can try increasing the timeout, but I think relying on periodic
scans for this autotest isn't the best way to go about it. I will try
explicitly scanning via dbus, otherwise you are just hoping that a
periodic scan was started. This timing will vary slightly between
systems which is why I think I am hitting this.

>
> >           condition = 'not obj.scanning'
> >           wd.wait_for_object_condition(device, condition)
> >
> Best,
> Tim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect
  2020-05-06 16:52   ` James Prestwood
@ 2020-05-06 17:02     ` Kourt, Tim A
  0 siblings, 0 replies; 5+ messages in thread
From: Kourt, Tim A @ 2020-05-06 17:02 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

Hi James,

>>> -        condition = 'obj.scanning'
>>> -        wd.wait_for_object_condition(device, condition)
>>> -
>> What if the scan has never started yet? Since iwd is started from
>> Python, it looks suspicious that it goes through the scan before it hits
>> the conditional wait a few lines down the script. Perhaps changing to
>> wd.list_devices(1) API has introduced this issue. Would it help to
>> increase the conditional wait time out so it goes into the second round
>> of scans for these certain cases?
> I can try increasing the timeout, but I think relying on periodic
> scans for this autotest isn't the best way to go about it. I will try
> explicitly scanning via dbus, otherwise you are just hoping that a
> periodic scan was started. This timing will vary slightly between
> systems which is why I think I am hitting this.
The purpose of this autotest and of the one with the hidden networks is 
to exercise auto-connection without an explicit call from Dbus 
(different code paths).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-06 17:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 15:58 [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect James Prestwood
2020-05-06 15:58 ` [PATCH 2/2] auto-t: remove scanning wait from testHiddenNetworks James Prestwood
2020-05-06 16:46 ` [PATCH 1/2] auto-t: remove scanning wait from testConnectAutoconnect Kourt, Tim A
2020-05-06 16:52   ` James Prestwood
2020-05-06 17:02     ` Kourt, Tim A

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.