All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 8/9] autotests: Update APRanges usage in testAP
Date: Thu, 13 May 2021 12:04:56 -0700	[thread overview]
Message-ID: <f6419d030212a90dcae58f9e55731a5129e2a1c2.camel@gmail.com> (raw)
In-Reply-To: <20210513184718.265483-8-andrew.zaborowski@intel.com>

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

Hi Andrew,

On Thu, 2021-05-13 at 20:47 +0200, Andrew Zaborowski wrote:
> [General].APRange is now [IPv4].APAddressPool and the netmask is
> changed
> from 23 to 27 bits to make the test correctly assert that only two
> default-sized subnets are allowed by IWD simultaneously (default has
> changed from 24 to 28 bits)
> ---
>  autotests/testAP/dhcp/main.conf |  4 +++-
>  autotests/testAP/dhcp_test.py   | 12 +++++++++---
>  2 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/autotests/testAP/dhcp/main.conf
> b/autotests/testAP/dhcp/main.conf
> index 667de23c..62ae782d 100644
> --- a/autotests/testAP/dhcp/main.conf
> +++ b/autotests/testAP/dhcp/main.conf
> @@ -3,4 +3,6 @@ DisableMacAddressRandomization=true
>  
>  [General]
>  EnableNetworkConfiguration=true
> -APRanges=192.168.80.0/23
> +
> +[IPv4]
> +APAddressPool=192.168.80.0/27
> diff --git a/autotests/testAP/dhcp_test.py
> b/autotests/testAP/dhcp_test.py
> index bf52fb28..e69c4465 100644
> --- a/autotests/testAP/dhcp_test.py
> +++ b/autotests/testAP/dhcp_test.py
> @@ -58,8 +58,14 @@ class Test(unittest.TestCase):
>              testutil.test_iface_operstate(dev2.name)
>              testutil.test_ifaces_connected(dev1.name, dev2.name,
> group=False)
>  
> -            testutil.test_ip_address_match(dev1.name,
> "192.168.80.1")
> -            testutil.test_ip_address_match(dev2.name,
> "192.168.80.2")
> +            try:
> +                testutil.test_ip_address_match(dev1.name,
> "192.168.80.1")
> +                testutil.test_ip_address_match(dev2.name,
> "192.168.80.2")
> +                ip = "192.168.80.1"
> +            except:
> +                testutil.test_ip_address_match(dev1.name,
> "192.168.80.17")
> +                testutil.test_ip_address_match(dev2.name,
> "192.168.80.18")
> +                ip = "192.168.80.17"

Not really a huge fan of this try/except. Why is it not deterministic
which IP each station will have? I'm probably missing something with
the previous patches but with the new APAddressPool you set you should
have a range of .80.1 to .80.31 right? So why wouldn't the DHCP server
just choose 80.1 and 80.2 still?

>  
>              wd.unregister_psk_agent(psk_agent)
>  
> @@ -76,7 +82,7 @@ class Test(unittest.TestCase):
>              # got initially.
>              dev4.start_ap('TestAP4', 'Password4')
>  
> -            testutil.test_ip_address_match(dev4.name,
> "192.168.80.1")
> +            testutil.test_ip_address_match(dev4.name, ip)
>  
>          finally:
>              dev1.stop_ap()

Thanks,
James


  reply	other threads:[~2021-05-13 19:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 18:47 [PATCH 1/9] ap: Make rtnl global static Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 2/9] ap: Track IPv4 addresses in use Andrew Zaborowski
2021-05-14 15:26   ` Denis Kenzior
2021-05-14 22:16     ` Andrew Zaborowski
2021-05-17 12:55       ` Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 3/9] ap: Add subnet address selection logic Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 4/9] ap: Refactor DHCP settings loading Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 5/9] ap: Refactor global address pool loading Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 6/9] ap: Move the DHCP server freeing to ap_reset Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 7/9] ap: Send a specific error message on async AP start failure Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 8/9] autotests: Update APRanges usage in testAP Andrew Zaborowski
2021-05-13 19:04   ` James Prestwood [this message]
2021-05-13 19:47     ` Andrew Zaborowski
2021-05-13 18:47 ` [PATCH 9/9] doc: Update AP settings in iwd.ap(5) and iwd.config(5) Andrew Zaborowski
2021-05-14 14:53 ` [PATCH 1/9] ap: Make rtnl global static Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6419d030212a90dcae58f9e55731a5129e2a1c2.camel@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.