Commit graph

828 commits

Author SHA1 Message Date
Yu Watanabe dadf2bd4f4 test-network: introduce a .network file to protect existing interfaces 2024-06-03 18:41:26 +01:00
Yu Watanabe 653c38b3eb test-network: show PID and Invocation ID of networkd
Then, we can easily find relevant journal entry on failure.
This is especially useful when the test is running with --no-journal.
2024-06-03 18:41:26 +01:00
Yu Watanabe 6fec598290 test-network: flush stream buffer and journals before/after running test 2024-06-03 18:41:26 +01:00
Yu Watanabe 22fa8f6724 test-network: generate debugging logs of networkd-persistent-storage.service 2024-06-03 18:41:26 +01:00
Yu Watanabe 77356099ce test-network: add missing sleep()
Fixes a bug introduced by 7ef26afca5.

Fixes #33098.
2024-06-01 08:25:10 +02:00
Daan De Meyer 6b572e88a3 test-network: Add dirs_exist_ok=True to cp_r()
Let's not fail if directories already exist in cp_r().
2024-05-30 12:47:45 +02:00
Yu Watanabe 45af01d311 test-network: update comment about status of kernel regression 2024-05-29 09:07:48 +09:00
Yu Watanabe acddb3cb79 test-network: tun/tap fd may be owned by tentative worker processes
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.
2024-05-28 16:39:51 +02:00
Yu Watanabe f1f1be71fe test-network: also set custom altternative name for netdevsim interface
Due to the bug in kernel 6.9 caused by
8debcf5832,
the net_id udev builtin does not work for netdevsim interface.
So, eni99np1 cannot be used with kernel 6.9 anymore.

