aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* core: support %j in unit dependency resolutionPatrick Williams2018-12-222-0/+77
| | | | | | | | | | | | | | Commit 250e9fadbcc0ca90e697d7efb40855b054ed3b8f introduced support for %j/%J specifier in unit files. The function unit_name_printf is used in unit dependency resolution, such as Wants / After directives, but was missing support for the %j. Add to allow directives such as: [Unit] Wants=bar-%j.target Fixes: systemd/systemd#11217 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* networkd: permit DNS "DefaultRoute" configuration in .network filesLennart Poettering2018-12-211-0/+1
|
* resolved: bind .local domains to mDNS with DNS_SCOPE_YES, similar LLMNRLennart Poettering2018-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | Previously, we'd return DNS_SCOPE_MAYBE for all domain lookups matching LLMNR or mDNS. Let's upgrade this to DNS_SCOPE_YES, to make the binding stronger. The effect of this is that even if "local" is defined as routing domain on some iface, we'll still lookup domains in local via mDNS — if mDNS is turned on. This should not be limiting, as people who don't want such lookups should turn off mDNS altogether, as it is useless if nothing is routed to it. This also has the nice benefit that mDNS/LLMR continue to work if people use "~." as routing domain on some interface. Similar for LLMNR and single label names. Similar also for the link local IPv4 and IPv6 reverse lookups. Fixes: #10125
* tests: explicitly enable user namespaces for TEST-13-NSPAWN-SMOKEFrantisek Sumsal2018-12-211-1/+6
|
* netdev bond: add support to configure tlb_dynamic_lbSusant Sahani2018-12-153-0/+18
| | | | | | Closes https://github.com/systemd/systemd/issues/11135 Add test for bond : tlb_dynamic_lb
* udev-test: check if permitted to create block device nodesAlexey Bogdanenko2018-12-111-0/+8
|
* Merge pull request #11099 from abogdanenko/udev-test-fix-missing-dirEvgeny Vereshchagin2018-12-111-1/+6
|\ | | | | udev-test: fix skip condition and missing directory test/run
| * udev-test: fix missing directory test/runAlexey Bogdanenko2018-12-091-0/+5
| | | | | | | | | | | | | | | | | | Fixes the following error: Failed to mount test /run: No such file or directory By the time command "./test-udev check" calls function "fake_filesystems", directory "test/run" must be present.
| * udev-test: fix test skip conditionAlexey Bogdanenko2018-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | When there is a failure to setup the environment, the following happens: 1. Command "./test-udev check" exits with non-zero code. 2. Perl function "system" returns the code. 3. The code is evaluated as true by Perl. Then we stop the test.
* | Merge pull request #11084 from poettering/networkd-test-fixZbigniew Jędrzejewski-Szmek2018-12-114-12/+137
|\ \ | | | | | | unbreak networkd-test.py
| * | networkd-test: add mkosi snippet for building and running networkd-tets.py ↵Lennart Poettering2018-12-073-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | in a network namespaced container This provides us with an easy command line to test this script. Because the test was so difficult to get running noone ever did, hence it broke badly quickly. Let's fix that.
| * | networkd-test: change test_transient_hostname_with_static to use an explicit ↵Lennart Poettering2018-12-071-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | static hostname Previously, the test would use the existing static hostname. However, this woud not work as expected in the static hostname was "localhost" because the transient hostname will override the static one in that case anyway, as the assumption hostnamed makes is that "localhost" is a non-initialized hostname. Hence when testing this, let's first set the static hostname to something specific first (that is not "localhost").
| * | networkd-test: restart hostnamed after reverting /etc/hostname tooLennart Poettering2018-12-071-0/+2
| | | | | | | | | | | | Otherwise hostnamed will not report the right data in the next test
| * | networkd-test: add write_config()Lennart Poettering2018-12-071-6/+10
| | | | | | | | | | | | | | | The call was removed in ec89276c2ab345b84c2dab4c35826de41aa6fd0f, but is still used. Not sure why noone noticed this.
| * | networkd-test: set right access modes for /run/systemd/netifLennart Poettering2018-12-071-5/+10
| |/ | | | | | | | | | | | | | | Otherwise networkd isn't happy. Let's also make addition of the "systemd-network" non-fatal. The user exists on many machines anyway, hence it shouldn't fail if it already exists.
* | Merge pull request #11105 from keszybz/path-parsingLennart Poettering2018-12-101-0/+0
|\ \ | | | | | | Some tightening of our path parsing code
| * | fuzz-unit-file: add one more test caseZbigniew Jędrzejewski-Szmek2018-12-101-0/+0
| |/ | | | | | | | | | | | | | | There seems to be no error per se. RequiresMountsFor=%s%s%s..%s%s%s is expanded to RequiresMountsFor=/bin/zsh/bin/zsh/bin/zsh/bin/zsh/..., which takes a bit of time, and then we iterate over this a few times, creating a hashmap with a hashmap for each prefix of the path, each with one item pointing back to the original unit. Takes about 0.8 s on my machine.
* / networkd: Static neighbor supportWilliam A. Kennington III2018-12-094-0/+31
|/ | | | | | | When using networkd we currently have no way of ensuring that static neighbor entries are set when our link comes up. This change adds a new section to the network definition that allows multiple static neighbors to be set on a link.
* test-network: make search_words_in_file() hit multi wordsYu Watanabe2018-12-061-14/+15
|
* test-network: delete rules before running next testYu Watanabe2018-12-061-0/+6
|
* test-network: add a line break after starting networkdYu Watanabe2018-12-061-0/+1
| | | | | This may be ugly. But otherwise, outputs of several check commands are shown without new line...
* test-network: check link before starting dnsmasqYu Watanabe2018-12-061-27/+18
|
* test-network: show command outputsYu Watanabe2018-12-061-0/+4
|
* test-network: sort imported modulesYu Watanabe2018-12-061-4/+4
|
* test-network: sort links and unitsYu Watanabe2018-12-061-44/+156
|
* test-network: fix typo in class nameYu Watanabe2018-12-061-1/+1
|
* Merge pull request #10988 from ssahani/IFLA_BRPORT_MCAST_TO_UCASTYu Watanabe2018-12-065-4/+22
|\ | | | | networkd: bridge add support to configure multicast_to_unicast
| * test-network: add test for bridge MulticastToUnicastSusant Sahani2018-12-062-4/+19
| |
| * networkd: bridge add support to configure multicast_to_unicastSusant Sahani2018-12-033-0/+3
| | | | | | | | closes #10649
* | test-network: Add test for invert RPDB ruleSusant Sahani2018-12-062-1/+24
| |
* | networkd: RPDB rule - add support to configure inverted rule.Susant Sahani2018-12-062-0/+2
| | | | | | | | Closes #10706
* | Merge pull request #11021 from ssahani/isatapYu Watanabe2018-12-054-2/+26
|\ \ | |/ |/| networkd: Add support to configure ISATAP tunnel
| * test-network: add test for ISATAPSusant Sahani2018-12-033-2/+25
| |
| * networkd: Add support to configure ISATAP tunnelSusant Sahani2018-12-031-0/+1
| | | | | | | | | | | | | | Let's just reuse the code of sit tunnel to create a ISATAP tunnel. Matter of turning a flag Please see https://elixir.bootlin.com/linux/v4.19.6/source/net/ipv6/sit.c#L208
* | cgroup: Add DisableControllers= directive to disable controller in subtreeChris Down2018-12-033-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers (like the CPU controller) have a performance cost that is non-trivial on certain workloads. While this can be mitigated and improved to an extent, there will for some controllers always be some overheads associated with the benefits gained from the controller. Inside Facebook, the fix applied has been to disable the CPU controller forcibly with `cgroup_disable=cpu` on the kernel command line. This presents a problem: to disable or reenable the controller, a reboot is required, but this is quite cumbersome and slow to do for many thousands of machines, especially machines where disabling/enabling a stateful service on a machine is a matter of several minutes. Currently systemd provides some configuration knobs for these in the form of `[Default]CPUAccounting`, `[Default]MemoryAccounting`, and the like. The limitation of these is that Default*Accounting is overrideable by individual services, of which any one could decide to reenable a controller within the hierarchy at any point just by using a controller feature implicitly (eg. `CPUWeight`), even if the use of that CPU feature could just be opportunistic. Since many services are provided by the distribution, or by upstream teams at a particular organisation, it's not a sustainable solution to simply try to find and remove offending directives from these units. This commit presents a more direct solution -- a DisableControllers= directive that forcibly disallows a controller from being enabled within a subtree.
* | network: rename Protocol= in [RoutingPolicyRule] to IPProtocol=Yu Watanabe2018-12-023-3/+3
|/
* Merge pull request #10357 from poettering/import-fsZbigniew Jędrzejewski-Szmek2018-11-293-0/+172
|\ | | | | machinectl import-fs command and other fixes
| * test: add simple test for importdLennart Poettering2018-11-263-0/+172
| | | | | | | | | | | | | | It tests importing and exporting, and a few other machinectl commands. It currently does not test pulling (i.e. http downloads), but we might want to add that later on.
* | catalog: reject entries where the language is too short earlyEvgeny Vereshchagin2018-11-291-0/+2
| | | | | | | | Closes https://oss-fuzz.com/testcase-detail/5674475278827520
* | test-network: stop systemd-networkd.socket during testingYu Watanabe2018-11-281-0/+6
| | | | | | | | To suppress noisy warning messages.
* | test-network: clear state file before starting networkdYu Watanabe2018-11-281-1/+7
| | | | | | | | | | | | Otherwise, some tests may disturb others, e.g., NetworkdNetWorkTests.test_routing_policy_rule_port_range and NetworkdNetWorkTests.test_routing_policy_rule.
* | test-network: use /run instead of legacy /var/runYu Watanabe2018-11-281-5/+5
| |
* | Merge pull request #10948 from ssahani/iprule-port-protoYu Watanabe2018-11-294-3/+42
|\ \ | | | | | | networkd: add support to configure ip rule port range and protocol.
| * | networkd: add support to configure ip rule port range and protocol.Susant Sahani2018-11-284-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Please see: iprule: support for ip_proto, sport and dport match options https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=f686f764682745daf6a93b0a6330ba42a961f858 Closes 10622
* | | fix: systemd-networkd reverse route orderingSusant Sahani2018-11-282-1/+27
|/ / | | | | | | | | | | We missing a default route. Add gateway first. This fixes https://github.com/systemd/systemd/issues/5430
* | Merge pull request #10967 from evverx/check-directivesYu Watanabe2018-11-282-0/+13
|\ \ | | | | | | travis: make sure that *.perf and directives.* files are in sync
| * | tests: update test/fuzz/fuzz-netdev-parser/directives.netdevEvgeny Vereshchagin2018-11-282-0/+13
| | | | | | | | | | | | This is a follow-up to 2266864b04257d7a.
* | | test: make TEST-27 non-racyLennart Poettering2018-11-281-3/+3
|/ / | | | | | | | | | | Not sure how I missed this, but we of course need to wait for the "systemd-run" commands to finish before we can check the output files this generated.
* | test: add a test for StandardError=file:…Lennart Poettering2018-11-273-0/+93
| | | | | | | | | | This deserves a test of its, given how broken on so many levels this previously was.
* | test: add test for setting service manager environment variablesLennart Poettering2018-11-273-0/+76
| | | | | | | | | | This is a follow-up for #10594. I somehow forgot to commit this when I worked on that.