Commit Graph

617 Commits

Author SHA1 Message Date
Frantisek Sumsal a978c9f292 tests: dbus.service was renamed to dbus-daemon.service in Rawhide
Fedora Rawhide renamed dbus.service to dbus-daemon.service - that
breaks tests which require working DBus (e.g. TEST-03-JOBS)

Excerpt from the dbus.spec:
The 'dbus' package is only retained for compatibility purposes. It will
eventually be removed and then replaced by 'Provides: dbus' in the
dbus-daemon package. It will then exclusively be used for other packages to
describe their dependency on a system and user bus. It does not pull in any
particular dbus *implementation*, nor any libraries. These should be pulled
in, if required, via explicit dependencies.
2018-11-12 19:16:55 +01:00
Lennart Poettering 8a26dae88f
Merge pull request #10736 from yuwata/coredump-comment
fuzz: fix oss-fuzz#8658
2018-11-12 11:42:16 +01:00
Lennart Poettering bdc0bcf014
Merge pull request #10731 from yuwata/fix-oss-fuzz-11344
Fixes oss-fuzz#11344
2018-11-12 10:23:23 +01:00
Yu Watanabe 9544a1ceb0 fuzz: add testcase of oss-fuzz#8658 2018-11-12 18:10:24 +09:00
Yu Watanabe bf877a54c7
Merge pull request #10669 from danderson/networkd-6rd
networkd: add 6rd support for sit netdevs
2018-11-12 15:55:03 +09:00
Yu Watanabe fd5ef45eab
Merge pull request #10694 from evverx/udev-test-in-container
udev-test: remove a check for whether the test is run in a container
2018-11-12 13:12:09 +09:00
Yu Watanabe 34d178bbac fuzz: add testcase of oss-fuzz#10734 2018-11-12 02:04:35 +09:00
Yu Watanabe 89c7e7aa97 fuzz: add testcase of already fixed issue 10908 2018-11-12 01:17:45 +09:00
Yu Watanabe c1b4a2b03a fuzz: add testcase of oss-fuzz#11344 2018-11-12 00:36:48 +09:00
Yu Watanabe e2e6148619 fuzz: add testcase of oss-fuzz#11345 2018-11-11 12:03:52 +09:00
Evgeny Vereshchagin 110a13202e udev-test: skip the test only if it can't setup its environment
This is basically a replacement for 0eb3cc8850.
2018-11-10 11:56:59 +01:00
Yu Watanabe 3ee0942908 fuzz: add testcase for oss-fuzz#11324 2018-11-10 15:53:32 +09:00
David Anderson d29dc4f1b8 Add a networkd test for 6rd interface creation.
Unfortunately we can't check the 6rd attribute, because it's not
exposed in /sys or anywhere other than netlink... But at least we
can check that networkd brings up an interface that looks right.
2018-11-09 18:45:38 -08:00
David Anderson 6e42bd5504 Add 6rd directive to the netdev fuzzing corpus. 2018-11-09 17:56:33 -08:00
Yu Watanabe 872faf59c0 fuzz: add testcases of recent issues 2018-11-09 11:45:43 +09:00
Evgeny Vereshchagin 881886ef08 udev-test: remove a check for whether the test is run in a container
It's too broad a check that prevents the test from running on Travis CI.
2018-11-09 03:34:08 +01:00
Yu Watanabe d571998498 fuzz: add a testcase for oss-fuzz#11285 2018-11-08 12:31:02 +09:00
Yu Watanabe 9f7d3db3ed fuzz: add more testcases of already fixed issue about multiple netdev kind
This adds testcases of oss-fuzz#11286, oss-fuzz#11287, oss-fuzz#11296,
oss-fuzz#11297, and oss-fuzz#11299.