Workaround for #32910.
2024-05-20 18:33:47 +09:00
Yu Watanabe 12e0d6ed38 test-network: split out setup_netdevsim() 2024-05-20 10:42:01 +09:00
Yu Watanabe cd6507538a test-network: use different destination from gateway
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.
2024-05-17 09:28:49 +09:00
Daan De Meyer 15c1a7855c test: Allow using TEST_MATCH_TESTCASE with systemd-networkd-tests.py 2024-05-14 22:58:28 +02:00
Yu Watanabe 7ef26afca5 test-network: simplify and unify waiting loop
Also,
- drop unused fail_assert arguments,
- use wait_links() and check_networkd_log() in wait_activated().
2024-05-11 02:13:34 +09:00
Yu Watanabe acc06d8a68 test-network: make link_exists() take multiple arguments
This also improves performance of test_delete_links().
2024-05-11 02:13:34 +09:00
Yu Watanabe d22f2fb912 test-network: check existence of kernel bug
This adds checks for the kernel bug caused by
3ddc2231c8,
it will be fixed by
https://patchwork.kernel.org/project/netdevbpf/patch/20240510072932.2678952-1-edumazet@google.com/
2024-05-10 20:39:56 +09:00
Yu Watanabe e92d7b7dd9 test-network: introduce --no-journal option
This should be useful when the test run as a service, e.g.
running on a mkosi image.
2024-05-10 20:39:30 +09:00
Yu Watanabe 24e37929ed test-network: do not fail when /etc/protocols does not exist
Also this makes several checks more strict.
2024-05-10 15:16:20 +09:00
Yu Watanabe 2a4f9139d9 test-network: do not fail test_macvlan() with old kernel or ip command 2024-05-10 14:36:38 +09:00
Yu Watanabe e97bb361a0 test-network: do not fail if macvlan module is not available 2024-05-10 14:33:38 +09:00
Daan De Meyer f2adc1de89 test-network: Make source directory optional 2024-05-01 16:15:20 +02:00
Sebastian Pucilowski e6c4b5dc52 network: DHCP version logging typos
Some DHCP client log messages report "DHCP4" or "DHCP6" instead of
"DHCPv4" or "DHCPv6" as used within the rest of the codebase. Typos
fixed.
2024-04-28 11:47:55 +09:00
Yu Watanabe 0fe4a1c870 test-network: add test for [IPv6SendRA] ReachableTimeSec= and RetransmitSec= 2024-04-22 18:42:56 +09:00
Yu Watanabe d51377ac42 test-network: add test for global UseDomains= setting 2024-04-20 12:01:53 +09:00
Yu Watanabe 3b4eeccd27 test-network: add test case of RS sent by the same interface 2024-04-18 09:40:23 +09:00
Yu Watanabe 45c2bbbaea test-network: introduce check_networkd_log() helper function 2024-04-18 09:40:23 +09:00
Yu Watanabe 864c7980c0 test-network: drop trailing spaces
Follow-up for fb57300743.
2024-04-18 09:40:23 +09:00
Luca Boccassi a4328b284e
Merge pull request #32258 from yuwata/network-tc-fix-stack-overflow
network/tc: fix stack overflow
2024-04-15 22:34:39 +02:00
Yu Watanabe ae9fd433d6
Merge pull request #32194 from henryli001/lihl/add-defaultUseDomains-config
network: add mechanism to configure default UseDomains= setting
2024-04-14 13:40:06 +09:00
Henry Li fb57300743 network: add mechanism to configure default UseDomains= setting, update man page and add test 2024-04-13 16:54:31 -07:00
Yu Watanabe e6fa91195b test-network: add test for stack overflow in qdisc_drop() and tclass_drop() 2024-04-13 09:39:55 +09:00
Yu Watanabe 9944629eee network/ndisc: fix verification of sender of Redirect message
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.
2024-04-12 04:59:42 +09:00
Yu Watanabe 2e73aa507b network/ndisc: do not set per-route MTU and hop limit
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.
2024-04-12 04:59:38 +09:00
Luca Boccassi d0ea800943
Merge pull request #32195 from yuwata/network-ndisc-mtu
network: several cleanups for IPv6 MTU
2024-04-10 23:12:21 +01:00
Yu Watanabe a0430b0d95 test-network: add test case for ndisc MTU option 2024-04-10 12:24:33 +09:00
Yu Watanabe ce4ed0ad99 test-network: add test case for regenerating prefix stable address on conflict
For issue #31605.
2024-04-10 04:36:03 +09:00
Yu Watanabe 9dcdf16b25 test-network: add test cases for Redirect and Neighbor Advertisement message handling 2024-04-05 06:22:42 +09:00
Yu Watanabe 87a33c0740 netowrk/ndisc: drop NDisc configurations when received NA without Router flag
Closes #28421.
2024-04-05 02:16:03 +09:00
Yu Watanabe bc91875ae5 test-network: add test cases for PersistLeases=no 2024-03-28 11:16:17 +09:00
Yu Watanabe 93126bb0fa test-network: extend test case for DHCP server with null server address 2024-03-18 22:33:14 +09:00
Yu Watanabe 1c4411b7ff test-network: add test case for DHCP server lease file 2024-03-12 01:57:17 +09:00
Yu Watanabe c84a5f5eaf test-network: add support for systemd-networkd-persistent-storage.service 2024-03-12 01:57:16 +09:00
Yu Watanabe 83cc18257e test-network: copy system unit files from build or source directory
Addresses https://github.com/systemd/systemd/pull/30021#issuecomment-1971090682.
2024-03-12 01:17:40 +09:00
Yu Watanabe f66045c7d4 test-network: drop unused options and variables
This also renames several variables, and replace RuntimeError with
assert.
2024-03-12 01:14:40 +09:00
Luca Boccassi e440426221
Merge pull request #31587 from yuwata/udev-rps-follow-ups
udev: follow-ups for RPS setting
2024-03-02 11:47:44 +00:00
Yu Watanabe 4b35dab86a test-network: wait for the interface being processed by udevd
Otherwise, even if the interface is available, the requested config may
not be applied to the interface yet.

This also merges multiple tests for RPS setting. Hopefully the
performance of the test is improved.
2024-03-02 14:50:40 +09:00
Yu Watanabe a39a2a8121 test-network: introduce udevadm() and friends 2024-03-02 14:50:40 +09:00
Yu Watanabe 0f805b4661 test-network: check enabled capabilities in LLDP neighbors
Addresses https://github.com/systemd/systemd/pull/31583#discussion_r1509880349.
2024-03-02 13:52:28 +09:00
Yu Watanabe d5e6df24bd
Merge pull request #31498 from ssahani/bond
netdev: bond - add support for peer_notif_delay
2024-03-01 12:45:52 +09:00
Yu Watanabe d6360819a7 test-network: add more test cases for LLDP 2024-03-01 09:40:26 +09:00
Luca Boccassi 0cad991c4c
Merge pull request #31293 from ragazenta/netdev_rps
udevd: Add ReceivePacketSteeringCPUMask for systemd.link
2024-02-28 13:37:28 +00:00