1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

1028 Commits

Author SHA1 Message Date
Frantisek Sumsal
54a3790ccb test: allow SKIP_INITRD override
Certain distributions (e.g. Arch Linux) require booting with initrd, as
they lack support for commonly used filesystems in the kernel (i.e. the
support is compiled in as modules)
2019-05-09 20:11:31 +02:00
Frantisek Sumsal
aaef1ed21d test: don't preload libasan for systemd-remount-fs.service
The `mount` utility has an unexpected behavior when run with libasan,
causing false-positives during the integration testing.

For example, on Arch Linux with LD_PRELOAD pointing to libasan:
```
bash-5.0# mount -o remount,rw -v /
mount: /dev/sda1 mounted on /.
bash-5.0# echo $?
1
```
However:
```
bash-5.0# LD_PRELOAD= mount -o remount,rw -v /
mount: /dev/sda1 mounted on /.
bash-5.0# echo $?
0
```
Further investigation with strace shows a LeakSanitizer error:
```
bash-5.0# strace -s 512 mount -o remount,rw -v /
...
write(2, "==355==LeakSanitizer has encountered a fatal error.\n", 52) = -1 EBADF (Bad file descriptor)
write(2, "ReportFile::Write() can't output requested buffer!\n", 51) = -1 EBADF (Bad file descriptor)
exit_group(1)                           = ?
+++ exited with 1 +++
```

Let's workaround this by clearing the LD_PRELOAD variable for
systemd-remount-fs.service
2019-05-09 20:11:20 +02:00
Susant Sahani
0fadb2a46f network: add support to configure proxy ARP/WIFI 2019-05-09 15:03:04 +09:00
Susant Sahani
1189c00a3c networkd: VXLAN add support to configure IP Don't fragment.
Allow users to set the IPv4 DF bit in outgoing packets, or to inherit its
value from the IPv4 inner header. If the encapsulated protocol is IPv6 and
DF is configured to be inherited, always set it.
2019-05-09 06:40:33 +02:00
Susant Sahani
1087623bac networkd: Add support to configure proxy ARP and proxy ARP Wifi 2019-05-09 01:44:26 +02:00
Chris Down
465ace74d9 cgroup: Test that it's possible to set memory protection to 0 again
The previous commit fixes this up, and this should prevent it
regressing.
2019-05-08 12:06:32 +01:00
Zbigniew Jędrzejewski-Szmek
d1c377da0d
Merge pull request #12489 from ssahani/vxlan
networkd: VXLAN rename Id to VNI
2019-05-08 12:02:54 +02:00
Susant Sahani
61b824c561 networkd: bridge fdb add support to configure VXLAN VNI 2019-05-08 03:43:43 +02:00
Zbigniew Jędrzejewski-Szmek
29e19a6f19 fuzz: fix spelling of MACsec and MACAddress in the corpus 2019-05-08 06:53:07 +05:30
Susant Sahani
4cc0fd7531 networkd: VXLAN add support to configure Generic Protocol Extension
See https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07
2019-05-08 06:52:42 +05:30
Zbigniew Jędrzejewski-Szmek
9175aabfb6
Merge pull request #12481 from ssahani/dhcp-max-retry
networkd: Allow DHCP4 client to set the number to attempt to configure/reconfigure
2019-05-07 19:58:40 +02:00
Susant Sahani
6f213e4a34 networkd: VXLAN rename Id to VNI
It makes more sense to call VXLAN ID as

