Commit Graph

896 Commits

Author SHA1 Message Date
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
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