summaryrefslogtreecommitdiffstats
path: root/test/test-network (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test-network: add test case for preferred source with peerYu Watanabe2024-07-302-0/+13
| | | | For issue #31950.
* test: systemd-networkd-tests: add fdb learned testsGregor Herburger2024-07-222-0/+5
| | | | | | | Add a test for the new bridge netlink attributes IFLA_BR_FDB_N_LEARNED and IFLA_BR_FDB_MAX_LEARNED. Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
* systemd-networkd-tests: Skip tests requiring dhcpd if it is not availableDaan De Meyer2024-07-151-0/+3
| | | | | | dhcpd is not available on CentOS Stream 10 See https://github.com/systemd/systemd/issues/33717
* test-network: check if static routes not overridden by NDisc routesYu Watanabe2024-06-242-0/+38
|
* test-network: mention that the captive portal option is supported since v2.20Yu Watanabe2024-06-171-0/+2
| | | | The current latest release is v2.19, hence the test is typically skipped now.
* test-network: wait a while for addresses to be droppedYu Watanabe2024-06-111-11/+5
| | | | | | | | | | | | | | | | | | | | | | Hopefully fixes the following failure: ``` ====================================================================== FAIL: test_ipv6_token_prefixstable (__main__.NetworkdRATests.test_ipv6_token_prefixstable) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5705, in test_ipv6_token_prefixstable self.assertNotIn('2002:da8:1:0:b47e:7975:fc7a:7d6e/64', output) # the 1st prefixstable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: '2002:da8:1:0:b47e:7975:fc7a:7d6e/64' unexpectedly found in '19: veth99@veth-peer: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000\n inet6 2002:da8:1:0:b47e:7975:fc7a:7d6e/64 scope global tentative dynamic mngtmpaddr noprefixroute \n valid_lft 2100sec preferred_lft 1000sec\n inet6 2002:da8:1:0:da5d:e50a:43fd:5d0f/64 scope global dynamic mngtmpaddr noprefixroute \n valid_lft 2100sec preferred_lft 1000sec\n inet6 fe80::1034:56ff:fe78:9abc/64 scope link proto kernel_ll \n valid_lft forever preferred_lft forever' ---------------------------------------------------------------------- ```
* network/ndisc: use router lifetime as one for redirect routeYu Watanabe2024-06-061-6/+4
| | | | | | | | | | | | | | | | | | | | | | Previously, we did not set lifetime for redirect route, and redirect routes were removed only when received a RA from the target address. Thus, routes that redirect on-link addresses were never removed. RFCs mention nothing about the lifetime of redirection. But the previous implementation does not pass the IPv6 Core Conformance Tests. This makes - remember all received RAs and manage them by the sender address (previously, remembered only one with the highest preference), - then use the router lifetime as one for redirect route, - remove redirect route also when the router corresponds to the sender address is dropped (previously, considered only target address). Note, even if we recieve a new RA, we do not update existing redirect routes. The lifetime of the redirect route is updated only when a new Redirect message is received. Closes #32527.
* test-network: introduce a .network file to protect existing interfacesYu Watanabe2024-06-031-0/+13
|
* test-network: show PID and Invocation ID of networkdYu Watanabe2024-06-031-0/+10
| | | | | Then, we can easily find relevant journal entry on failure. This is especially useful when the test is running with --no-journal.
* test-network: flush stream buffer and journals before/after running testYu Watanabe2024-06-031-0/+12
|
* test-network: generate debugging logs of networkd-persistent-storage.serviceYu Watanabe2024-06-031-1/+2
|
* test-network: add missing sleep()Yu Watanabe2024-06-011-0/+1
| | | | | | Fixes a bug introduced by 7ef26afca555a5e167ebc59514490906a46db2cb. Fixes #33098.
* test-network: Add dirs_exist_ok=True to cp_r()Daan De Meyer2024-05-301-1/+1
| | | | Let's not fail if directories already exist in cp_r().
* test-network: update comment about status of kernel regressionYu Watanabe2024-05-291-3/+2
|
* test-network: tun/tap fd may be owned by tentative worker processesYu Watanabe2024-05-281-59/+51
| | | | | | | | | | | PID1 may invoke a helper process, e.g. sd-close, during the test. So, processes other than networkd and PID1 may be shown. ``` testtap99: tap pi multi_queue vnet_hdr persist filter Attached to processes:systemd-network(2852)(sd-close)(2863)systemd(1) ``` Closes #33055.
* test-network: also set custom altternative name for netdevsim interfaceYu Watanabe2024-05-205-14/+28
| | | | | | | | | Due to the bug in kernel 6.9 caused by https://github.com/torvalds/linux/commit/8debcf5832c3e8a6baaea27c75ad8a6ba5077beb, the net_id udev builtin does not work for netdevsim interface. So, eni99np1 cannot be used with kernel 6.9 anymore. Workaround for #32910.
* test-network: split out setup_netdevsim()Yu Watanabe2024-05-201-11/+14
|
* test-network: use different destination from gatewayYu Watanabe2024-05-172-4/+4
| | | | | | Previously, one of the test route has the same address in destination and gateway. Even it is a test case, that's super spurious. Let's use a different address.
* test: Allow using TEST_MATCH_TESTCASE with systemd-networkd-tests.pyDaan De Meyer2024-05-141-2/+8
|
* test-network: simplify and unify waiting loopYu Watanabe2024-05-101-48/+31
| | | | | | Also, - drop unused fail_assert arguments, - use wait_links() and check_networkd_log() in wait_activated().
* test-network: make link_exists() take multiple argumentsYu Watanabe2024-05-101-20/+12
| | | | This also improves performance of test_delete_links().
* test-network: check existence of kernel bugYu Watanabe2024-05-101-0/+18
| | | | | | | This adds checks for the kernel bug caused by https://github.com/torvalds/linux/commit/3ddc2231c8108302a8229d3c5849ee792a63230d, it will be fixed by https://patchwork.kernel.org/project/netdevbpf/patch/20240510072932.2678952-1-edumazet@google.com/
* test-network: introduce --no-journal optionYu Watanabe2024-05-101-0/+7
| | | | | This should be useful when the test run as a service, e.g. running on a mkosi image.
* test-network: do not fail when /etc/protocols does not existYu Watanabe2024-05-101-16/+19
| | | | Also this makes several checks more strict.
* test-network: do not fail test_macvlan() with old kernel or ip commandYu Watanabe2024-05-101-1/+2
|
* test-network: do not fail if macvlan module is not availableYu Watanabe2024-05-101-0/+1
|
* test-network: Make source directory optionalDaan De Meyer2024-05-011-4/+12
|
* network: DHCP version logging typosSebastian Pucilowski2024-04-281-11/+11
| | | | | | Some DHCP client log messages report "DHCP4" or "DHCP6" instead of "DHCPv4" or "DHCPv6" as used within the rest of the codebase. Typos fixed.
* test-network: add test for [IPv6SendRA] ReachableTimeSec= and RetransmitSec=Yu Watanabe2024-04-222-0/+5
|
* test-network: add test for global UseDomains= settingYu Watanabe2024-04-201-6/+10
|
* test-network: add test case of RS sent by the same interfaceYu Watanabe2024-04-181-0/+6
|
* test-network: introduce check_networkd_log() helper functionYu Watanabe2024-04-181-47/+15
|
* test-network: drop trailing spacesYu Watanabe2024-04-181-4/+4
| | | | Follow-up for fb573007430ab0dbe45517b58837d2fa5cfa1a48.
* Merge pull request #32258 from yuwata/network-tc-fix-stack-overflowLuca Boccassi2024-04-151-0/+17
|\ | | | | network/tc: fix stack overflow
| * test-network: add test for stack overflow in qdisc_drop() and tclass_drop()Yu Watanabe2024-04-131-0/+17
| |
* | Merge pull request #32194 from henryli001/lihl/add-defaultUseDomains-configYu Watanabe2024-04-141-0/+44
|\ \ | |/ |/| network: add mechanism to configure default UseDomains= setting
| * network: add mechanism to configure default UseDomains= setting, update man ↵Henry Li2024-04-141-0/+44
| | | | | | | | page and add test
* | network/ndisc: fix verification of sender of Redirect messageYu Watanabe2024-04-111-10/+14
| | | | | | | | | | | | | | | | | | | | The sender must be the first-hop router of the destination. Previously, we only accepted Redirect messages whose sender is the current default router with the highest priority. See RFC 4861 section 8.1 for more details. Fixes #31981.
* | network/ndisc: do not set per-route MTU and hop limitYu Watanabe2024-04-111-12/+9
| | | | | | | | | | | | | | | | | | | | | | Setting MTU announced in RA message to routes is problematic, as the value may be larger than the device MTU (IFLA_MTU), and in such case the route cannot be used. These two properties are now set per-interface, and gracefully handled such invalid cases. Hence not necessary to set them to each route. Follow-up for #32195.
* | Merge pull request #32195 from yuwata/network-ndisc-mtuLuca Boccassi2024-04-112-0/+48
|\ \ | | | | | | network: several cleanups for IPv6 MTU
| * | test-network: add test case for ndisc MTU optionYu Watanabe2024-04-102-0/+48
| |/
* / test-network: add test case for regenerating prefix stable address on conflictYu Watanabe2024-04-092-5/+44
|/ | | | For issue #31605.
* test-network: add test cases for Redirect and Neighbor Advertisement message ↵Yu Watanabe2024-04-041-0/+48
| | | | handling
* netowrk/ndisc: drop NDisc configurations when received NA without Router flagYu Watanabe2024-04-041-0/+2
| | | | Closes #28421.
* test-network: add test cases for PersistLeases=noYu Watanabe2024-03-282-5/+33
|
* test-network: extend test case for DHCP server with null server addressYu Watanabe2024-03-181-0/+22
|
* test-network: add test case for DHCP server lease fileYu Watanabe2024-03-111-0/+12
|
* test-network: add support for systemd-networkd-persistent-storage.serviceYu Watanabe2024-03-111-5/+27
|
* test-network: copy system unit files from build or source directoryYu Watanabe2024-03-111-41/+68
| | | | Addresses https://github.com/systemd/systemd/pull/30021#issuecomment-1971090682.
* test-network: drop unused options and variablesYu Watanabe2024-03-111-45/+10
| | | | | This also renames several variables, and replace RuntimeError with assert.