1. the VXLAN Network Identifier (VNI) (or VXLAN Segment ID)
2. test-network: rename VXLAN Id to VNI
3. fuzzer: Add VXLAN VNI directive to fuzzer
2019-05-07 20:52:11 +05:30
Yu Watanabe
117a55c755 test-network: add one more test for LinkLocalAddressing=fallback 2019-05-07 17:12:09 +02:00
Susant Sahani
715cedfbf0 networkd: Allow DHCP4 client to set the number to attempt to reconfigure.
Otherwise current value is 6 and after 6 it will give up.
2019-05-07 17:12:04 +02:00
Yu Watanabe
b30160ff7f
Merge pull request #12478 from yuwata/wireguard-fwmark
network: rename WireGuard.FwMark -> FirewallMark
2019-05-07 05:16:34 +02:00
Yu Watanabe
1c30b174ed network: rename WireGuard.FwMark -> FirewallMark
For the consistency with FirewallMark= in [RoutingPolicyRule] section.
2019-05-04 17:20:23 +02:00
Yu Watanabe
63c598ede3 test-network: add a test for LinkLocalAddressing=fallback 2019-05-04 16:46:03 +02:00
Yu Watanabe
1c862fe05a test-network: add tests for BridgeFDB.Destination= 2019-05-03 06:12:04 +02:00
Susant Sahani
c2c2793f39 networkd: Add support to configure destination address for bridge FDB
Closes #5145.

Example conf:
```
[Match]
Name=vxlan1309

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.2

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.4

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.5
```
2019-05-03 06:11:52 +02:00
Lennart Poettering
34015aea17 tests: add test for suid/sgid handling in tmpfiles 2019-04-30 09:18:23 +02:00
Lennart Poettering
908665f4e9 test-functions: follow fedora dbus-daemon/dbus-broker rearrangements
Apparently dbus.service is now a symlink to either dbus-broker.service
or dbus-daemon.service. Copy in the right target service in each case.
2019-04-30 09:18:23 +02:00
Ben Boeckel
5238e95759 codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
Yu Watanabe
06895a1dda test-network: fix invalid assertions 2019-04-25 00:29:20 +02:00
Frantisek Sumsal
772f15c1d8 test: don't timeout while waiting for other test units
The main testsuite service timeouts sporadically when waiting for
other testsuite-* units. As the test timeout is handled by
the "test executor" (test.sh), let's disable it for the service.

This should (hopefully) fix the test flakiness.
2019-04-15 13:59:27 +02:00
Jan Klötzke
dc653bf487 service: handle abort stops with dedicated timeout
When shooting down a service with SIGABRT the user might want to have a
much longer stop timeout than on regular stops/shutdowns. Especially in
the face of short stop timeouts the time might not be sufficient to
write huge core dumps before the service is killed.

This commit adds a dedicated (Default)TimeoutAbortSec= timer that is
used when stopping a service via SIGABRT. In all other cases the
existing TimeoutStopSec= is used. The timer value is unset by default
to skip the special handling and use TimeoutStopSec= for state
'stop-watchdog' to keep the old behaviour.

If the service is in state 'stop-watchdog' and the service should be
stopped explicitly we still go to 'stop-sigterm' and re-apply the usual
TimeoutStopSec= timeout.
2019-04-12 17:32:52 +02:00
Chris Down
c52db42b78 cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow
In cgroup v2 we have protection tunables -- currently MemoryLow and
MemoryMin (there will be more in future for other resources, too). The
design of these protection tunables requires not only intermediate
cgroups to propagate protections, but also the units at the leaf of that
resource's operation to accept it (by setting MemoryLow or MemoryMin).

This makes sense from an low-level API design perspective, but it's a
good idea to also have a higher-level abstraction that can, by default,
propagate these resources to children recursively. In this patch, this
happens by having descendants set memory.low to N if their ancestor has
DefaultMemoryLow=N -- assuming they don't set a separate MemoryLow
value.

Any affected unit can opt out of this propagation by manually setting
`MemoryLow` to some value in its unit configuration. A unit can also
stop further propagation by setting `DefaultMemoryLow=` with no
argument. This removes further propagation in the subtree, but has no
effect on the unit itself (for that, use `MemoryLow=0`).

Our use case in production is simplifying the configuration of machines
which heavily rely on memory protection tunables, but currently require
tweaking a huge number of unit files to make that a reality. This
directive makes that significantly less fragile, and decreases the risk
of misconfiguration.

