Commit graph

222 commits

Author SHA1 Message Date
Yu Watanabe 7d7bb5c861 test-network: extend sleep time
Even if addresses provided by DHCP is assigned, the state file may not
be written yet, or resolved may not receive the state change signal
yet, or resolved may not process the signal yet...
2019-07-17 01:01:10 +09:00
Yu Watanabe e2aea43f31 test-network: make wait_online() check setup state
Previously, event if link's setup state is in failed, tests may pass,
as systemd-networkd-wait-online success if the state is in failed state.
This makes tests be checked more strictly.
2019-07-16 01:32:24 +09:00
Yu Watanabe e0c1341df2 test-network: add tests for DHCPv4.UseDomains= 2019-07-15 00:43:15 +09:00
Yu Watanabe 6d60f9dbe6 test-network: add tests for route with type local, multicast, anycast, or broadcast 2019-07-12 09:39:43 +09:00
Yu Watanabe 5424fd9573 test-network: test more bridge properties
Imported from networkd-test.py
2019-07-12 09:39:43 +09:00
Yu Watanabe 6fa0524133
Merge pull request #12971 from yuwata/network-reassign-static-routes
network: reassign static routes and process reply address messages
2019-07-12 09:36:16 +09:00
Yu Watanabe c1b01a62d1 test-network: add test for route reassignment 2019-07-11 22:37:58 +09:00
Yu Watanabe 74761cf37e test-network: add testcase that Neighbor.LinkLayerAddress= is IP address 2019-07-11 22:22:29 +09:00
Yu Watanabe d86f5c194c test-network: use Neighbor.LinkLayerAddress= instead of deprecated Neighbor.MACAddress= 2019-07-11 22:22:29 +09:00
Lennart Poettering 66d3159739
Merge pull request #13018 from yuwata/network-tunnel-follow-up-13016
network: drop assertions about Tunnel.family
2019-07-11 12:10:39 +02:00
Yu Watanabe cef94248ff test-network: drop test_udev_driver as it is unstable
The test unexpectedly succeeds on KVM with sanitizer CI.
At least tentatively, let's drop the test.
2019-07-11 11:17:20 +02:00
Lennart Poettering 7e82b4059b
Merge pull request #13006 from yuwata/network-split-dhcp-12917
networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options
2019-07-11 10:28:03 +02:00
Yu Watanabe 42a29fcb12 test-network: add testcases Tunnel.Remote=any and Local=any 2019-07-11 15:09:50 +09:00
Yu Watanabe e64dc40615 test-network: add test for Xfrm netdev 2019-07-11 11:51:23 +09:00
Yu Watanabe 95082dbef5 test-network: add test for AssignToLoopback= setting 2019-07-11 09:59:06 +09:00
Yu Watanabe e2d5aab32a test-network: add tests for UseDNS= in [DHCP] section 2019-07-10 17:44:43 +09:00
Yu Watanabe b6d587d1d2 test-network: enable systemd-resolved.service 2019-07-10 17:40:14 +09:00
Yu Watanabe 16e233d0bb
Merge pull request #12970 from ddstreet/gh12969
src/network/networkd-dhcp4.c: set prefsrc for classless or static routes
2019-07-08 21:18:04 +09:00
Yu Watanabe c38d2d4d59 test-network: add tests for DHCP.UseRoutes=no with custom route settings
This adds test for b5799eeb07.

