1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 20:25:38 +03:00
Commit Graph

1098 Commits

Author SHA1 Message Date
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
Lennart Poettering
be9d8212a5
Merge pull request #13017 from yuwata/network-neighbor-lladdr-13015
network: rename Neighbor.MACAddress= and also support IPv4 address
2019-07-11 19:23:29 +02:00
Lennart Poettering
2e8e1a1ab6
Merge pull request #12461 from Werkov/fix-job-ordering
Refactor job ordering implementation (and fix cycle detection)
2019-07-11 16:43:58 +02: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
Yu Watanabe
b956364db0 network: rename Neighbor.MACAddress= to Neighbor.LinkLayerAddress=
And make it support IPv4 address.

Closes #13015.
2019-07-11 22:22:29 +09:00
Lennart Poettering
273fe5d3cb test: add testcase for new CleanUnit logic 2019-07-11 12:18:51 +02: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
8c9c703c55 network: add AssignToLoopback= setting to [Tunnel] section
networkd does not manage loopback interface lo. So, previously, we have
no way to assign tunnel devices to lo.
2019-07-11 09:59:06 +09:00
Yu Watanabe
f392c06566
Merge pull request #12863 from 1848/if_xfrm
Added support for xfrm interfaces
2019-07-10 23:04:49 +09:00
1848
98d20a17a9 Added support for xfrm interfaces 2019-07-10 23:02:19 +09:00
Yu Watanabe
e4443f9bfc network: fix memleak
set_put() does not return -EEXIST.

Fixes #12995 and oss-fuzz#15678.
2019-07-10 12:27:48 +02: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
4f7331a85e network: rename [DHCP] section to [DHCPv4]
To keep the backward compatibility broken by the previous commit.
2019-07-10 17:33:09 +09:00
Susant Sahani
caa8ca4286 networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options
Closes https://github.com/systemd/systemd/issues/12917
2019-07-10 16:59:29 +09:00
Dan Streetman
abb9cc50af test/udev-test.pl: cleanup if skipping test
In Ubuntu CI, udev-test.pl is run from the debian/test/udev script,
in a test dir created for it; but udev-test.pl setup mounts a
dir, so if it doesn't cleanup/unmount before exiting, the test dir
autopkgtest created for it can't be removed, and autopkgtest
aborts the entire test suite, for example this output (from a
test run inside an armhf container):

autopkgtest [12:45:36]: test udev: [-----------------------
umount: test/tmpfs: no mount point specified.
mknod: test/tmpfs/dev/null: Operation not permitted
unable to create test/tmpfs/dev/null at ./udev-test.pl line 1611.
Failed to set up the environment, skipping the test at ./udev-test.pl line 1731.
autopkgtest [12:45:41]: test udev: -----------------------]
autopkgtest [12:45:44]: test udev:  - - - - - - - - - - results - - - - - - - - - -
udev                 FAIL non-zero exit status 77
rm: cannot remove '/tmp/autopkgtest.ocPFA6/autopkgtest_tmp/test/tmpfs': Device or resource busy
autopkgtest [12:46:22]: ERROR: "rm -rf /tmp/autopkgtest.ocPFA6/udev-artifacts /tmp/autopkgtest.ocPFA6/autopkgtest_tmp" failed with stderr "rm:
2019-07-09 14:54:34 +09:00
Evgeny Vereshchagin
869250e6b8
Merge pull request #12992 from mrc0mmand/test-functions-fixes
Various test/test-functions fixes/improvements
2019-07-09 02:27:39 +03:00
Frantisek Sumsal
cc469c3dfc test: drop || return 1 expression which is incompatible with set -e
The `set -e` option is incompatible with a subshell/compound command,
which is followed by || <EXPR>. In such case, the -e option is ignored
in all affected subshells/functions (see man bash(1) for command `set`).
2019-07-08 21:11:32 +02:00
Frantisek Sumsal
71a0de36e5 test: be a little bit more verbose when installing service binaries 2019-07-08 21:10:21 +02:00
Frantisek Sumsal
3cdb93d07b test: correctly handle installation of newly introduced binaries
In certain cases we might attempt to install a binary which is already
present in the test image, yet it's missing from the host system.
In such cases, let's check if the binary indeed exists in the image
before doing any other chcecks. If it does, immediately return with
success.

This was discovered during installation of
/usr/lib/systemd/systemd-bless-boot, which was not present in Ubuntu CI
(as the installed systemd was from the Ubuntu repositories), and the
binary itself was already in the image thanks to `ninja install`.
However, during extraction of binaries from the systemd service files,
another attempt to install this binary was made, which failed due to
`find_binary` being unable to find it.
2019-07-08 21:05:51 +02:00
Frantisek Sumsal
f5f8cc7aed test: make ASAN/UBSAN_OPTIONS overridable from the outside
This should allow us to tweak the ASAN_OPTIONS and UBSAN_OPTIONS env
variables for integration tests as well
2019-07-09 02:00: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
44005bfb4e network,udev: add Property= setting in [Match] section
Closes #5665.
2019-07-01 01:24:42 +09:00
Zbigniew Jędrzejewski-Szmek
910c6d0931 Treat kernel version condition as a list of quoted checks
Before only one comparison was allowed. Let's make this more flexible:
ConditionKernelVersion = ">=4.0" "<=4.5"

Fixes #12881.

This also fixes expressions like "ConditionKernelVersion=>" which would
evaluate as true.
2019-06-29 17:11:03 +02:00
Yu Watanabe
fd4487f01a test-execute: add test for ConditionKernelVersion= with quotation 2019-06-29 17:09:07 +02:00
Michal Koutný
594057fd99 tests: Check trivial loop between two jobs
job_compare return value is undefined in case the jobs have a loop
between them, so better make a test to make sure transaction cycle
detection catches it.
2019-06-26 23:16:31 +02:00
Michal Koutný
804cdabc31 tests: Check job ordering on execution cycles
The test-engine Test2 tests the cycle detection when units a, b and d
all start at once

    ,-------------------after-----------------,
    v                                         |
    a/start ---after---> d/start ---after---> b/start

Extend the test with Test11 that adds i.service which causes a and d
stop (by unordered Conflicts=) while starting b. Because stops precede
starts, we effectively eliminate the job cycle and all transaction jobs
should be applicable.

    ,-------------------after-----------------,
    v                                         |
    a/stop <---after--- d/stop <---after--- b/start
    .                   .                     ^
    .                   .                     |
     '. . . . . . . . . i/start ---after------'
2019-06-26 23:16:31 +02:00
Lennart Poettering
528c365658 test: add test for DynamicUser=0 → =1 migration (and back) 2019-06-25 10:47:46 +02: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