After this patch is merged, I will implement DefaultMemoryMin= using the
same principles.
2019-04-12 17:23:58 +02:00
Lennart Poettering
b51629ad84
Merge pull request #12222 from yuwata/macsec
network: introduce MACsec
2019-04-12 13:59:30 +02:00
Zbigniew Jędrzejewski-Szmek
cc5549ca12 scripts: use 4 space indentation
We had all kinds of indentation: 2 sp, 3 sp, 4 sp, 8 sp, and mixed.
4 sp was the most common, in particular the majority of scripts under test/
used that. Let's standarize on 4 sp, because many commandlines are long and
there's a lot of nesting, and with 8sp indentation less stuff fits. 4 sp
also seems to be the default indentation, so this will make it less likely
that people will mess up if they don't load the editor config. (I think people
often use vi, and vi has no support to load project-wide configuration
automatically. We distribute a .vimrc file, but it is not loaded by default,
and even the instructions in it seem to discourage its use for security
reasons.)

Also remove the few vim config lines that were left. We should either have them
on all files, or none.

Also remove some strange stuff like '#!/bin/env bash', yikes.
2019-04-12 08:30:31 +02:00
Zbigniew Jędrzejewski-Szmek
408c9a07e5 test: filter out messages when stripping binaries
We would get an error for every script, which is just noise.
2019-04-12 08:23:41 +02:00
Yu Watanabe
02849d8b4f test-network: add tests for MACsec 2019-04-12 10:12:42 +09:00
Yu Watanabe
b0e13c3122 network: add MACsecTransmitAssociation.UseForEncoding= setting 2019-04-12 10:12:42 +09:00
Yu Watanabe
a7b9c52f1f network: add MACsec*Association.Activate= setting 2019-04-12 10:12:42 +09:00
Yu Watanabe
eb4705fb36 network: add MACsec*Association.KeyFile= setting 2019-04-12 10:12:42 +09:00
Susant Sahani
81962db798 network: Introduce MACsec
Media Access Control Security (MACsec) is an 802.1AE IEEE
industry-standard security technology that provides secure
communication for all traffic on Ethernet links.
MACsec provides point-to-point security on Ethernet links between
directly connected nodes and is capable of identifying and preventing
most security threats, including denial of service, intrusion,
man-in-the-middle, masquerading, passive wiretapping, and playback attacks.

Closes #5754
2019-04-12 10:12:41 +09:00
Lennart Poettering
54f802ff8a
Merge pull request #12037 from poettering/oom-state
add cgroupv2 oom killer event handling to service management
2019-04-11 18:57:47 +02:00
Lennart Poettering
574ef404d8
Merge pull request #12279 from keszybz/sd-bus-long-signatures
sd-bus: properly handle messages with overlong signatures
2019-04-11 17:03:57 +02:00
Zbigniew Jędrzejewski-Szmek
f0ae945ecc bus-message: validate signature in gvariant messages
We would accept a message with 40k signature and spend a lot of time iterating
over the nested arrays. Let's just reject it early, as we do for !gvariant
messages.
2019-04-11 14:01:38 +02:00
Yu Watanabe
8b0f4bac72 test: make directory for drop-in config
Follow-up for a2fbac5875.
2019-04-11 09:58:47 +02:00
Zbigniew Jędrzejewski-Szmek
4ddff52640
Merge pull request #12270 from yuwata/test-set-longer-timeout
test: set longer timeout
2019-04-11 08:31:14 +02:00
Yu Watanabe
a2fbac5875 test: set longer watchdog timeout for timedated 2019-04-11 03:25:08 +09:00
Yu Watanabe
70f3336e96 test: set longer timeout for 'udevadm control' 2019-04-11 02:27:15 +09:00
Yu Watanabe
86a3d44de5 network: fix use-of-uninitialized-value or null dereference
This fixes a bug introduced by 6ef5c881dd.