Closes #12951.
2019-07-06 08:23:10 +09:00
Yu Watanabe 4c882c16be test-network: add testcase for DHCP client with static address
Testcase for #12969.
2019-07-06 07:39:23 +09:00
Yu Watanabe 6f94379833 test-network: add tests for BridgeVLAN 2019-07-05 16:39:39 +09:00
Yu Watanabe aaae57139b test-network: show debug logs of networkd 2019-07-05 02:47:42 +09:00
Yu Watanabe e28fd95ffb test-network: add udev related tests for networkctl 2019-07-02 09:43:21 +02:00
Yu Watanabe 6b9518a0e8 test-network: add test for Property= in [Match] section 2019-07-01 06:53:35 +09:00
Yu Watanabe 2cf6fdff19 test-network: change default sleep time of start_networkd() 2019-06-18 13:10:23 +09:00
Yu Watanabe 90e3bcbd4d test-network: use wait-online in NetworkdBridgeTests 2019-06-18 13:10:23 +09:00
Yu Watanabe 35a78c5131 test-network: use wait-online in NetworkdBondTests 2019-06-18 12:45:19 +09:00
Yu Watanabe 8d17c386d7 test-network: use setUp() and tearDown() to clear routing policy rule tables 2019-06-18 12:45:17 +09:00
Yu Watanabe ad78d7b027 test-network: rename l2tp_tunnel_remove -> remove_l2tp_tunnels 2019-06-18 11:35:12 +09:00
Yu Watanabe 4ef39b4991 test-network: remove all routing policy rules in specified table 2019-06-18 11:35:12 +09:00
Zbigniew Jędrzejewski-Szmek 6ea420a3b6
Merge pull request #12796 from yuwata/test-network-use-wait-online
test-network: several cleanups
2019-06-15 14:53:04 +02:00
Yu Watanabe 4c2459c692 test-network: drop redundant operstate checking 2019-06-14 16:50:07 +09:00
Yu Watanabe df7f9afaa7 test-network: replace check_link_exists() with wait_online() 2019-06-14 16:49:39 +09:00
Yu Watanabe 01943d43f4 test-network: explicitly set sleep time 2019-06-14 16:47:40 +09:00
Yu Watanabe 5239d7b34e test-network: suppress error message in cleanup process 2019-06-14 16:45:50 +09:00
Yu Watanabe 1285edf39c test-network: add test for ConfigureWithoutCarrier= 2019-06-14 05:25:35 +09:00
Yu Watanabe 4933b97d59 test-network: add more test cases when ipv6 is disabled 2019-06-12 11:04:10 +09:00
Yu Watanabe 1e498853a3 test-network: add tests for KeepConfiguration= 2019-06-06 23:36:27 +09:00
Zbigniew Jędrzejewski-Szmek 88aaf89ecb networkd-tests.py: properly escape pluses in regexps
Python warns that '\+' is an invalid escape. We need either '\\+' or r'\+'.
2019-06-06 14:11:28 +02:00
Zbigniew Jędrzejewski-Szmek ec38833c75 networkd-tests.py: remove some java-style boilerplate
A class was used to put some utility functions under a namespace. But then this
namespace was inherited into classes, so the namespace split was undone. Let's
just define those functions in the module namespace.

(The Utilities class with a few functions still remain, because of the
unittest-style self.assert* craziness.)
2019-06-06 14:11:28 +02:00
Zbigniew Jędrzejewski-Szmek cefd6b3db8 networkd-tests.py: use check_output() instead of unittests' assertEqual()
It's pretty much the same thing, but more in pytest style, without the
unittest boilerplate.
2019-06-06 14:11:28 +02:00
Zbigniew Jędrzejewski-Szmek 371810d18a networkd-tests.py: add helpers to common subprocess call patterns
For normal shell calls, python syntax is quite verbose. We don't need to punish
ourselves like that. In some places we would fork a shell to do argument splitting
for us. We know that our arguments can be safely split on whitespace, so let's do
that ourselves in all cases, without forking a shell.

We also expect command output to be valid text, so let's always set
universal_newlines=True.

This makes things shorter and easier to read. Development is also easier because
it's possible to paste many of the commands directly to/from a shell.
2019-06-06 14:11:28 +02:00
Zbigniew Jędrzejewski-Szmek 632037cf4a networkd-tests.py: remove unused import 2019-06-06 13:58:58 +02:00
Yu Watanabe d90f4f7d91 test-network: do not directly compare two results of "ip address"
As it contains lifetime of the address.
2019-06-05 19:42:12 +09:00
Yu Watanabe e16ffe7954 test-network: do not allow addresses in tentative state 2019-06-05 16:35:20 +09:00
Yu Watanabe 78690bb5d0 test-network: disable SystemCallFilter= when *SAN is enabled 2019-06-04 01:29:28 +09:00
Yu Watanabe 6d5b4efed2 test-network: add test for MTU field of 'networkctl status' 2019-06-04 01:29:28 +09:00
Yu Watanabe bee692fd38 test-network: add tests for "networkctl delete" 2019-06-04 01:29:28 +09:00
Yu Watanabe 1ca44d7dfd test-network: move networkctl related tests to NetworkctlTests class 2019-06-04 01:29:24 +09:00
Yu Watanabe 72917fcc65 test-network: show systemd-networkd.service
As there may exist some other drop-in configs.
2019-05-31 13:58:27 +09:00