Commit Graph

15 Commits

Author SHA1 Message Date
Andrew Zaborowski c4fe900a71 auto-t: In testNetconfig verify routes created
Check that the right set of routes is being added for IPv4 and IPv6.
Chane gateway addresses to differ from the AP or dhcpd addresses.
2022-06-22 15:57:22 -05:00
Andrew Zaborowski 57888632a3 auto-t: Validate netmasks in testNetconfig, add utility
Extend test_ip_address_match to support IPv6 and to test the
netmask/prefix length while it reads the local address since those are
retrieved using the same API.

Modify testNetconfig to validate the prefix lengths, change the prefix
lengths to be less common values (not 24 bits for IPv4 or 64 for IPv6),
minor cleanup.
2022-06-22 15:56:35 -05:00
James Prestwood 416ad05ce7 auto-t: fix up a few issues in testNetconfig
- Setting the IP address was resulting in an error:

   Error: any valid prefix is expected rather than "wln58".

   This is fixed by reordering the arguments with the IP address first

 - Remove the sleep, and use non_block_wait to wait for the IPv6 address
   to be set.
2022-03-30 15:26:42 -05:00
James Prestwood 327f719f91 auto-t: remove waitstatus_to_exitcode for better compatibility
This was added in Python 3.9 which isn't always supported. Instead use
the subprocess module which automatically checks the command output.
2022-03-28 12:38:15 -05:00
Torsten Schmitz 22c77cc037 auto-t: replace ifconfig with ip commands
ifconfig has long been deprecated in favor of ip from iproute2.
It is usually no longer installed by default.
2021-11-11 14:29:54 -06:00
Denis Kenzior 05ae9689eb auto-t: use tmp radvd pid file
On some systems the default radvd pid file location is not accessible.
Specify it to be under /tmp instead.

While there, enable full radvd debug output so it is logged when
test-runner is invoked with the --log option.
2021-11-10 09:17:17 -06:00
Andrew Zaborowski d30fc97815 autotests: Test DHCPv6 client in testNetconfig 2021-11-09 14:32:50 -06:00
James Prestwood 4657bd55f5 auto-t: Update Process changes in a few autotests 2021-08-26 08:52:48 -05:00
James Prestwood 382b73c11a auto-t: cleanup dhcpd.leases[~] in testNetconfig 2021-08-13 15:18:40 -05:00
James Prestwood a15b781feb auto-t: update all tests to remove bad scanning logic
This changes all tests to use the default get_ordered_network behavior
rather than some custom or incorrect logic. Any use of
scan_if_needed=True has been removed since this is now the default.
Also any explicit scanning has been removed for tests which do not
require it (where the default behavior is good enough).
2021-08-12 16:59:03 -05:00
James Prestwood e5a66bf51f auto-t: testNetconfig stop dhcpd correctly
Use stop_process instead of kill as this removes the process
from the test context.
2021-02-26 10:08:03 -06:00
James Prestwood fde1012f5d auto-t: add static netconfig test
Tests netconfig with a static configuration, as well as tests ACD
functionality.

The test has two IWD radios which will eventually use the same IP.
One is configured statically, one will receive the IP via DHCP.
The static client sets its IP first and begins using it. Then the
DHCP client is started. Since ACD in a DHCP client is configured
to use its address indefinitely, the static client *should* give
up its address.
2020-12-08 16:29:09 -06:00
James Prestwood 16698d0c9a auto-t: fix testNetconfig hardcoded interface
If running multiple tests testNetconfig would fail due to the
hardcoded wln0 in the dhcpd.conf file. dhcpd can actually start
by passing in the interface to the run command rather than
inside the config file.
2020-11-03 13:58:23 -06:00
James Prestwood 1e8fedce6c auto-t: fix testNetconfig
The interface was hard coded to wln0 which works when running single
tests but not when running multiple. Instead use the actual ifname
that hostapd is using.
2020-09-17 16:17:57 -05:00
James Prestwood 2f51b51152 auto-t: add netconfig autotest
Tests that DHCP using IWD's internal netconfig functions properly.
The actual IP address assignment is not verified, but since IWD does
not signal the connection as successful unless DHCP succeeds we
can assume it was successful by checking that the device is connected.

The process of actually starting dhcpd and configuring the interfaces
is quite simple so it was left in the autotest itself. If (or when)
more tests require IP capabilities (p2p, FILS, etc) this could be
moved into test-runner itself and be made common. The reason I did not
put it in there now is a) because this is the only test and b) more
complex DHCP cases are likely to develop and may require more than this
simplistic setup (like multiple APs/interfaces)
2020-09-15 20:20:40 -05:00