The issue was fixed by 62facba19a.
2018-11-08 12:16:13 +09:00
Yu Watanabe 348784e62a fuzz: add testcases for oss-fuzz#11279 and #11280 2018-11-07 17:24:41 +09:00
Yu Watanabe 11d93952ea test: missing "die"
Follow-up for a41ff38b09.
2018-11-07 08:57:28 +01:00
Evgeny Vereshchagin 220fa139de tests: add a couple of files containing all the sections and directives
This should help the fuzzers to discover code paths faster.

In case anyone is interested, they were generated with the following script
```
perl -aF'/[\s,]+/' -ne '
if (my ($s, $d) = ($F[0] =~ /^([^\s\.]+)\.([^\s\.]+)$/)) { $d{$s}{$d} = 1; }
END { while (my ($key, $value) = each %d) {
    printf "[%s]\n%s\n", $key, join("\n", keys(%$value))
}}'
```
by passing src/network/networkd-network-gperf.gperf and
src/network/netdev/netdev-gperf.gperf to it.
2018-11-06 19:42:29 +01:00
Evgeny Vereshchagin cf02fd1b7a tests: replace AdActorSysPrio with AdActorSystemPriority
This is a follow-up to https://github.com/systemd/systemd/pull/10653.
2018-11-06 19:36:40 +01:00
Evgeny Vereshchagin d0f51aa9cd tests: add a reporoducer for https://github.com/systemd/systemd/issues/10639 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin efc1a59af6 tests: add some data that can be fed to fuzz-network-parser 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin a633d5b997 tests: add a reproducer for https://github.com/systemd/systemd/issues/10629 2018-11-06 19:01:32 +01:00
Evgeny Vereshchagin e27aac11f2 networkd: make netdev_load_one "public" and add a fuzzer for it 2018-11-06 19:01:32 +01:00
Tobias Jungel db688b7e55 networkd: cleanup for #10542
fixes: 53b1f7d
2018-11-06 16:42:12 +03:00
Lennart Poettering 8912a99cea
Merge pull request #10606 from yuwata/udev-tests
test: mask hwdb-update.services in most tests
2018-11-05 23:14:42 +03:00
Lennart Poettering a54e373163
Merge pull request #10618 from yuwata/fix-10615
network: fix several issues in config parser
2018-11-05 17:37:25 +03:00
Evgeny Vereshchagin 201bf07f7c tests: also use lsmod to check whether modules are available (#10634)
It's not entirely impossible to screw something up playing with
kernel modules on a Saturday evening :-) This PR fixes a scenario
where a module has been loaded into the kernel but the module itself
has been removed from the disk.

```
$ lsmod | grep wireg
wireguard             225280  0
ip6_udp_tunnel         16384  1 wireguard
udp_tunnel             16384  1 wireguard

$ modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.18.16-200.fc28.x86_64

$ sudo ./systemd-networkd-tests.py NetworkdNetDevTests.test_wireguard
...
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.18.16-200.fc28.x86_64
test_wireguard (__main__.NetworkdNetDevTests) ... unexpected success

----------------------------------------------------------------------
Ran 1 test in 5.152s

FAILED (unexpected successes=1)
```

