From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 4/4] auto-t: add namespaces to testAP
Date: Tue, 17 Nov 2020 12:53:04 -0800 [thread overview]
Message-ID: <20201117205304.3542997-4-prestwoj@gmail.com> (raw)
In-Reply-To: <20201117205304.3542997-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1920 bytes --]
---
autotests/testAP/dhcp_config_test.py | 19 +++++++++++++++----
autotests/testAP/hw.conf | 6 +++++-
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/autotests/testAP/dhcp_config_test.py b/autotests/testAP/dhcp_config_test.py
index a278c3b7..975cab4d 100644
--- a/autotests/testAP/dhcp_config_test.py
+++ b/autotests/testAP/dhcp_config_test.py
@@ -16,7 +16,15 @@ class Test(unittest.TestCase):
# this range.
wd = IWD(True, '/tmp/dhcp')
- dev1, dev2 = wd.list_devices(2)
+ ns0 = ctx.get_namespace('ns0')
+
+ wd_ns0 = IWD(True, '/tmp/dhcp', namespace=ns0)
+
+ dev1 = wd_ns0.list_devices(1)[0]
+ dev2, dev3, dev4, dev5 = wd.list_devices(4)
+ dev3.disconnect()
+ dev4.disconnect()
+ dev5.disconnect()
dev1.start_ap('APConfig')
@@ -51,11 +59,14 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(dev2, condition)
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.1.1")
+ #
+ # TODO: cannot yet check the AP interface IP since its in a
+ # different namespace.
+ #
testutil.test_ip_address_match(dev2.name, "192.168.1.3")
+ testutil.test_ip_connected(('192.168.1.3', ctx), ('192.168.1.1', ns0))
+
wd.unregister_psk_agent(psk_agent)
dev2.disconnect()
diff --git a/autotests/testAP/hw.conf b/autotests/testAP/hw.conf
index bac128b2..c9c0c7ca 100644
--- a/autotests/testAP/hw.conf
+++ b/autotests/testAP/hw.conf
@@ -1,6 +1,10 @@
[SETUP]
-num_radios=5
+num_radios=6
start_iwd=0
+hwsim_medium=no
[HOSTAPD]
rad0=psk-ccmp.conf
+
+[NameSpaces]
+ns0=rad5
--
2.26.2
next prev parent reply other threads:[~2020-11-17 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 20:53 [PATCH 1/4] test-runner: introduce network namespaces James Prestwood
2020-11-17 20:53 ` [PATCH 2/4] auto-t: update utilities to use namespaces James Prestwood
2020-11-17 20:53 ` [PATCH 3/4] auto-t: add test_ip_connected to testutil James Prestwood
2020-11-17 20:53 ` James Prestwood [this message]
2020-11-18 17:01 ` [PATCH 1/4] test-runner: introduce network namespaces 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=20201117205304.3542997-4-prestwoj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox