Commit graph

831 commits

Author SHA1 Message Date
Yu Watanabe 41231f2697 test-network: add test for ManageForeignNextHops=no 2023-12-13 00:02:36 +09:00
Yu Watanabe e7660b9aff test-network: reduce indent for verification 2023-12-12 23:51:10 +09:00
Yu Watanabe 77633317ce test-network: drop redundant call of tearDown() 2023-12-12 23:51:10 +09:00
Frantisek Sumsal e4a80de119 test: temporarily skip checking NFT sets in test_address_static
Until https://github.com/systemd/systemd/issues/30427 is resolved.
2023-12-12 12:25:47 +01:00
Frantisek Sumsal 8ed7800d7b test: temporarily disable test_sysctl
Until https://github.com/systemd/systemd/issues/30056 is resolved.
2023-12-12 12:20:41 +01:00
Yu Watanabe 2527b725ba
Merge pull request #30156 from yuwata/network-mtu
network: accept arbitrary size of MTU in .network
2023-12-12 19:03:21 +09:00
Luca Boccassi 7aea3cf8c2
Merge pull request #30404 from yuwata/network-peer
network/route: fix reachability check when peer address is specified
2023-12-10 14:13:37 +00:00
Yu Watanabe 7618fd06ef test-network: check if networkd exits cleanly 2023-12-10 14:40:09 +09:00
Yu Watanabe 5e46ca9890 test-network: add test case for issue #30403 2023-12-10 14:04:28 +09:00
Yu Watanabe 470a329d98 test-network: add test for small MTU for vcan
Prompted by https://github.com/systemd/systemd/issues/30140#issuecomment-1837973580.
2023-12-08 10:47:42 +09:00
Zbigniew Jędrzejewski-Szmek bfa95c369a
Merge pull request #29987 from yuwata/network-bridge-vlan
network: remove unnecessary bridge vlan IDs
2023-12-06 22:25:42 +01:00
Yu Watanabe b65c539088 test-network: add tests for [DHCPv4] AllowList= and DenyList=
We have not tested if the settings actually filter DHCP servers.
Let's add a test case for the settings.

Note, the .network file used here has been unused since
0730e3767d. So, we can freely reuse it
without changing other test cases.

Closes #30107.
2023-11-22 05:37:04 +09:00
Yu Watanabe 60f4b2c560 test-network: extend tests for [BridgeVLAN] settings 2023-11-13 03:58:46 +09:00
Yu Watanabe 1805e2cb05 test-network: add test case for issue #29979 2023-11-11 03:57:59 +09:00
Yu Watanabe 3aa47694d1 test-network: verify json format about DHCPv6 client status 2023-11-09 01:31:17 +09:00
Yu Watanabe d377949085 test-network: test MultiPathRoute= via another interface
Prompted by https://github.com/systemd/systemd/pull/14194#issuecomment-1795489641.
2023-11-06 20:59:49 +00:00
Frantisek Sumsal 33b0e0c09a test-network: copy rules from source & build trees if needed
When running with --build-dir= we need to copy over udev rules from
$BUILD_DIR/udev.d/ and $SOURCE_TREE/udev.d/ to make stuff work as
expected.
2023-10-30 21:13:00 +00:00
Ronan Pigott 2beecc7077 test-network: add dhcp rapid commit test 2023-10-27 10:55:55 -07:00
Yu Watanabe dd59a609be test-network: suppress too much outputs of state file
Follow-up for 0f9efffaeb.
2023-10-26 12:26:19 +09:00
Yu Watanabe 0f9efffaeb test-network: wait for the state file being updated
Also, sync state files before read.

Addresses the first issue in #29678.
2023-10-24 23:22:27 +09:00
Yu Watanabe cb0e97e7de test-network: drop unnecessary explicit stop of dnsmasq 2023-10-12 18:34:20 +09:00
Yu Watanabe aa7336f1d3 test-network: add test case for renewing DHCP lease 2023-10-12 18:33:52 +09:00
Yu Watanabe 46f2eb517c test-network: add tests for DHCP IPv6 only mode
For [DHCPv4] IPv6OnlyMode= and [DHCPServer] IPv6OnlyPreferredSec=.
2023-10-11 21:42:13 +09:00
Luca Boccassi 00dd4e78f6
Merge pull request #29495 from yuwata/network-manager-state-file
network: fixlets for manager state file
2023-10-08 22:46:44 +01:00
Yu Watanabe 2d7ca6b45d test-network: add test for DHCPv6 information requesting mode
For issue #28566.
2023-10-08 16:31:59 +09:00
Yu Watanabe 34290c6aa9 test-network: test for NTP servers by DHCPv6 protocol
For issue #29148.
2023-10-08 15:45:35 +09:00
Yu Watanabe 8fc7e073e3 test-network: extend testcase for tbf
For issue #29485.
2023-10-07 21:35:16 +09:00
Yu Watanabe e081ffc114 test-network: move get_dbus_dhcp_client_state() and friends to global 2023-10-06 10:16:27 +01:00
Yu Watanabe 6b524d70e3 test-network: add tests for [DHCPv4] RequestAddress= setting 2023-10-05 11:14:29 +09:00
Yu Watanabe b5c8f47102 test-network: test SIP servers obtained by DHCP
For issue #29145.
2023-10-04 08:41:26 +02:00
Yu Watanabe fcdd21ec6a tree-wide: fix typo 2023-10-04 08:58:10 +09:00
Yu Watanabe d5adff70c0 test-network: add test for multiple IPv6 null addresses
This also merges test_address_null() into test_address_static().
2023-09-18 10:22:08 +09:00
Yu Watanabe 47f1ce1677 test-network: add testcase for [DHCPServer] ServerAddress= with null address 2023-09-08 20:03:40 +09:00
Susant Sahani 681007ac20 test-network: Add test for PREF64 2023-09-06 15:53:11 +09:00
Yu Watanabe a832087979
Merge pull request #29023 from pelaufer/dhcp-prefix-dbus
Add dhcp client prefix lease information to networkd json output
2023-09-05 00:16:19 +09:00
pelaufer e1ef777192 Adding tests for dhcp client and dhcp6 client dbus state interface 2023-09-02 14:53:23 -06:00
pelaufer 8fb6320e4b Add dhcp client prefix lease information to networkd json output 2023-09-02 13:45:03 -06:00
Yu Watanabe 1d4c874d3c
Merge pull request #24570 from topimiettinen/nft-sets-v2
network: firewall integration with NFT sets
2023-09-01 20:13:39 +09:00
Topi Miettinen c742d7e801
test: testing for networkd NFTSet feature 2023-08-26 21:37:35 +03:00
Susant Sahani e448fcd01a test-network: re-add test for custom client identifier 2023-08-24 19:55:31 +09:00
Yu Watanabe 6ed69be98a Revert "network: DHCP6 client- Allow to send manual DUID"
This reverts commits 89e73ce86f and
543d2a4d45.

The commit assign "custom" to fixed DUID type 5. When making DUID fully
configurable, the type number should be also configurable. Also, the
fully custom DUID should be acceptable for DHCPv4.
2023-08-24 19:50:36 +09:00
Yu Watanabe 9475e23c90 network: several follow-ups for TCP-RTO setting
- rename TCPRetransmissionTimeOutSec= -> TCPRetransmissionTimeoutSec,
- refuse infinity,
- fix the input value verifier (USEC_PER_SEC -> USEC_PER_MSEC),
- use DIV_ROUND_UP() when assigning the value.

Follow-ups for 1412d4a4fe.
Closes #28898.
2023-08-22 15:02:59 +02:00
Susant Sahani 288f58c0b4 CI: network - Add test for route hoplimit 2023-08-18 15:52:14 +05:30
Luca Boccassi f9e653cfb7
Merge pull request #28870 from ssahani/rto-min-network
network: Route - allow to set TCP RTO
2023-08-18 09:23:45 +01:00
Susant Sahani 543d2a4d45 CI: network dhcp6 - Add test for custom client identifier 2023-08-17 23:52:33 +05:30
Susant Sahani 1791956e9c CI: network - Add test for route TCP RTO 2023-08-17 23:49:32 +05:30
Frantisek Sumsal 79f902eb09 Add .pylintrc to globally suppress warnings we don't really care about
Also, drop the respective disable directives from existing files.
2023-08-10 18:13:29 +02:00
Yu Watanabe f2bcd3245a test-network: add more tests for address properties 2023-07-31 18:15:26 +09:00
Yu Watanabe d19704cd21 test-network: add testcase for overriding Address.RouteMetric=
For issue #25843.
2023-07-31 02:31:17 +09:00
Yu Watanabe 2ede355908 test-network: add tests for several invalid neighbor settings, and overriding settings
This also makes the checks stricter.
2023-07-31 00:40:03 +09:00
Luca Boccassi fc3fe92bc8
Merge pull request #28508 from yuwata/network-next-dhcp4
network: several cleanups and fixes for DHCPv4 client
2023-07-29 12:15:38 +01:00
Susant Sahani ab2d9e2971 CI: network - Add test for rp_filter 2023-07-28 15:05:12 +05:30
Yu Watanabe 4001653ddb network/dhcp4: always honor specified gateway address
Follow-up for 77451f654a.

Now, gateway for routes to DNS or NTP servers should be correctly picked,
hence it is not necessary to adjust the gateway address in
dhcp4_request_route_auto() again.

Also, similar for classless static routes, let's always honor
gateway address specified in (non-classless) static routes.
2023-07-28 05:47:11 +09:00
Yu Watanabe 0ce86f5eeb network/dhcp4: always find suitable gateway for destination address
And if not found, refuse to configure the route.

If a DHCP server provides classless static or static routes, then we
should use the gateway for accessing a node in the range specified in
the route. E.g. if a DHCP server provides the default gateway is
192.168.0.1, and classless static route for 8.0.0.0/8 with gateway
192.168.0.2, then we should access 8.8.8.8 through 192.168.0.2 rather
than 192.168.0.1, but should use 192.168.0.1 for 9.9.9.9.

Fixes #28358.
2023-07-28 05:45:51 +09:00
Frantisek Sumsal 8bdece7479 network: fix fetching link properties
This fixes regression introduced in 5a0c810462 with which all requests
for link properties ended up with EINVAL as we kept hitting
the signature_is_single() assert in sd_bus_get_property().
2023-07-18 23:08:19 +02:00
Frantisek Sumsal 7e107bc31f test-network: probe a couple of uncovered networkctl codepaths 2023-07-18 21:42:39 +02:00
Frantisek Sumsal aca99a3a38 test-network: validate JSON where applicable 2023-07-18 21:42:39 +02:00
Frantisek Sumsal c1dd58b3b6 test-network: check for captive portals received via NDISC
This requires fairly recent radvd that supports sending RAs with captive
portals [0].

Also, this should hopefully provide coverage for issues like:
  - https://github.com/systemd/systemd/issues/28229
  - https://github.com/systemd/systemd/issues/28231
  - https://github.com/systemd/systemd/issues/28277

[0] https://github.com/radvd-project/radvd/pull/141
2023-07-18 11:38:58 +02:00
Frantisek Sumsal 5a000cd46f test-network: correctly support running systemd-udevd from the build dir
We create the udevadm -> systemd-udevd symlink during the install phase,
so it doesn't exist in the just compiled tree. This worked in CI since
the symlink is manually created there post-build.
2023-07-17 12:56:58 +02:00
Yu Watanabe fc25920c94 test-network: add tests for null addresses
For issue #26113.
2023-07-07 19:11:37 +09:00
Yu Watanabe 86f6760038 test-network: add one more testcase for DHCPv4 classless route
For issue #28280.
2023-07-07 06:57:08 +09:00
Yu Watanabe 62eaf8d039 test-network: drop ExecReload= in networkd.service and udevd.service
Follow-up for 0e07cdb0e7 and
f84331539d.
2023-07-06 14:55:58 +09:00
Ronan Pigott 1219391c9f test-network: add test for an invalid captive portal uri
This could probably be extended to include many more invalid uri
2023-07-03 13:47:12 -07:00
Yu Watanabe e4948bb2cd test-network: add test for static route with preferred source
This adds possible reproducer for issue #28009 (though, the issue is
highly racy, hence this may not trigger the issue reliably).
2023-07-03 16:13:49 +09:00
Yu Watanabe 7e30527806 test-network: check route more strictly 2023-07-03 16:06:17 +09:00
Yu Watanabe 86c2a76e09
Merge pull request #28132 from rpigott/dhcp-captive-portal
Implement RFC8910: captive portal dhcp options
2023-07-03 14:51:56 +09:00
Ronan Pigott dbe960f07f test-network: add tests for captive portal dhcp options 2023-07-02 01:13:43 -07:00
Frantisek Sumsal a5e478b24c test: fix test_vxlan with the latest iproute2
Some options were renamed and some options with default values are not
shown unless -d(etails) is repeated.