This is a follow-up to https://github.com/systemd/systemd/pull/10625.
2018-11-05 12:47:38 +09:00
Evgeny Vereshchagin 7a3bc5a8e5 tests: add a basic test for wireguard (#10631) 2018-11-04 02:03:43 +09:00
Yu Watanabe 22f64c32fa test: UseRoutes= and UseTimezone= need to be in [DHCP] section 2018-11-04 00:31:46 +09:00
Yu Watanabe 9a4720a9ef test-network: wait after removing links
After ec6a47044a, networkd starts
soon after removing links used by previous test. That causes
some racy situation of removing links and detecting links by networkd.
2018-11-04 00:31:46 +09:00
Yu Watanabe ed94652a33 test: drop 'After=multi-user.target' from most of testsuite.service 2018-11-03 18:00:47 +09:00
Yu Watanabe 056ae88152 test: mask several unnecessary services
This may make CIs run faster.
2018-11-03 18:00:47 +09:00
Yu Watanabe f775f613ad test: increase timeout for TEST-17-UDEV-WANTS
As the test randomly fails with timeout.
This may fix #10274.
2018-11-03 18:00:47 +09:00
Evgeny Vereshchagin 7a0a37b283 tests: mark a few tests as expected failures when the required modules aren't available
Closes https://github.com/systemd/systemd/issues/10617.
2018-11-03 00:12:01 +01:00
Evgeny Vereshchagin f7bdd562a9 tests: make NetworkdNetWorkTests.test_routing_policy_rule pass on CentOS
Depending on the content of /etc/iproute2/rt_dsfield, ip can print either
`0x08` or `throughput` as was shown in https://github.com/systemd/systemd/issues/10617#issuecomment-435200859.
2018-11-02 17:10:59 +01:00
Tobias Jungel 99f68ef02d networkd: add missing bonding options (#10542)
Add support for bonding options system prio, port key and actor system mac.

These options exist in the linux kernel since 4.2
(torvalds/linux@171a42c38c)

Details:
https://www.kernel.org/doc/Documentation/networking/bonding.txt
2018-11-02 10:31:20 +09:00
Evgeny Vereshchagin 28ffcec2cb tests: add an lldp fuzzer
I went through my antique collection of fuzzers the other day
to see which ones I hadn't sent upstream yet. This one
seems to be nice to have and ready to be merged. As far as I can
tell, it hasn't managed to find anything useful yet,
but it's better to be safe than sorry especially when it comes to networking
code :-)
2018-10-29 15:24:16 +00:00
Zbigniew Jędrzejewski-Szmek 05f339267e
Merge pull request #10378 from poettering/json-fuzz-fix
json: a comprehensive fix for oss-fuzz#10908
2018-10-25 16:25:39 +02:00
Yu Watanabe a41ff38b09 test: create /dev/null in test-udev.pl 2018-10-24 04:46:48 +09:00
Evgeny Vereshchagin 20fc56c02d tests: allow passing log_level via an environment variable (#10490) 2018-10-23 16:09:23 +09:00
Michael Biebl 3deb28f20a tests: update networkd-test.py to use resolvectl instead of systemd-resolve (#10486)
The latter is merely a compat symlink nowadays.
2018-10-23 07:29:03 +09:00
Yu Watanabe 114fd97811 fuzz: add testcase of oss-fuzz#11019 2018-10-19 06:11:58 +09:00
Lennart Poettering 40235c3c5e tests: clean up again after running tests (#10446)
Currently, if I run the full "run-integration-tests.sh" script it will
fail on my machine because it fills up /var/tmp whith just too much
crap until the disk is full.

Let's make sure that "run-integration-tests.sh" cleans up after every
test. For that change the make targets to run from "clean setup run" to
"clean setup run clean" — except that that doesn't work since make is
smart enough to realize that the same target appears twice on the
command line and will only execute it once. Let's fix that by defining
another target "clean-again" which is just like "clean", but allows us
to be added to the same command line a second time. Then, let's build
with "clean setup run clean-again" and all is good.

While we are at it, let's also add .PHONY where appropriate, after all
these all are phony targets.
2018-10-19 03:59:24 +09:00
Lennart Poettering e413ec4a9d fuzz: add test from oss-fuzz#10908
https://oss-fuzz.com/download?testcase_id=5639441482252288
2018-10-18 16:44:51 +02:00
Anita Zhang 90fc172e19 core: implement per unit journal rate limiting
Add LogRateLimitIntervalSec= and LogRateLimitBurst= options for
services. If provided, these values get passed to the journald
client context, and those values are used in the rate limiting
function in the journal over the the journald.conf values.

Part of #10230
2018-10-18 09:56:20 +02:00
Davide Cavalca b75f0c69b3 shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
Davide Cavalca ccac62563e tests: fix fallthrough condition for supplementary groups 2018-10-11 22:24:03 +02:00