Fixes oss-fuzz#14157 and oss-fuzz#14158.
2019-04-10 18:18:11 +09:00
Lennart Poettering
36869f3381 test: add test case for new OOM logic 2019-04-09 11:17:58 +02:00
Zbigniew Jędrzejewski-Szmek
52efbd8f0e
Merge pull request #12223 from yuwata/network-wireguard-preshared-key-file
network: add PresharedKeyFile= setting and make reading key file failure fatal
2019-04-09 10:52:52 +02:00
Yu Watanabe
9e5d79e7a1 test-network: add tests for WireGuardPeer.PresharedKey= and PresharedKeyFile= 2019-04-09 15:50:23 +09:00
Yu Watanabe
a3945c6361 network: add WireGuardPeer.PresharedKeyFile= setting 2019-04-09 15:50:22 +09:00
Yu Watanabe
cb31e7c861 network: make reading PrivateKeyFile= failure always fatal
This also refactor wireguard_read_key_file().
2019-04-09 15:50:22 +09:00
Yu Watanabe
daa4aca1cb calendarspec: fix possible integer overflow
Fixes oss-fuzz#14108.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14108
2019-04-08 00:50:07 +09:00
Zbigniew Jędrzejewski-Szmek
6c34ed5111 test: use newer verb to set log levels 2019-04-03 08:19:08 +02:00
Lennart Poettering
f69567cbe2 core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= 2019-04-02 16:56:48 +02:00
Zbigniew Jędrzejewski-Szmek
237ebf61e2
Merge pull request #12013 from yuwata/fix-switchroot-11997
core: on switching root do not emit device state change based on enumeration results
2019-04-02 16:06:07 +02:00
Lennart Poettering
347da10194 test: add tests for new .timer units 2019-04-02 08:20:10 +02:00
Yu Watanabe
dd09a9ec0f
Merge pull request #12160 from yuwata/wait-online-allow-configuring
wait-online: add --any option
2019-04-02 06:10:36 +09:00
Yu Watanabe
03db80b2d1 test-network: add tests for --any option of wait-online 2019-04-02 03:38:22 +09:00
Yu Watanabe
c7f070bd4a test-network: fix timeout argument for wait_online() 2019-04-02 03:38:22 +09:00
Yu Watanabe
4b6a6d1e37 test-network: add tests for FooOverUDP tunnels 2019-04-02 03:29:46 +09:00
Yu Watanabe
38f4bb4428 test-network: add more tests for SerializeTunneledPackets=, Key=, and friends 2019-04-02 03:07:08 +09:00
Yu Watanabe
546c203d83 test: set longer StartLimitIntervalSec= and fewer StartLimitBurst=
Some test environment may be in heavy load. In that case, rate limit
never hit, and the test fails...
2019-04-01 19:13:36 +02:00
Yu Watanabe
753e0a2446 test-network: add test for NetDev.Name= conflict 2019-04-01 10:30:31 +09:00
Yu Watanabe
5a0bd90b82 test-network: add test for drop-in [WireGuardPeer] section
This also merges the two wireguard tests, and use wait_online()
to speed up the test.
2019-04-01 10:30:30 +09:00
Yu Watanabe
b07b19dff8
Merge pull request #12147 from yuwata/network-gre-key-12144
network: make GRE and GRETAP support Key= or friends
2019-03-31 22:12:34 +09:00
Yu Watanabe
6730a1f343 test-network: test stacked erspan tunnels 2019-03-30 21:17:53 +09:00
Yu Watanabe
0ef830cf54 test-network: merge tests for [Route] section 2019-03-30 02:27:22 +09:00
Yu Watanabe
a15ff207df test-network: use wait_online() in test_sysctl_disable_ipv6() 2019-03-30 02:27:22 +09:00
Yu Watanabe
ba1e0d0612 test-network: use wait_online() in test_sysctl()
This also disables IPv6AcceptRA= to speed up the test.
2019-03-30 02:27:22 +09:00
Yu Watanabe
2dcfcc08d9 test-network: use wait_online() in test_link_local_addressing()
This also disables IPv6AcceptRA= to speed up the test.
2019-03-30 02:27:22 +09:00
Yu Watanabe
d06f30fc73 test-network: fix addr_gen_mode
If stable_secret is set, then networkd sets addr_gen_mode 2.
2019-03-30 02:27:22 +09:00
Yu Watanabe
c2990ec39a test-network: move tests related to bonding 2019-03-30 02:27:22 +09:00
Yu Watanabe
b810272594 test-network: merge tests about static addresses
And use wait_online()
2019-03-30 02:27:22 +09:00
Yu Watanabe
5aa58329d8 test-network: add wait_online() helper function 2019-03-30 02:27:16 +09:00
Lennart Poettering
f087c7e072 test: add some basic testing that "systemctl start -T" does something 2019-03-27 12:37:37 +01:00
Yu Watanabe
4d6cd572a7 fuzz: add testcases for the bug in condition_free_list_type() 2019-03-24 00:35:39 +09:00
Zbigniew Jędrzejewski-Szmek
b2645747b7 nspawn-oci: fix double free
Also rename function to make it clear that it also frees the array
object itself.
2019-03-22 17:39:12 +01:00
Zbigniew Jędrzejewski-Szmek
b1f13b0e75 nspawn-oci: mount source is optional 2019-03-22 12:04:32 +01:00
Zbigniew Jędrzejewski-Szmek
9ddd62cda1 fuzz-nspawn-oci: add fuzzer for the oci bundle loader 2019-03-22 11:09:52 +01:00
Yu Watanabe
3f4c9bc04c
Merge pull request #12066 from yuwata/fix-network-tunnel-12041
network: fix netdev_tunnel_verify()
2019-03-22 05:57:38 +09:00
Yu Watanabe
6a97a86489 test-network: add more tests for tunneling devices 2019-03-22 03:31:50 +09:00
Zbigniew Jędrzejewski-Szmek
59b44cc3b1
Merge pull request #12020 from mrc0mmand/test-functions-interactive-debug
test: test-functions improvements for debugging
2019-03-21 18:15:04 +01:00
dana
4890482531 journalctl: support -b all to negate effect of -b
Also fix an issue where -b without argument didn't always behave as -b0
2019-03-19 10:48:26 +01:00
Frantisek Sumsal
5a2114b60e test: improve testsuite configuration documentation 2019-03-16 18:59:07 +01:00
Frantisek Sumsal
b43c2c01e9 test: allow overriding of the KVM detection using TEST_NO_KVM
By default the run_qemu() function enables KVM automatically
if it detects the /dev/kvm char device and if the machine is not
already a KVM one. Let's add a TEST_NO_KVM env variable to suppress
this detection.
2019-03-16 18:59:07 +01:00
Frantisek Sumsal
c81a46b904 test: introduce INTERACTIVE_DEBUG
Make the interactive debugging of (particularly QEMU) machines less
painful, by replacing the default vt220 TERM with linux one, and
by not shutting down the machine after running the test itself.
2019-03-16 18:59:01 +01:00
Frantisek Sumsal
6d67286fc3 test: unify indentation 2019-03-16 15:49:43 +01:00
Lennart Poettering
95658673a0
Merge pull request #12016 from yuwata/fix-two-memleaks-found-by-oss-fuzz
Fix two memleaks found by oss fuzz
2019-03-15 17:33:48 +01:00
Yu Watanabe
c7a67ba5eb fuzz: add testcase for oss-fuzz#13691 2019-03-15 23:54:30 +09:00
Yu Watanabe
5ba40bb2cc fuzz: add a testcase for oss-fuzz#13719 2019-03-15 23:47:41 +09:00
Zbigniew Jędrzejewski-Szmek
054d871d41 test-execute: block /sys not /proc
As explained in the previous commit, blocking /proc can cause us
to go into a long loop or fail the test.
2019-03-15 15:46:41 +01:00
Yu Watanabe
8cc6727a5a test: add a testcase for device plugged -> dead -> plugged bug 2019-03-15 21:16:58 +09:00
Lennart Poettering
9bbd37845c
Merge pull request #11988 from keszybz/test-binaries-installation
Install more requires binaries for tests
2019-03-15 13:06:11 +01:00
Frantisek Sumsal
5b69d297c1 test: use PBKDF2 instead of Argon2 in cryptsetup...
to reduce memory requirements for volume manipulation. Also,
to further improve the test performance, reduce number of PBKDF
iterations to 1000 (allowed minimum).
2019-03-15 10:05:33 +01:00
Frantisek Sumsal
32983312ed test: bump the second partition size to 50MB
10MB is not enough for a LUKS2 partition.
2019-03-15 06:12:23 +01:00
Zbigniew Jędrzejewski-Szmek
98b0439f08 tests: install /usr/bin/dbus-broker when using dbus-broker
We'd install the service file, and then dbus-broker-launcher because it is
mentioned in ExecStart=, but not the main executable, so nothing would work.
Let's just install dbus-broker executables if found. They are small, so this
doesn't matter much, and is much easier than figuring the exact conditions
under which dbus-broker will be used instead of dbus-daemon.
2019-03-14 15:52:38 +01:00
Yu Watanabe
cff83db917 test-network: add tests for L2TP 2019-03-14 11:12:32 +09:00
Susant Sahani
3a56e697c8 networkd: Introduce l2tp tunnel
This works allows networkd to configure l2tp tunnel.
See http://man7.org/linux/man-pages/man8/ip-l2tp.8.html
2019-03-14 10:57:41 +09:00
Frantisek Sumsal
0ae4456c93 test: avoid double-fsck'ing of the rootfs on Arch
Since systemd 206 the combination of systemd and mkinitcpio
causes, under certain conditions, the rootfs to be double fsck'd.

Symptoms:
```
:: performing fsck on '/dev/sda1'
systemd: clean, 3523/125488 files, 141738/501760 blocks
********************** WARNING **********************
*                                                   *
*  The root device is not configured to be mounted  *
*  read-write! It may be fsck'd again later.        *
*                                                   *
*****************************************************
<snip>
[  OK  ] Started File System Check on Root Device
```

This occurs when neither 'ro' or 'rw', or only 'ro' is present
on the kernel command line. The solution is to mount the roofs
as read-write on the kernel command line, so systemd knows to not fsck
it again.
2019-03-13 17:05:31 +01:00
Zbigniew Jędrzejewski-Szmek
1e46047066 tests: install "head" in the image
For #11915.
2019-03-13 16:35:23 +01:00
Tobias Jungel
7f15b71460 networkd: Add bridge port capabilities
This PR adds the configuration switches for multicast flooding, neighbor
suppression and learning of a bridge port.
2019-03-13 16:27:22 +01:00
Frantisek Sumsal
3f50fff536 test: don't overwrite TESTDIR if already set 2019-03-13 10:30:25 +01:00
Lennart Poettering
96c45cc697
Merge pull request #11861 from yuwata/network-verify-2
network: config parser updates and wireguard refactoring
2019-03-13 10:15:27 +01:00
Lennart Poettering
3cca6cfd41
Merge pull request #11893 from yuwata/wait-online-take-operstate
wait-online: optionally take required minimum operational state
2019-03-13 10:10:43 +01:00
Yu Watanabe
c9cc038343 network: introduce 'degraded-carrier' operstate to order all states
Previously, 'degraded' state is ambiguous for bonding or bridge master:
1. one or more slave interfaces does not have carrier,
2. no link local address is assigned to the master,
3. combination of the above two.

This makes the above case 1 and 3 are in the new 'degraded-carrier'
state, and makes 'degraded' state as all slaves are active but no
link local address on master.
2019-03-13 14:29:00 +09:00
Yu Watanabe
4ddbf08cfd test-network: wait more and fix wrong operational state
Closes #11977.
2019-03-13 14:27:39 +09:00
Yu Watanabe
39bcff3bca test-network: add test for WireGuard.PrivateKeyFile= 2019-03-13 12:02:08 +09:00
Yu Watanabe
76df77794a wireguard: add PrivateKeyFile= option
Closes #11878.
2019-03-13 12:02:03 +09:00
Yu Watanabe
bbb5aebe3e test-network: add tests for invalid Address sections 2019-03-13 11:59:18 +09:00
Yu Watanabe
7e46b29bd3 test: add a testcase for ProtectHome=tmpfs vs ProtectSystem=strict 2019-03-13 11:53:59 +09:00
Davide Cavalca
1485aacb16 meson: scope more git invocations with current_source_dir() 2019-03-12 15:01:47 +01:00
Zbigniew Jędrzejewski-Szmek
ec637f309f
Merge pull request #11943 from yuwata/device-action-seqnum-cleanups
sd-device: store parsed SEQNUM and ACTION string
2019-03-12 13:17:33 +01:00
Zbigniew Jędrzejewski-Szmek
a729e42d4b
Merge pull request #11897 from mrc0mmand/parallelize-TEST-24-UNIT-TESTS
test: parallelize tasks in TEST-24-UNIT-TESTS
2019-03-12 11:21:06 +01:00
Yu Watanabe
7905e6d70e test: wait for a while active state of .device is updated 2019-03-12 09:49:58 +09:00
Lennart Poettering
35d3a35e56
Merge pull request #11960 from mrc0mmand/more-fuzzers
fuzz: introduce more fuzzers
2019-03-11 18:04:22 +01:00
Clemens Gruber
c423be28a0 network: introduce TripleSampling= option in CAN section
When enabled, three samples are used to determine the value of a
received bit by majority rule.