See: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1215e9d3862387353d8672296cb4c6c16e8cbb72
2023-06-30 17:33:40 +00:00
Yu Watanabe 856a247e19 test-network: add test for global IPv6PrivacyExtensions= setting 2023-06-29 21:58:23 +09:00
Yuxiang Zhu b67e8a4e3e
network: Add IgnoreDdontFragment= option for Fragmentation control (#28131)
From `ip-link(8)`:
> [no]ignore-df - enables/disables IPv4 DF
                      suppression on this tunnel.  Normally datagrams
                      that exceed the MTU will be fragmented; the
                      presence of the DF flag inhibits this, resulting
                      instead in an ICMP Unreachable (Fragmentation
                      Required) message.  Enabling this attribute causes
                      the DF flag to be ignored.

If this option is enabled for a GRE/GRETAP tunnel, the `DF` flag in the outer IP header
will not inherit the inner IP header's `DF` flag.

This is useful to transfer packets that exceed the MTU of the underlay
network.
2023-06-29 12:11:52 +02:00
Henrik Holst cf4dbd84ac
network: make degraded-carrier bond/bridge as routable (#27776)
This makes a bond or bridge interface in the degraded-carrier state but has a routable address
handled as routable operational state.

If the carrier is degraded but the address state is routable then the operational state should be
seen as routable and not degraded because that may be the case for bonds if some of the links are down,
but when that happens the bond as whole is still routable.

This also makes operational state to degraded if address state is degraded even if the link state is
degraded-carrier.

Fixes #22713.
2023-06-15 13:32:10 +09:00
Yu Watanabe 322bda8241
Merge pull request #27826 from yuwata/network-link-ready-without-ndisc-when-has-static-address
network: do not request dynamic addressing protocols finished when at…
2023-06-01 06:29:55 +09:00
Yu Watanabe 2f96a29c2c wait-online: request that at least one managed online interface exists
Fixes a regression caused by ab3aed4a03.

I thought the commit does not cause any severe regression. However,
drivers for network interfaces may be loaded later. So, we should wait
if no network interface is found.

Fixes #27822.
2023-05-31 22:12:03 +02:00
Yu Watanabe 9e7d91ed97 network: do not request dynamic addressing protocols finished when at least one static address is configured
The setting IPv6AcceptRA= is defaults to yes, hence, even if a .network
file for an interface has static IP address configuration, it may takes
few seconds for the interface being configured state, as NDisc for the
interface needs to be finished. That makes wait-online.service
needlessly slow. Typically, such delay is not necessary for statically
configured networks.

Let's make the required condition slightly relaxed; if a .network file
has static IP address configurations, then let's make the matching
interface enter the 'configured' state soon after the static addresses
configured on the interface.

Note, this does not change the default for IPv6AcceptRA=, hence, NDisc
still runs on interfaces by default. So, addresses, routes, DNS servers,
and so on based on RA will be assigned on interfaces later.

Strictly speaking, this breaks backward compatibility, but the previous
behavior is not clearly documented. If a user requested both static
IPv4 address and IPv6 SLAAC address configured before an interface being
entered to the 'configured' state, then '--ipv6' for wait-online can be
used. So, the behavior change should not cause severe regression.

Closes #27779.
2023-05-30 17:39:11 +09:00
Yu Watanabe 73d24e45f8 test-network: add tests for vlan QoS mapping 2023-05-24 11:15:44 +09:00
Yu Watanabe 82c60c939c test-network: add tests for static lease matching with chaddr
Follow-up for 4646cdaa37 (#27313).
2023-05-12 03:07:10 +09:00
Yu Watanabe 8e2449a5c9 test-network: add workaround for bug in iproute2 v6.2.0
Closes #27473.
2023-05-01 20:02:15 +02:00
Daan De Meyer 3ceb96e018 test: Install systemd-networkd-tests.py when install_tests is enabled 2023-03-29 12:18:42 +02:00
Dmitry V. Levin 30fd9a2dab treewide: fix a few typos in NEWS, docs and comments 2023-02-15 10:41:03 +00:00
Yu Watanabe e5e0743189 network: assume prefix length is full address size
The commit 0f707207b9 enables strong
warning about missing prefix length in Address= setting.
The change was done in v241, and was about 4 years ago.
Let's drop the legacy assumption and make the parser consistent with
'ip address' command.

C.f. #11307.
Closes #26102.
2023-01-19 22:09:10 +09:00
Yu Watanabe a93cc5d911 test-network: drop unused file 2023-01-19 21:22:22 +09:00
Yu Watanabe df0a741cdd test-network: reprocess the loopback network interface
Fixes the issue reported at https://github.com/systemd/systemd-centos-ci/pull/585#issuecomment-1385537641.
2023-01-18 14:08:14 +00:00
Yu Watanabe 56dfde0d54 test-network: add testcase for no managed interface 2022-12-22 16:42:55 +09:00
Yu Watanabe b09ec84700 test-network: split out wait-online related test case 2022-12-22 16:29:20 +09:00
Yu Watanabe 5432adae82 test-network: move one test case 2022-12-22 16:27:58 +09:00
Nick Rosbrook f68f644a16 test-network: add a test for renaming device to current altname 2022-12-15 10:36:14 -05:00
Yu Watanabe b448fc0a6f test-network: try to change MAC address more
Follow-up for 23b6bf274f.
2022-12-07 15:08:23 +01:00
Jian Zhang 23b6bf274f test-network: add test for bond mac address config
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
2022-12-06 14:41:31 +08:00
Yu Watanabe 77d5f36d93 test-network: add tests for RTT and ACK filter for CAKE 2022-11-19 07:08:26 +09:00
Yu Watanabe 7618ab1b71 test-network: skip test_match if alternative name is not supported by kernel
Fixes #25259.
2022-11-10 10:05:43 +00:00
Yu Watanabe fcd7998880 test-network: wait for bound interface to be processed by udevd
If another bound interface (dummy98) will be removed before that dummy99
is processed by udevd, then removing dummy98 in the next step makes the
target interface (test1) bring down.

Follow-up for 3e2f7c46da.
2022-11-02 08:24:01 +09:00
Luca Boccassi 2f23762451
Merge pull request #25192 from yuwata/wait-online-altname
wait-online: support alternative interface names
2022-11-01 18:31:08 +01:00
Yu Watanabe d8746f1620 test-network: explicitly prepare default.link
On CentOS CI (Arch), 99-default.link is masked. Let's explicitly provide
the same .link file with a different prefix number.
2022-11-01 22:38:37 +09:00
Yu Watanabe b95d35b5ed test-network: resolve interface name from alternative name 2022-11-01 22:38:37 +09:00
Yu Watanabe d7ff72ec9c test-network: fix use of undeclared variable 2022-11-01 22:38:37 +09:00
Yu Watanabe dee6c26f3e test-network: make link_exists() support alternative names 2022-11-01 22:38:37 +09:00
Yu Watanabe 3e2f7c46da test-network: add a testcase that all bound interfaces removed
Closes #4202.
2022-11-01 10:28:57 +00:00
Luca Boccassi 0be7f1936c
Merge pull request #25143 from yuwata/network-reconfigure-interface-when-renamed
network: reconfigure interface when renamed
2022-10-31 21:14:24 +01:00
Luca Boccassi 4b9cfe08ba
Merge pull request #25166 from yuwata/network-router-preference
network: adjust route metric based on router preference
2022-10-31 20:59:36 +01:00
Yu Watanabe fa4d3fed46 test-network: add testcase for reconfiguring interface 2022-10-31 09:35:05 +09:00
Frantisek Sumsal f9073c24de test-network: suppress a couple of minor pylint complaints 2022-10-30 20:52:24 +01:00
Frantisek Sumsal ef11b841cd test-network: sort standard imports before "third-party" ones 2022-10-30 20:52:20 +01:00
Frantisek Sumsal e43776595c test-network: drop a couple of useless f-strings 2022-10-30 20:43:35 +01:00
Frantisek Sumsal 0677130e81 test-network: use raw strings where appropriate 2022-10-30 20:43:28 +01:00
Frantisek Sumsal b3de9d7bda test-network: re-enable test_macsec
The outstanding kernel panic should be already fixed in recent enough
kernels by [0]. To make the test safe to run anywhere, let's implement
a simple kernel version check and run the test only if we're running
with at least kernel 6.x. The patch might be in some 5.x kernels as
well, but let's be on the safe side and use 6.x as a baseline here
(which is currently the case for Arch and Fedora Rawhide anyway).

[0] https://lore.kernel.org/netdev/7b3fd03e1a46047e5ffe2a389fe74501f0a93206.1656519221.git.sd@queasysnail.net/T/#u
2022-10-30 20:42:11 +01:00
Yu Watanabe ee3cbfdbbc test-network: rewrite wait-online address family tests
Fixes #25154.
2022-10-28 12:26:52 +02:00
Yu Watanabe bb80f633bf test-network: add testcase for router preference 2022-10-28 15:56:59 +09:00
Yu Watanabe b4f4f1191e test-network: show only IPv4 routes 2022-10-28 11:35:28 +09:00
Zbigniew Jędrzejewski-Szmek 0923b4253c tree-wide: replace "plural(s)" by "plurals"
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.

There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
2022-10-17 15:10:53 +02:00
Yu Watanabe 767bc538c5 test-network: fix matching string
This partially reverts 5515f2169c.
As the commit changes 'networkctl list', not 'networkctl status'.
2022-09-23 10:43:17 +09:00
Zbigniew Jędrzejewski-Szmek 5515f2169c networkctl: use "-" for empty fields
This looks nicer. Some fields were already using "-" as fallback, e.g. Speed,
so this makes things more consistent too.
2022-09-21 14:48:28 +02:00
Topi Miettinen a4640bed74 test: testing for networkd NetLabel feature 2022-08-29 14:23:17 +09:00
Yu Watanabe 8d2a55025b test-network: add missing online check 2022-08-28 08:07:25 +00:00
Yu Watanabe 93e898d624 test-network: add test for TCPCongestionControlAlgorithm= 2022-08-26 19:47:27 +09:00
Yu Watanabe b249834bc3 test-network: add test for issue #24377
The issue has been already fixed by
b05e52000b (PR #24020).
2022-08-20 20:50:02 +09:00
Yu Watanabe 5bd2a7c580 test-network: add helper functions for reading logs of networkd 2022-08-20 20:35:18 +09:00
Yu Watanabe 3af934bceb test-network: add tests for IPv4ACD and renewing DHCP address 2022-08-18 15:44:53 +09:00
Yu Watanabe fd022b1da5 test-network: drop unused .network file 2022-08-18 15:44:53 +09:00
Yu Watanabe 59edcf2b64 test-network: add/update module check
For https://github.com/systemd/systemd-centos-ci/pull/517.
2022-08-17 10:05:20 +00:00
Luca Boccassi e4e6cfaad0
Merge pull request #24301 from yuwata/network-tuntap
network/tuntap: introduce KeepFileDescriptor= setting
2022-08-16 23:06:16 +01:00
Yu Watanabe 21d0ed68ee test-network: add tests for MTUBytes= for bridge master and ports
Prompted by #24311.
2022-08-16 21:46:40 +00:00
Yu Watanabe ae014ecb3d test-network: add tests for KeepCarrier= for tuntap interfaces 2022-08-16 21:57:35 +09:00
Yu Watanabe 3f504b892b network/bridge: fix UseBPDU= and AllowPortToBeRoot=
Fixes bugs caused by 7f9915f0de.

Fixes #24268.
2022-08-14 06:56:05 +09:00
Yu Watanabe 85b1a14d70 test-network: use "systemctl restart" to restart networkd 2022-08-14 03:56:01 +09:00
Yu Watanabe 93f5ae6ba2 test-network: also set StartLimitIntervalSec=0 for systemd-networkd.socket
The socket unit is frequently restarted during the test.
2022-08-14 03:49:00 +09:00
Yu Watanabe 23b3819209 test-network: split out qdisc and wait-online tests from NetworkdNetworkTests 2022-08-09 19:37:50 +09:00
Yu Watanabe 4c7d13f4b2 test-network: split test_qdisc() and test_qdisc2()
And check module availability in each tests.

This also sorts qdisc tests.
2022-08-09 19:37:50 +09:00
Yu Watanabe 854f989958 test-network: check qdisc feature by module existence 2022-08-09 19:37:50 +09:00
Yu Watanabe 5cdc7c89cb test-network: rename tun99 and tap99
The names seem to be used in AWS.

This also merges test_tun() and test_tap().
2022-08-09 19:37:49 +09:00
Yu Watanabe 17479d51cc test-network: show stdout and stderr on failure in check_output() 2022-08-09 19:37:49 +09:00
Yu Watanabe 66504b22e2 test-network: drop unused text= arguments 2022-08-09 19:37:49 +09:00
Yu Watanabe b05c4d6bbf test-network: also run timesyncd under sanitizer or valgrind 2022-08-09 19:37:49 +09:00
Yu Watanabe 67a9b3ec94 test-network: use timedatectl in build directory 2022-08-09 19:37:49 +09:00
Yu Watanabe 49ad287292 test-network: support the case that l2tp module is not supported
Hopefully fixes the issue reported at
https://github.com/systemd/systemd-centos-ci/pull/517#issuecomment-1205399798.
2022-08-04 18:39:04 +00:00
Yu Watanabe e4e0b239f6 test-network: add test case for #23197 2022-08-02 03:43:04 +09:00
Yu Watanabe 32ab27afe8 test-network: reload udevd when .link file is copied/removed 2022-07-23 15:05:22 +09:00
Yu Watanabe c9fbe0bd10
Merge pull request #24074 from yuwata/network-dhcp6-rapid-commit
network: dhcp6: re-introduce RapidCommit= setting
2022-07-23 08:10:01 +09:00
Yu Watanabe 91a7afdeae test-network: add tests for RapidCommit= 2022-07-22 21:28:24 +09:00
Yu Watanabe b1eaae53a2 test-network: drop unnecessary call of systemctl
As the units are not started at that stage.
2022-07-22 10:36:00 +09:00
Yu Watanabe 249b7eccf7 test-network: drop unnecessary default argument 2022-07-22 10:34:33 +09:00
Yu Watanabe 87b308c825 test-network: do not stop/restart udevd and related socket units
That's not necessary. Moreover, if the socket units are stopped in
`setUpModule()`, then there exists a short timespan that we cannot call
`udevadm control`, as the control socket may not be opened yet.

If we run whole tests, then the first test is
NetworkctlTests.test_altname, and it calls `udevadm control` in `setUp()`.
Hence, the test may fail.

Fixes https://github.com/systemd/systemd-centos-ci/pull/512#issuecomment-1191591008.
2022-07-22 10:31:38 +09:00
Yu Watanabe 72c747e6d1 test-network: add a test case for IPv4LLStartAddress= 2022-07-15 04:01:56 +09:00
Yu Watanabe f54dce2d4f test-network: save and restore timezone
Several DHCP client tests change the system timezone.
Let's save the current timezone at the beginning, and restore it with
the saved value at the end.
2022-07-13 10:30:48 +02:00
Yu Watanabe e11d0e3925 test-network: wait for L2TP tunnels being removed
Fixes #23985.
2022-07-13 02:36:14 +02:00
Yu Watanabe e755ad61ba test-network: support to remove routing policy rules with l3mdev flag 2022-07-11 22:39:26 +02:00
Yu Watanabe b5dac5b0de test-network: merge stdout and stderr of invoked command by call()
Otherwise, the logs may be messed up.
2022-07-11 22:38:21 +02:00
Yu Watanabe a962d85797 test-network: various cleanups
- introduce several helper functions
- do not list unit files, but remove the runtime unit directory in
  tearDown().
- do not list used interfaces, but remove all interfaces previously not
  exists in tearDown().
- save routes and routing policy rules before running tests, and flush
  unnecessary routes and rules in each tearDown() calls.
- drop many time.sleep() calls.
- call tearDown() after each sub tests.
- shorten code.
- several coding style fixes.
- etc, etc...

Hopefully, this improves performance of the test.
2022-07-11 19:57:24 +02:00
Yu Watanabe 286bf3a940 test-network: extend timeout for DHCP lease to be expired
Fixes #23964.
2022-07-11 16:54:45 +02:00
Yu Watanabe 37611ccb19 test-network: use wait_operstate() at one more place 2022-07-09 12:20:11 +09:00
Yu Watanabe 894ff7d1ab test-network: suppress periodic output in wait_operstate() 2022-07-09 12:19:52 +09:00