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
Evgeny Vereshchagin
2614d83aa0
tests: pass halt_on_error=1 to UBSan
...
By default, UBSan neither crashes nor exits with a non-zero exit code
when undefined behavior has been detected. This is problematic because
it makes it much harder to catch issues like https://github.com/systemd/systemd/issues/10346 ,
https://github.com/systemd/systemd/issues/10347 , and https://github.com/systemd/systemd/issues/10333 .
In fact, those issue were found just because I decided to grep
the test log, which isn't something that I normally do :-)
As it turns out, the only way to make UBSan signal that something is wrong that works more or less
reliably everywhere is to pass halt_on_error=1 (though, it's probably worth noting that it's currently
not set for PID1 in order not to trigger kernel panics).
See https://reviews.llvm.org/D35085#804183 and https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/HEAD/reference.md
2018-10-11 08:55:04 +02:00
Zbigniew Jędrzejewski-Szmek
9b0ca01903
meson: rename cpp_cmd to cxx_cmd
...
cpp is a really bad alias for c++ because it's also the name of the
preprocessor. Let's rename the variable.
2018-10-10 11:50:57 +02:00
Zbigniew Jędrzejewski-Szmek
1b2acaa7a6
meson: we cannot call get_compiler('cpp') if we didn't "add" it
...
Follow-up for f6d783ac3d .
2018-10-09 21:12:00 +02:00
Zbigniew Jędrzejewski-Szmek
64d14b7e23
README.testsuite: update the documentation for meson
2018-10-09 15:31:00 +02:00
Zbigniew Jędrzejewski-Szmek
a90c04b6b7
test-execute: filter out ip6tnl0@ and ip6gre0@ interfaces
...
Those interfaces are created automatically when ip6_tunnel and ip6_gre loaded.
They break the test with exec-privatenetwork-yes.service.
C.f. 6b08180ca6 .
2018-10-09 14:08:09 +02:00
Yu Watanabe
3f6f58e03a
test: add TEST-24-UNIT-TESTS running all basic tests under containers
2018-10-09 19:11:21 +09:00
Yu Watanabe
0013fac248
test: do not use global variable to pass error
2018-10-09 19:11:21 +09:00
Yu Watanabe
dd75c133d8
test: replace duplicated Makefile by symbolic link
2018-10-09 19:11:21 +09:00
Yu Watanabe
ad931fee50
test: make install_keymaps() optionally install more keymaps
2018-10-09 19:11:21 +09:00
Yu Watanabe
83a7051ee1
test: add paths of keymaps in install_keymaps()
...
It seems that the paths of directories storing keymaps are changed.
2018-10-09 19:11:21 +09:00
Yu Watanabe
7d10ec1cda
test: introduce install_zoneinfo()
...
But it is not called by default.
2018-10-09 19:11:21 +09:00
Yu Watanabe
e3d3dada24
test: install libraries required by tests
2018-10-09 19:11:21 +09:00
Yu Watanabe
f6d783ac3d
meson: use same compilers to build fuzzers
2018-10-09 11:54:10 +02:00
Lennart Poettering
ad191df836
Merge pull request #10134 from keszybz/test-runner
...
Some test-related fixed and a test runner for installed tests
2018-10-05 20:35:30 +02:00
Lennart Poettering
dacd723620
Merge pull request #10117 from keszybz/undynamicify
...
Set DynamicUser=no for networkd, resolved, timesyncd
2018-10-05 17:41:56 +02:00
Yu Watanabe
e913b7988f
test-execute: add a test for systemcall filter ( #10273 )
...
This adds a test for issue #9939 which is fixed by
a5404992cc (#9942 ).
2018-10-05 14:46:30 +09:00
Zbigniew Jędrzejewski-Szmek
ac7b333009
Merge pull request #10261 from yuwata/test-network
...
test: small improvements for systemd-networkd-test.py
2018-10-03 10:03:34 +02:00
Yu Watanabe
b7172f3471
test-execute: also tests under the condition that unshare() is filtered
...
This is mainly for testing 1beab8b0d0 .
2018-10-03 08:33:23 +02:00
Yu Watanabe
6aea927681
test: make systemd-networkd-tests.py run on arbitrary directory
2018-10-03 14:38:30 +09:00
Yu Watanabe
ec6a47044a
test: replace stop+start by restart
...
This suppress the following warnings:
```
Warning: Stopping systemd-networkd.service, but it can still be activated by:
systemd-networkd.socket
```
2018-10-03 14:36:34 +09:00
Yu Watanabe
5b054bfc10
test: add a testcase for oss-fuzz#10746
2018-10-03 08:53:42 +09:00
Lennart Poettering
c3281539da
Merge pull request #10246 from keszybz/fuzz-buss
...
Bus fuzzer
2018-10-02 15:45:21 +02:00