This patch adds support for the TripleSampling= option in the [CAN]
section of .network files.
2019-03-11 17:15:47 +01:00
Yu Watanabe
7f45d738a6 test-network: add tests for issue #11921 2019-03-11 15:29:19 +01:00
Frantisek Sumsal
ea1cdaf262 fuzz: add a memleak reproducer for fuzz-nspawn-settings 2019-03-11 14:13:09 +01:00
Frantisek Sumsal
b5b499b32c fuzz: add nspawn-settings fuzzer 2019-03-11 14:13:00 +01:00
Frantisek Sumsal
18d51b4509 fuzz: add env-file fuzzer 2019-03-11 14:11:28 +01:00
Frantisek Sumsal
5bfb2a93a4 test: try to determine QEMU_SMP dynamically
If the QEMU_SMP value has not been explicitly set, try to determine it
from the number of online CPUs using the nproc utility. If this approach
fails, fall back to the default value QEMU_SMP=1.

This change should significantly help when running integration tests
under QEMU on multicore systems.
2019-03-08 21:28:26 +01:00
Yu Watanabe
1ec38b8574 test: add test for ID_RENAMING= udev property handling by pid1 2019-03-07 17:28:19 +09:00
Frantisek Sumsal
2f2a0454ef test: parallelize tasks in TEST-24-UNIT-TESTS 2019-03-06 10:23:19 +01:00
Zbigniew Jędrzejewski-Szmek
f27abfccd0 fuzz-dns-packet: add test case with lots of labels
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13422
2019-03-04 15:53:37 +01:00
Lennart Poettering
46d4d67d79
Merge pull request #11820 from dm0-/chase
Allow tmpfiles to create files in a root under an unprivileged directory
2019-03-04 13:04:45 +01:00
Yu Watanabe
26bf9c302d test-network: add tests for address pool 2019-03-01 16:34:55 +09:00
David Michael
8595c4588c TEST-22: add test for unprivileged dirs in root prefixes
This verifies the fix for the issue described in:
https://github.com/systemd/systemd/pull/11820
2019-02-28 13:06:07 -05:00
Zbigniew Jędrzejewski-Szmek
2fe4c28d30
Merge pull request #11834 from martinpitt/network-test-fixes
networkd-test fix/improvement
2019-02-28 17:48:41 +01:00
Yu Watanabe
af3b1498c6 test-network: add testcase for #1850 2019-02-28 10:34:27 +09:00
Yu Watanabe
9cb8c55934 network: rename GatewayOnlink= to GatewayOnLink=
But still GatewayOnlink= is supported for backward compatibility.
2019-02-28 10:00:22 +09:00
Martin Pitt
09b8826ea3 networkd-test: ignore failures of test_route_only_dns* in containers
This test exposes a race condition when running in LXC, see issue #11848
for details. Until that is understood and fixed, skip the test as it's
not a recent regression.
2019-02-27 23:15:31 +01:00
Martin Pitt
829c0672e0 networkd-test: specify Address= with prefix length
This avoids a warning:

    An address '192.168.42.100' is specified without prefix length. The
    behavior of parsing addresses without prefix length will be changed
    in the future release. Please specify prefix length explicitly.
2019-02-27 22:53:57 +01:00
Martin Pitt
74c13b7659 networkd-test: show service journal on startup failure
This provides easier evaluation of failed tests.
2019-02-27 22:53:57 +01:00
Lennart Poettering
dc16327c48
Merge pull request #11795 from yuwata/fix-network-routing-policy-11280
network: fix routing policy rule issue #11280
2019-02-27 18:43:56 +01:00
Lennart Poettering
200fb167a2
Merge pull request #11844 from keszybz/networkd-fuzzer-fixes
Networkd fuzzer fixes
2019-02-27 17:45:55 +01:00
Zbigniew Jędrzejewski-Szmek
c448459d56 networkd: refuse more than 128 NTP servers
This test case is a bit silly, but it shows that our code is unprepared to
handle so many network servers, with quadratic complexity in various places.
I don't think there are any valid reasons to have hundres of NTP servers
configured, so let's just emit a warning and cut the list short.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13354
2019-02-27 14:52:33 +01:00
Zbigniew Jędrzejewski-Szmek
83ec459276 networkd: fix memleak when the same NetDev is specified twice
hashmap_put() returns 0 if the (key, value) pair is already present in the
hashmap, and -EEXIST if the key exists, but the value is different.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13433
2019-02-27 14:31:28 +01:00
Yu Watanabe
b677774d69 test-network: add testcase for issue #11280 2019-02-27 19:24:13 +09:00
Yu Watanabe
703bc7a2a6 test-network: drop relevant ip routing policy rules before testing 2019-02-27 19:23:46 +09:00
Yu Watanabe
72b7f1b976 test-network: add test for MTUBytes= in vlan or macvlan devices 2019-02-27 10:05:02 +09:00
Lennart Poettering
f3892edd5e
Merge pull request #11824 from keszybz/fuzzer-fixes
Fuzzer fixes
2019-02-26 19:02:12 +01:00
Lennart Poettering
8c28360a21
Merge pull request #11823 from keszybz/more-fuzz-coverage
More fuzz coverage
2019-02-26 17:21:32 +01:00
Zbigniew Jędrzejewski-Szmek
92e068b465 basic/utf8: do not read past end of string when looking for a multi-byte character
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9341.
2019-02-26 12:37:40 +01:00
Yu Watanabe
10f6188b67 fuzz: add a sample for fuzz-udev-database 2019-02-26 13:28:30 +09:00
Lennart Poettering
510dc4da13
Merge pull request #11767 from yuwata/network-bridge-enslaved
network: extend 'enslaved' state to bridge slave
2019-02-25 19:29:30 +01:00
Zbigniew Jędrzejewski-Szmek
4c4589227e fuzz-unit-file: add some directives for stuff coverage reports as not covered
Some of those directives appear in the corpus, but without arguments, so maybe
the fuzzing libraries can't trigger the right cases. Let's help them.
2019-02-25 15:46:23 +01:00
Yu Watanabe
eac31d708f fuzz: add directives.link and 99-default.link for fuzz-link-parser
Also adds several reproducers of errors fixed in earlier commits.
2019-02-25 12:40:42 +09:00
Yu Watanabe
6609924c32 test-network: add more tests for IgnoreCarrierLoss=
Suggested by @amishmm in #9262.
2019-02-25 09:34:14 +09:00
Yu Watanabe
2be6c5d2ec test-network: add more tests for Bridge= 2019-02-25 09:34:14 +09:00
Yu Watanabe
cc3e488c7d test-network: testing with two bond slaves 2019-02-23 19:43:25 +09:00
Yu Watanabe
3dd2d52414 test-udev: fix alignment and drop unnecessary white spaces 2019-02-22 06:50:21 +09:00
Yu Watanabe
84a0819c9d test-udev: add more tests for line continuation 2019-02-22 06:50:20 +09:00
Lennart Poettering
953a1af082
Merge pull request #11776 from keszybz/networkd-ordered-sets
Store domains lists in OrderedSets in networkd
2019-02-21 15:15:11 +01:00
Martin Pitt
f5cf985e9c networkd-test: fix test_dropin()
- This test needs resolved, so make sure it is started. In some Debian
   environments it is not.
 - It was an unnecessary, and now failing assumption that name servers
   get atomically written to the resolved's resolv.conf. Wait until both
   expected name servers are in the file.
2019-02-21 12:37:08 +01:00