Commit Graph

503 Commits

Author SHA1 Message Date
Martin Pitt 818567fce6 test: Run qemu/nspawn tests with "set -e"
This catches errors like "ninja not found", missing programs etc. early,
instead of silently ignoring them and trying to boot a broken VM.

In install_config_files(), allow some distro specific files to be absent
(such as /etc/sysconfig/init).
2017-08-10 08:43:13 +02:00
Martin Pitt 22077c9c91 test: Write state and log files into $BUILD_DIR
This avoids clobbering the source tree with .testdir/test.log files and
makes the tests work in situations where the source tree is read-only.
2017-08-10 08:30:55 +02:00
Evgeny Vereshchagin ca992ecf07 tests: use ninja-build if ninja is not available (#6544)
This makes the tests work on CentOS, which currently has ninja-build
only.
2017-08-07 11:06:07 +02:00
Martin Pitt 054ee249a2 test: Factorize common integration test functions (#6540)
All test/TEST* but TEST-02-CRYPTSETUP share the same check_result_qemu()
and test_cleanup(), so move them into test_functions and only override
them in TEST-02-CRYPTSETUP.

Also provide a common test_run() which by default assumes that both QEMU
and nspawn tests are run. Particular tests which don't support either
need to explicitly opt out by setting $TEST_NO_{QEMU,NSPAWN}. Do it this
way around to avoid accidentally forgetting to opt in, and to encourage
test authors to at least always support nspawn.
2017-08-04 15:34:14 +03:00
Zbigniew Jędrzejewski-Szmek a6c97fc460 Drop bus-policy bits 2017-07-23 09:29:02 -04:00
Zbigniew Jędrzejewski-Szmek 26116187dd test: try to guess the build directory
This will work if $(TOP_SRC_DIR) has exactly one subdirectory with
.ninja_deps. Otherwise, BUILD_DIR has to be specified.
2017-07-18 10:05:06 -04:00
Zbigniew Jędrzejewski-Szmek 209f4b9e33 test: convert test/ to use meson install
Automatic rebuilding is removed: it doesn't play well with ninja, because
ninja always writes logs, and even if nothing needs to be built, it will
make the log file owned by root. So let's just remove this, and say that
the user must always do the build first.

I'm also keeping make for the tests, because ninja doesn't play well with
sudo.

Since the build directory is arbitrary, it needs to be specified, e.g.
  sudo make BUILD_DIR=/home/zbyszek/src/systemd/build1 -C test/TEST-01-BASIC/
2017-07-18 10:05:06 -04:00
Zbigniew Jędrzejewski-Szmek 72cdb3e783 build-sys: drop automake support
v2:
- also mention m4
2017-07-18 10:04:44 -04:00
Martin Pitt 23fa427d66 tests: ignore router state in networkd test (#6390)
In networkd-test.py, don't assert that the router state is "routable".
While it should eventually become that, we don't wait for it, and thus
at that point it often is "carrier" or "degrated" still. It is also not
really relevant as this only tests the "client" side interface.
2017-07-18 00:06:35 +02:00
Zbigniew Jędrzejewski-Szmek 1256c4814f meson: hook up sysv-generator-test 2017-07-13 19:21:40 -04:00
Zbigniew Jędrzejewski-Szmek 7f0cc63771 sysv-generator: use generator_add_symlink()
generator_add_symlink() is extended to ignore EEXIST. This should be fine
for all existing callers.

There's a small difference in behaviour when adding symlinks in sysv-generator:
the message is more generic and does not include ", ignored". But creation of
symlinks shouldn't ever fail except if things are very wrong, so in practice
this shouldn't matter.

Test needed updating: os.path.exists(os.readlink(link)) only works if the link
is absolute (or if we are in the right directory). Let's just use
os.path.exists(link), which properly tests that the symlink target exists.
2017-07-13 18:56:36 -04:00
tblume 85393d8f31 tests: adapt test-functions to run tests on SUSE (#6270) 2017-07-06 14:30:14 -04:00
Timothée Ravier c090d74dd9 test: ensure 'InaccessiblePaths=/proc' option works (#6017)
Test case for PR #5985.
2017-05-25 07:47:08 +03:00
Evgeny Vereshchagin b8d79b4b68 tests: stop creating /TEST (#5943)
Closes #5856.
2017-05-11 18:56:39 -04:00
Michael Biebl 8251ee109c Merge pull request #5842 from keszybz/meson-status-and-conditionals
Meson status and conditional simplification
2017-05-03 16:45:31 +02:00
Zbigniew Jędrzejewski-Szmek 2c201c2140 meson: use booleans for conf.set and drop unecessary conditionals
Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.
2017-05-02 16:29:11 -04:00
Jörg Thalheim 3e67e5c992 more portable python shebangs (#5816)
This is useful on systems like NixOS, where python3 is not in
/usr/bin/python3 as well as for people using alternative ways to
install python such as virtualenv/pyenv.
2017-04-30 20:26:56 -04:00
Chris Lamb 04e599b1ce test: explain why we explicitly make all despite test/Makefile's check target calling it (#5830) 2017-04-29 08:23:13 +02:00
Evgeny Vereshchagin d5d5e06086 Merge pull request #5704 from keszybz/meson
meson: build systemd using meson
2017-04-25 16:10:15 +03:00
Zbigniew Jędrzejewski-Szmek b884196cc1 meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
Lennart Poettering 8ea9aa9e88 Merge pull request #5354 from msekletar/issue-518
service: serialize information about currently executing command
2017-04-24 19:51:34 +02:00
Zbigniew Jędrzejewski-Szmek 37efbbd821 meson: reindent all files with 8 spaces
The indentation for emacs'es meson-mode is added .dir-locals.

All files are reindented automatically, using the lasest meson-mode from git.
Indentation should now be fairly consistent.
2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek d83f4f506d test-efi-create-disk.sh: allow running from separate build dir, hook up to meson
This allow test-efi-disk.img to be created under meson.
The invocation of qemu is not converted yet, in particular because the
command-line used in Makefile.am is outdated.
2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek 4ff3f251b9 meson: install test data
v2:
- do not install test-data if instal-tests=no
2017-04-23 21:47:28 -04:00
Dimitri John Ledkov b56be2966a networkd: Add bridge port priority setting (#5545)
Allow setting bridge port priority in the Bridge section of the network file,
similar to e.g. port path cost setting.

Set the default to an invalid value of 128, and only set the port priority when
it's not 128. Unlike e.g. path cost, zero is a valid priority value.

Add a networkd-test.py to check that bridge port priority is correctly set.

Incidently, fix bridge port cost type and document valid ranges.
2017-04-11 23:17:31 +02:00
Dimitri John Ledkov c618423a5a test/TEST-12-ISSUE-3171: specify -w1 option to netcat due to default change. (#5722)
On Ubuntu 17.04 (zesty zapus) netcat-openbsd was upgraded from 1.105-7ubuntu1
to 1.130-3, at the same time the defaults got changed from -q0 to -q-1
(infinity) the net result is that `echo A | nc -U' call now hangs, preventing
the testcase to complete. One could use the old default of -q0, but that option
is not available in some netcat implementations. Thus settle to specify -w1
instead to mitigate the testcase hang.
2017-04-11 22:34:29 +03:00
Michal Sekletar 123d672e85 tests: add new test for issue #518 2017-04-11 09:22:29 +02:00
Zbigniew Jędrzejewski-Szmek f06a6bcd76 test-journal-importer: add a test case with broken input 2017-02-15 00:31:55 -05:00
Zbigniew Jędrzejewski-Szmek 48ccb60d45 test-journal-importer: new test file to check the newly exported importer code
Only one test case is added, but it is enough to check basic sanity of the
code (single-line and binary fields and trusted fields, allocation and freeing).
2017-02-15 00:29:57 -05:00
Martin Pitt ee3c7ff7c3 test: move resolved test data into test/
Moe test-resolve's test data from src/resolve/test-data to
test/test-resolve/ to be consistent with test/test-{execute,path}/. This
will make it easier to make the tests relocatable.
2017-02-13 22:23:48 +01:00
Lennart Poettering 6818c54ca6 core: skip ReadOnlyPaths= and other permission-related mounts on PermissionsStartOnly= (#5309)
ReadOnlyPaths=, ProtectHome=, InaccessiblePaths= and ProtectSystem= are
about restricting access and little more, hence they should be disabled
if PermissionsStartOnly= is used or ExecStart= lines are prefixed with a
"+". Do that.

(Note that we will still create namespaces and stuff, since that's about
a lot more than just permissions. We'll simply disable the effect of
the four options mentioned above, but nothing else mount related.)

This also adds a test for this, to ensure this works as intended.

No documentation updates, as the documentation are already vague enough
to support the new behaviour ("If true, the permission-related execution
options…"). We could clarify this further, but I think we might want to
extend the switches' behaviour a bit more in future, hence leave it at
this for now.

Fixes: #5308
2017-02-12 00:44:46 -05:00
Dan Streetman 2a478ebfa1 test: remove sys.tar.xz
The tarball is no longer needed, as the sys-script.py script creates
all the sys/ contents.
2017-02-10 15:29:52 -05:00
Dan Streetman d95b329d70 test: create sys-script.py script
The script contains the contents of all sys/ test files, and creates
all dirs/links/files when run.  This replaces the sys.tar.xz tarball
that contained sys/, so changes to sys files only require a simple
commit in git, instead of checking in an entire new tarball for each
sys/ change.
2017-02-10 15:29:23 -05:00
Dan Streetman d001ac2c01 test: add script to convert sys/ into sys-script.py
Instead of keeping all sys/ nodes in a tarball, use a script
"sys-script.py" to create all the sys/ entries.

This adds a script to create that initial "sys-script.py" script, using
an existing sys/ directory, created from the sys.tar.xz contents.
The "sys-script.py" can then be edited or recreated later, when any sys/
files are added or modified; the change will be only a patch to the
"sys-script.py" script in git, instead of forcing git to store a new
binary tarball.
2017-02-10 15:27:18 -05:00
Martin Pitt d26fdaa236 tests: show journal on systemd-resolved.service failures (#5297)
In networkd-test.py, show resolved's journal on failure, to debug issues
like https://github.com/systemd/systemd/pull/5283.
2017-02-09 21:30:44 -05:00
Franck Bui fbc42f1332 tests: add dropin dependency tests
[zj: tests assertions adjusted to the different logic in which masking
     of a dependency through one name, does not forbid the dependency
     being added through another name.]
2017-02-07 21:32:10 -05:00
Dan Streetman 9cd7b1287b tests: add tests for SYMLINK containing whitespace in variable (#5158)
add udev-test.pl tests for whitespace in a substituted variable,
to verify the variable whitespace is replaced with underscores.

Tests for the change made by commit 0a10235ed4 ("udev-rules:
perform whitespace replacement for symlink subst values")
2017-01-25 20:24:52 -05:00
Evgeny Vereshchagin 9bcef20646 tests: check that we can write to /run/systemd/nspawn/notify
See https://github.com/systemd/systemd/issues/4944
2017-01-17 08:40:19 +00:00
Michal Sekletar 01349f5d01 tests: fix failure of test-execute if /dev/mem is not available (#5028)
/dev/mem isn't necessarily available. Recently, I've encountered arm64
systems that didn't provide raw memory access via /dev/mem. Instead,
let's use /dev/kmsg since we don't support systems w/o it anyway.
2017-01-06 10:27:35 +01:00
Martin Pitt 27e2e3231f tests: more precise negative check for dnsmasq log (#4982)
In test_resolved_domain_restricted_dns(), add dot domain separator to
negative .lab/.company tests, so that we don't catch these as part of
the host name (like "lxc-labjfr").

Caught in PR #4962
2016-12-26 12:19:25 +01:00
Martin Pitt 4050e04b2c resolved: correctly handle non-address RR types with /etc/hosts lookups (#4808)
Fix wrong condition test in manager_etc_hosts_lookup(), which caused it to
return an IPv4 answer when an IPv6 question was asked, and vice versa.
Also only return success if we actually found any A or AAAA record.

In systemd-resolved.service(8), point out that /etc/hosts mappings only
affect address-type lookups, not other types.

The test case currently disables DNSSEC in resolved, as there is a bug
where "-t MX" fails due to "DNSSEC validation failed" even after
"downgrading to non-DNSSEC mode". This should be dropped once that bug
gets fixed.

Fixes #4801
2016-12-22 07:58:02 +01:00
Evgeny Vereshchagin 069a254f9b test: check that we can boot with broken machine-id 2016-12-13 13:03:14 +00:00
Evgeny Vereshchagin da2d142114 sd-id128: id128_write overwrites target file 2016-12-13 13:03:14 +00:00
Evgeny Vereshchagin a6f72863ad machine-id-setup: `--print --commit` respects the --root option 2016-12-13 13:03:13 +00:00
Evgeny Vereshchagin fcb2427055 core: machine_id_setup overwrites broken machine-id 2016-12-13 12:58:42 +00:00
Martin Pitt 142a1afbb9 Merge pull request #4771 from keszybz/udev-property-ordering
Udev property ordering
2016-12-12 16:03:52 +01:00
David Michael 618b196e9d network: support negation in matching patterns (#4809) 2016-12-07 19:12:10 +01:00
Evgeny Vereshchagin c9fd987279 nspawn: don't hide --bind=/tmp/* mounts (#4824)
Fixes #4789
2016-12-05 18:14:05 +01:00
Zbigniew Jędrzejewski-Szmek 169f11d5da Merge pull request #4228 from dm0-/coreos-1554
networkd: support marking links unmanaged
2016-12-02 09:14:27 -05:00
Zbigniew Jędrzejewski-Szmek cda39975dc python: use raw strings for regexp patterns
Behaviour is not changed, because "unknown" escapes like \s or \d were not
substituted, but it's much nicer to use raw strings to avoid ambiguity.
2016-12-01 19:11:10 -05:00
Zbigniew Jędrzejewski-Szmek 00d5eaafd1 python: adjust imports, indentation, unused variables following pylint advice 2016-12-01 18:55:23 -05:00
David Michael a09dc5467a networkd: support marking links unmanaged 2016-12-01 14:41:51 -08:00
David Michael ec89276c2a networkd-test: define a utility class to simplify tests 2016-12-01 14:25:58 -08:00
Zbigniew Jędrzejewski-Szmek 49141e0cd1 hwdb: improve and test syntax error messages
Since syntax error are non-fatal, downgrade them to warnings.
Use log_syntax to have uniform formatting including the line number.
State machine states like DATA and MATCH are internal, user-facing
messages should use the names from hwdb(7): match, property, record.
Also change "key/value" to "key-value", since there's no alternative
here, both parts must be present.

[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:2] Property expected, ignoring record with no properties
[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:5] Property expected, ignoring record with no properties
[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:9] Property expected, ignoring record with no properties
[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:11] Key/value pair expected but got " NO_VALUE", ignoring
[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:18] Property or empty line expected, got "BAD:7:match at wrong place", ignoring record
[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:22] Property or empty line expected, got "BAD:8:match at wrong place", ignoring record
[/tmp/tmp.KFwEhm74n4/etc/udev/hwdb.d/10-bad.hwdb:23] Match expected but got indented property " Z=z", ignoring line

squash! hwdb: improve syntax error messages
2016-12-01 11:56:50 -05:00
Zbigniew Jędrzejewski-Szmek 8ce2069263 hwdb-test: properly print error output from systemd-hwdb update
Because -e was set, we'd exit immediately when systemd-hwdb failed and the
captured error output was never printed. We want to test two things:
that 0 is returned, and that nothing is printed to stderr (to catch
syntax errors in the hwdb).

v2: stop capturing stderr to a variable
v3: capture stderr to a variable and test both error types separately
2016-12-01 11:50:17 -05:00
Martin Pitt 2926b130b6 test: retry checking for transient hostname in hostnamectl (#4769)
Sometimes setting the transient hostname does not happen synchronously, so
retry up to five times. It is not yet clear whether this is legitimate
behaviour or an underlying bug, but this will at least show whether the wrong
transient hostname is just a race condition or permanently wrong.

Fixes #4753
2016-11-30 08:02:49 +01:00
Felipe Sateler b95f5528cc Use python3 explicitly in all python scripts 2016-11-28 15:00:20 -03:00
Martin Pitt fd0cec0366 test: make transient hostname tests fail verbosely (#4754)
This test fails sometimes but it is hard to reproduce, so we need more
information what happens. Set journal log level to "debug" for the entirety of
networkd-test.py, and show networkd's and hostnamed's journals and the DHCP
server log on failure of the two test_transient_hostname* tests. Also sync the
journal before querying it to get more precise output.

This should help with tracking down issue #4753.
2016-11-28 14:35:49 +03:00
Martin Pitt 30dc7898d5 tests: add hwdb parsing test
This calls the built "systemd-hwdb update" on the source tree's hwdb/ in a
temporary directory and verifies that there are no error messages.
2016-11-24 11:46:03 +01:00
Martin Pitt 2c99aba726 networkd: allow networkd to set the timezone in timedated
systemd-networkd runs as user "systemd-network" and thus is not privileged to
set the timezone acquired from DHCP:

  systemd-networkd[4167]: test_eth42: Could not set timezone: Interactive authentication required.

Similarly to commit e8c0de912, add a polkit rule to grant
org.freedesktop.timedate1.set-timezone to the "systemd-network" system user.
Move the polkit rules from src/hostname/ to src/network/ to avoid too many
small distributed policy snippets (there might be more in the future), as it's
easier to specify the privileges for a particular subject in this case.

Add NetworkdClientTest.test_dhcp_timezone() test case to verify this (for
all people except those in Pacific/Honolulu, there the test doesn't prove
anything -- sorry ☺ ).
2016-11-23 16:32:06 +01:00
Lennart Poettering c5066640a1 Merge pull request #4701 from martinpitt/networkd-polkit
hostnamed: allow networkd to set the transient hostname
2016-11-21 18:24:51 +01:00
Martin Pitt 89748b0af1 tests: check transient hostname with and without static hostname
We expect a static hostname to win over a transient one, so test both cases.
2016-11-21 12:57:16 +01:00
Evgeny Vereshchagin 270f419316 Merge pull request #4691 from keszybz/test-suite-fixes
Test suite fixes
2016-11-20 19:38:58 +03:00
Martin Pitt e8c0de9127 hostnamed: allow networkd to set the transient hostname
systemd-networkd runs as user "systemd-network" and thus is not privileged to
set the transient hostname:

  systemd-networkd[516]: ens3: Could not set hostname: Interactive authentication required.

Standard polkit *.policy files do not have a syntax for granting privileges to
a user, so ship a pklocalauthority (for polkit < 106) and a JavaScript rules
file (for polkit >= 106) that grants the "systemd-network" system user that
privilege.

Add DnsmasqClientTest.test_transient_hostname() test to networkd-test.py to
cover this. Make do_test() a bit more flexible by interpreting "coldplug==None"
as "test sets up the interface by itself". Change DnsmasqClientTest to set up
test_eth42 with a fixed MAC address so that we can configure dnsmasq to send a
special host name for that.

Fixes #4646
2016-11-20 12:19:21 +01:00
Martin Pitt 9e0c296a16 test: clean up "dummy0" interface after each test case in networkd-test.py 2016-11-20 12:19:21 +01:00
Zbigniew Jędrzejewski-Szmek cf5f9bb840 test-functions: also add qemu define for ppc64 2016-11-19 22:45:23 -05:00
Lennart Poettering f4ff4aa800 Merge pull request #4395 from s-urbaniak/rw-support
nspawn: R/W support for /sysfs, /proc, and /proc/sys/net
2016-11-18 12:36:46 +01:00
Evgeny Vereshchagin 8e391ada6b
tests/TEST-13-NSPAWN-SMOKE: add SYSTEMD_NSPAWN_API_VFS_WRITABLE
https://github.com/systemd/systemd/pull/4395
2016-11-18 09:51:03 +01:00
Djalal Harouni afc402b76a Merge pull request #4658 from endocode/djalal/sandbox-various-fixes-v1
core: improve the logic that implies no new privileges and documentation fixes
2016-11-15 20:45:27 +01:00
Evgeny Vereshchagin 22f1f8f24c tests: add UNIFIED_CGROUP_HIERARCHY=[default|hybrid] (#4675)
This will simplify testing a bit.
Mainly for https://github.com/systemd/systemd/pull/4670
2016-11-15 17:38:04 +01:00
Djalal Harouni 97e60383c0 test: add tests for RestrictNamespaces= 2016-11-15 15:50:19 +01:00
Evgeny Vereshchagin e1a2731868 tests: fix kernel/initrd searching (Arch)
We can run
sudo make run

instead of the
sudo make run KERNEL_BIN=/boot/vmlinuz-linux INITRD=/boot/initramfs-linux.img

See https://github.com/systemd/systemd/issues/4607
2016-11-11 13:47:44 +11:00
Martin Pitt 5209e9afd2 tests: use less aggressive systemctl --wait timeout in TEST-03-JOBS (#4606)
If the "systemctl start" happens at an "unlucky" time such as 1000.9 seconds
and then e. g.  runs for 2.6 s (sleep 2 plus the overhead of starting the unit
and waiting for it) the END_SEC would be 1003.5s which would round to 1004,
making the difference 4. On busier testbeds the overhead apparently can take a
bit more than 0.5s. The main point is really that it doesn't wait that much
longer, so "-le 4" seems perfectly fine. We allow up to 1.5s in the subsequent
"wait5fail" test below too.

Fixes #4582
2016-11-07 21:51:20 +03:00
Djalal Harouni 5c67067f0e test: test DynamicUser= with SupplementaryGroups= 2016-11-03 08:38:28 +01:00
Djalal Harouni 2b9ac11ed9 test: test DynamicUser= with a fixed user 2016-11-03 08:37:15 +01:00
Evgeny Vereshchagin bff653e397 tests: add test that journald keeps fds over termination by signal
This test fails before previous commit, and passes with it.
2016-11-01 21:20:26 -04:00
Djalal Harouni 50ca7a35a1 test: lets add more tests to cover SupplementaryGroups= cases. 2016-10-24 12:38:53 +02:00
Zbigniew Jędrzejewski-Szmek 60f17f75d1 Merge pull request #4372 from evverx/fix-synced-cgroup-hierarchy-perms 2016-10-23 23:25:57 -04:00
Evgeny Vereshchagin 844da987ef tests/TEST-13-NSPAWN-SMOKE: remove an expected failure check
https://github.com/systemd/systemd/issues/4352 has been fixed
So, we don't need this workaround anymore
2016-10-23 23:23:43 -04:00
Djalal Harouni bf9ace96fc test: add more tests for SupplementaryGroups= 2016-10-23 23:27:16 +02:00
Djalal Harouni 86b838eaa3 test: Add simple test for supplementary groups 2016-10-23 23:27:14 +02:00
Evgeny Vereshchagin c7934185fe tests: add smoke test for systemd-nspawn
Basically, this test runs:
```
    systemd-nspawn --register=no -D "$_root" -b
    systemd-nspawn --register=no -D "$_root" --private-network -b
    systemd-nspawn --register=no -D "$_root" -U -b
    systemd-nspawn --register=no -D "$_root" --private-network -U -b
```
and exports the `UNIFIED_CGROUP_HIERARCHY=[yes|no]`, `SYSTEMD_NSPAWN_USE_CGNS=[yes|no]`

Inspired by
* systemd#3589 (comment)
* systemd#4372 (comment)
* systemd#4223 (comment)
* systemd#1555

and so on :-)
2016-10-17 16:50:09 +00:00
Djalal Harouni 4982dbcc30 test: add test to make sure that ProtectKernelModules=yes disconnect mount propagation 2016-10-12 14:12:36 +02:00
Djalal Harouni 625d8769fa test: add test to make sure that CAP_SYS_RAWIO was removed on PrivateDevices=yes 2016-10-12 13:47:59 +02:00
Djalal Harouni 3ae33295f0 test: add capability tests for ProtectKernelModules=
This just adds capabilities test.
2016-10-12 13:36:27 +02:00
Martin Pitt 93a0884126 systemctl: Add --wait option to wait until started units terminate again
Fixes #3830
2016-10-01 17:58:59 +02:00
Martin Pitt b9fe94cad9 resolved: don't query domain-limited DNS servers for other domains (#3621)
DNS servers which have route-only domains should only be used for
the specified domains. Routing queries about other domains there is a privacy
violation, prone to fail (as that DNS server was not meant to be used for other
domains), and puts unnecessary load onto that server.

Introduce a new helper function dns_server_limited_domains() that checks if the
DNS server should only be used for some selected domains, i. e. has some
route-only domains without "~.". Use that when determining whether to query it
in the scope, and when writing resolv.conf.

Extend the test_route_only_dns() case to ensure that the DNS server limited to
~company does not appear in resolv.conf. Add test_route_only_dns_all_domains()
to ensure that a server that also has ~. does appear in resolv.conf as global
name server. These reproduce #3420.

Add a new test_resolved_domain_restricted_dns() test case that verifies that
domain-limited DNS servers are only being used for those domains. This
reproduces #3421.

Clarify what a "routing domain" is in the manpage.

Fixes #3420
Fixes #3421
2016-09-30 09:30:08 +02:00
Djalal Harouni cdfbd1fb26 test: make sure that {readonly|inaccessible|readwrite}paths disconnect mount propagation
Better safe.
2016-09-27 09:24:46 +02:00
Djalal Harouni f78b36f016 test: add tests for simple ReadOnlyPaths= case 2016-09-27 09:24:43 +02:00
Djalal Harouni 615a1f4b26 test: add CAP_MKNOD tests for PrivateDevices= 2016-09-25 13:04:30 +02:00
Jean-Sébastien Bour 047a0dacde networkd: support drop-in directories for .network files
Fixes #3655.

[zj: Fix the tests.]
2016-09-16 10:31:58 -04:00
Zbigniew Jędrzejewski-Szmek 38d78d1ee9 networkd-test: add a helper function to always clean up temporary config files 2016-09-16 10:30:34 -04:00
Evgeny Vereshchagin 23cabb68ac tests: mount proc before `exec valgrind` (#4044)
Fixes:
$ sudo make run QEMU_BIN=/usr/bin/qemu-system-x86_64  KERNEL_APPEND=systemd.unit=multi-user.target SKIP_INITRD=yes
TEST RUN: Basic systemd setup
+ /usr/bin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -kernel /boot/vmlinuz-4.6.7-200.fc23.x86_64 -drive format=raw,cache=unsafe,file=/var/tmp/systemd-test.izx99J/rootdisk.img -append 'root=/dev/sda1 raid=noautodetect loglevel=2 init=/usr/lib/systemd/systemd-under-valgrind rw console=ttyS0 selinux=0 systemd.unified_cgroup_hierarchy=no systemd.unit=multi-user.target '
valgrind: warning (non-fatal): readlink("/proc/self/exe") failed.
valgrind: continuing, however --trace-children=yes will not work.
--1:0: aspacem Valgrind: FATAL: can't open /proc/self/maps
--1:0: aspacem Exiting now.
[    3.152367] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    3.152367]
[    3.152367] CPU: 0 PID: 1 Comm: memcheck-amd64- Not tainted 4.6.7-200.fc23.x86_64 #1
[    3.152367] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014
[    3.152367]  0000000000000086 0000000047ca1666 ffff88001ea43e00 ffffffff813d954e
[    3.152367]  ffffffff81a205a0 ffff88001ea43e98 ffff88001ea43e88 ffffffff811b5557
[    3.152367]  ffffffff00000010 ffff88001ea43e98 ffff88001ea43e30 0000000047ca1666
[    3.152367] Call Trace:
[    3.152367]  [<ffffffff813d954e>] dump_stack+0x63/0x85
[    3.152367]  [<ffffffff811b5557>] panic+0xde/0x220
[    3.152367]  [<ffffffff810ab9c3>] do_exit+0xb43/0xb50
[    3.152367]  [<ffffffff810aba57>] do_group_exit+0x47/0xb0
[    3.152367]  [<ffffffff810abad4>] SyS_exit_group+0x14/0x20
[    3.152367]  [<ffffffff817dae72>] entry_SYSCALL_64_fastpath+0x1a/0xa4
[    3.152367] Kernel Offset: disabled
[    3.152367] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    3.152367]
QEMU: Terminated
2016-08-26 17:49:56 +02:00
Lennart Poettering d3fc8bf43f tests: let's stick to 8ch indenting, in perl code too 2016-08-19 16:01:17 +02:00
Jan Synacek 1259186355 test: fix test-execute personality tests on ppc64 and aarch64 (#3825) 2016-08-02 16:22:56 +02:00
Zbigniew Jędrzejewski-Szmek ce5fcc695e Merge pull request 3821 from davide125/fix-tests 2016-07-31 22:06:09 -04:00
Davide Cavalca e4d214efc2 tests: skip udev-test if running inside a chroot 2016-07-29 09:20:11 -07:00
Alexander Kurtz 00f69504a2 bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".
If the ESP is not mounted with "iocharset=ascii", but with "iocharset=utf8"
(which is for example the default in Debian), the file system becomes case
sensitive. This means that a file created as "FooBarBaz" cannot be accessed as
"foobarbaz" since those are then considered different files.

Moreover, a file created as "FooBar" can then also not be accessed as "foobar",
and it also prevents such a file from being created, as both would use the same
8.3 short name "FOOBAR".

Even though the UEFI specification [0] does give the canonical spelling for
the files mentioned above, not all implementations completely conform to that,
so it's possible that those files would already exist, but with a different
spelling, causing subtle bugs when scanning or modifying the ESP.

While the proper fix would of course be that everybody conformed to the
standard, we can work around this problem by just referencing the files by
their 8.3 short names, i.e. using upper case.

Fixes: #3740

[0] <http://www.uefi.org/specifications>, version 2.6, section 3.5.1.1
2016-07-21 03:02:15 +02:00
Felipe Sateler 11ea343126 tests: Install missing libraries for things installed in /usr too 2016-07-03 18:56:54 -04:00
Felipe Sateler d7a4278d29 tests: follow RUNPATH when installing missing libraries
Fixes #3630
2016-07-03 18:33:02 -04:00
Martin Pitt 30b42a9a36 test: check resolved generated resolv.conf in networkd-test (#3628)
* test: check resolved generated resolv.conf in networkd-test

Directly verify the contents of /run/systemd/resolve/resolv.conf instead of
/etc/resolv.conf. The latter might be a plain file or a symlink to something
else (like Debian's resolvconf output), and in these cases we cannot make
strong assumptions about the contents.

Drop the "/etc/resolv.conf is a symlink" conditions and the "resolv.conf can
have at most three nameservers" alternatives, as we know that resolved always
adds all nameservers.

Explicitly start resolved at the start of a test to ensure that it is running.

* test: get along with existing system search domains in resolv.conf

The previous change has uncovered a bug in the tests: Existing search domains
can exist in resolv.conf which test_search_domains{,_too_long} didn't take into account.

As existing domains take some of the "max 6 domains" and "max 255 chars" limit,
don't expect that the last items from our test data actually appears in the
output, just the first few.
2016-06-30 16:44:22 +03:00
Martin Pitt 94363cbbf3 resolved: add test for route-only domain filtering (#3609)
With commit 6f7da49d00 route-only domains do not get put into resolv.conf's
"search" list any more. Add a comment about the tri-state, to clarify its
semantics and why we are passing a bool parameter into an int type. Also add a
test case for it.
2016-06-28 18:18:27 +02:00
Martin Pitt 7cad32bbde test: merge check_nspawn() into run_nspawn()
This makes nspawn tests symmetric with run_qemu() which also exits with 1 if
QEMU is not available.
2016-06-24 16:23:39 +02:00
Martin Pitt b2ecd099dc tests: track and check for timeouts
If run_qemu() exits with non-zero, this either meant that QEMU was not
available (which should be a SKIP) or that QEMU timed out if $QEMU_TIMEOUT was
set (which then should be a FAIL).

Limit the exit code of run_qemu() to QEMU availability only, and track timeouts
separately through the new $TIMED_OUT variable, which is then checked in
check_result_qemu().

Do the same for $NSPAWN_TIMEOUT and run_nspawn() so that nspawn and QEMU work
similarly.
2016-06-24 16:07:16 +02:00
Martin Pitt 633736bbf4 tests: make TEST-12-ISSUE-3171 nspawn invocation consistent with other tests
The result of check_nspawn does not mean much, and this forgot to ask
check_nspawn() whether nspawn can be used at all. This brings
TEST-12-ISSUE-3171 in line with other nspawn tests.
2016-06-24 12:07:18 +02:00
Martin Pitt eaa03c05f7 tests: don't fail if QEMU is not available
Fix TEST-{08,09,10,11} to properly skip the test if QEMU is not available
instead of failing, like in the other tests.
2016-06-24 11:28:35 +02:00
Martin Pitt a415d43655 tests: force booting the kernel with SELinux
selinux=1 is not sufficient when running on a kernel which also has another LSM
(such as AppArmor) enabled and defaults to that.
2016-06-24 11:28:35 +02:00
Lennart Poettering f921f5739e networkd: rename IPv6AcceptRouterAdvertisements to IPv6AcceptRA
The long name is just too hard to type. We generally should avoid using
acronyms too liberally, if they aren't established enough, but it appears that
"RA" is known well enough. Internally we call the option "ipv6_accept_ra"
anyway, and the kernel also exposes it under this name. Hence, let's rename the
IPv6AcceptRouterAdvertisements= setting and the
[IPv6AcceptRouterAdvertisements] section to IPv6AcceptRA= and [IPv6AcceptRA].

The old setting IPv6AcceptRouterAdvertisements= is kept for compatibility with
older configuration. (However the section [IPv6AcceptRouterAdvertisements] is
not, as it was never available in a published version of systemd.
2016-06-07 11:24:30 +02:00
Evgeny Vereshchagin 856ca72b29 tests: introduce UNIFIED_CGROUP_HIERARCHY (#3419)
There are many cgroups-related changes (thanks, @htejun!)
This commit will simplify testing a bit.

Use:
make run UNIFIED_CGROUP_HIERARCHY=yes to enable cgroup-v2
make run UNIFIED_CGROUP_HIERARCHY=no to enable cgroup-v1
2016-06-03 11:17:00 +02:00
Martin Pitt d2bc125132 resolved: fix comments in resolve.conf for search domain overflows (#3422)
Write comments about "too many search domains" and "Total length of all search
domains is too long" just once. Also put it on a separate line, as
resolv.conf(5) only specifies comments in a line by themselves.

This is ugly to do if write_resolv_conf_search() gets called once for every
search domain. So change it to receive the complete OrderedSet instead and do
the iteration by itself.

Add test cases to networkd-test.py.

https://launchpad.net/bugs/1588229
2016-06-03 11:15:44 +02:00
Tejun Heo 538b48524c core: translate between IO and BlockIO settings to ease transition
Due to the substantial interface changes in cgroup unified hierarchy, new IO
settings are introduced.  Currently, IO settings apply only to unified
hierarchy and BlockIO to legacy.  While the transition is necessary, it's
painful for users to have to provide configs for both.  This patch implements
translation from one config set to another for configs which make sense.

* The translation takes place during application of the configs.  Users won't
  see IO or BlockIO settings appearing without being explicitly created.

* The translation takes place only if there is no config for the matching
  cgroup hierarchy type at all.

While this doesn't provide comprehensive compatibility, it should considerably
ease transition to the new IO settings which are a superset of BlockIO
settings.

v2:

- Update test-cgroup-mask.c so that it accounts for the fact that
  CGROUP_MASK_IO and CGROUP_MASK_BLKIO move together.  Also, test/parent.slice
  now sets IOWeight instead of BlockIOWeight.
2016-05-18 17:35:12 -07:00
Zbigniew Jędrzejewski-Szmek 62a992bed9 TEST-08: make sure / is remounted rw
In this test /etc/fstab is replaced by -.mount unit. This causes
systemd-remount-fs.service to not remount / rw, which in turn causes various
failures becuase /var is not writable. In particular
systemd-tmpfiles-setup.service reports many failures. This is something
to possibly fix on its own (see https://github.com/systemd/systemd/issues/791);
in the meanwhile let's fix this test so that it doesn't fail, since the
point of the test is to check aliases on mount units, and not a ro root.
2016-05-08 22:00:23 -04:00
Zbigniew Jędrzejewski-Szmek 61b480b68b tests: enable logging for pid1, disable for other systemd services
systemd-udev generated an insane amount of log output at debug level.
It would break TEST-02-CRYPTSETUP by filling the overflowing the disk
(which seems to be a bug in itself!).
2016-05-08 20:27:34 -04:00
Zbigniew Jędrzejewski-Szmek e14b866bc1 tests: allow root to login with empty password to test images 2016-05-08 20:27:33 -04:00
Zbigniew Jędrzejewski-Szmek ed1190498f tree-wide: remove uses of --failed
It has been replaced by --state=failed.
2016-05-08 20:27:33 -04:00
Zbigniew Jędrzejewski-Szmek 5b23cef0bb tests: specify format=raw for qemu to avoid warning
WARNING: Image format was not specified for
         '/var/tmp/systemd-test.tGi3od/rootdisk.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write
         operations on block 0 will be restricted.  Specify the 'raw' format
         explicitly to remove the restrictions.

Also use unsafe caching mode, we don't care about data integrity here.
2016-05-08 20:27:33 -04:00
Evgeny Vereshchagin 03ae6f7dee tests: add test for #3171 (#3206) 2016-05-06 23:05:59 +02:00
Evgeny Vereshchagin 0b2abe0f03 tests: add test for #3166 (#3180) 2016-05-03 11:43:22 +02:00
Evgeny Vereshchagin 33e40442c6 tests: add test for https://github.com/systemd/systemd/issues/2467 (#3168) 2016-05-02 10:57:19 +02:00
Evgeny Vereshchagin cd4c260323 tests: use symlink to Makefile 2016-05-01 16:40:21 +00:00
Zbigniew Jędrzejewski-Szmek 94a0ef6e57 path-util: also support ".old" and ".new" suffixes and recommend them
~ suffix works fine, but looks to much like it the file is supposed to be
automatically cleaned up. For new versions of configuration files installers
might want to using something that looks more permanent like foobar.new.
So let's add treat ".old" and ".new" as special.

Update test to match.
2016-04-29 10:21:07 -04:00
Zbigniew Jędrzejewski-Szmek 1f7be300e9 test: chmod +x sysv-generator-test
Just for convenience.
2016-04-28 08:25:17 -04:00
Martin Pitt daad34dfa3 tests: document requirements of networkd integration tests (#3125)
Document the necessary dependencies and nspawn/lxd options to run
test/networkd-test.py.
2016-04-26 12:16:43 +02:00
Evgeny Vereshchagin 4f4d6ee4be tests: add test for coredump handler hanging at shutdown (#3101)
Test for #2691.
2016-04-24 20:24:41 -04:00
Evgeny Vereshchagin 43bbb8f005 tests: don't rely on the host's systemd-nspawn, don't register test machine (#3023)
Fixes:
$ cd test/TEST-07-ISSUE-1981/
$ sudo make clean setup run
...
timeout: failed to run command ‘systemd-nspawn’: No such file or directory
...
TEST RUN: https://github.com/systemd/systemd/issues/1981 [FAILED]
Makefile:10: recipe for target 'run' failed
make: *** [run] Error 1
2016-04-13 09:57:06 -04:00
Martin Pitt bf8f7583ee test: udev: Check tags
Add two more tests:

 - Add a single tag, match on it, don't match on another.
 - Add 10.000 tags to a device, ensure that udev survives this.
   (Reproduces crash fixed by commit 1d88a271a)
2016-04-06 23:30:10 +02:00
Martin Pitt efc9f70325 test: udev: check exit code of test-udev
We expect test-udev to succeed. Verify that its exit code is zero, particularly
to spot crashes (e. g. a segfault would be error code 139).
2016-04-06 23:30:10 +02:00
Evgeny Vereshchagin 21d9e3f339 tests: don't rely on the underlying fs in test-udev (v2)
* This reverts commit 646048b40a.
Let's test really big numbers again

* Don't be so brutal: use rmdir instead of rm -rf
As suggested https://github.com/systemd/systemd/pull/2966#issuecomment-205751680
2016-04-06 04:08:39 +00:00
Evgeny Vereshchagin 2ce8d27b1f tests: don't rely on underlying fs in udev-test, use tmpfs instead
Fixes: #457
2016-04-05 10:38:09 +00:00
Evgeny Vereshchagin 331fb4ca51 basic: fallback to fstatat if entry->d_type is DT_UNKNOWN
* tests-functions: improve FSTYPE-support

make clean setup FSTYPE=reiserfs is working fine now :)

* basic: fallback to fstatat if entry->d_type is DT_UNKNOWN

Fixes localectl on reiserfs:

-bash-4.3# mkdir -p /usr/lib/locale
-bash-4.3# stat -f /usr/lib/locale/
  File: "/usr/lib/locale/"
    ID: bdb0322715b5366e Namelen: 255     Type: reiserfs
Block size: 4096
Blocks: Total: 99835      Free: 60262      Available: 60262
Inodes: Total: 0          Free: 0
-bash-4.3# mkdir /usr/lib/locale/HeyHo
-bash-4.3# localectl list-locales --no-pager

-bash-4.3# mount -t tmpfs tmpfs /usr/lib/locale
-bash-4.3# mkdir /usr/lib/locale/HeyHo
-bash-4.3# localectl list-locales --no-pager
HeyHo
2016-04-04 13:07:56 +02:00
Daniel Mack 68de79d6a4 Merge pull request #2760 from ronnychevalier/rc/core_no_new_privileges_seccompv3
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
2016-03-21 12:57:43 +01:00
Zbigniew Jędrzejewski-Szmek fdbf7b554e Merge pull request #2797 from evverx/selinux-use-raw
selinux: use *_raw API from libselinux
2016-03-16 01:13:29 -04:00
Evgeny Vereshchagin 45dbd7b6cb tests: add create_strace_wrapper
Very handy for early-boot debugging
See https://github.com/systemd/systemd/pull/2781#discussion_r54782628
2016-03-04 01:55:46 +00:00
Evgeny Vereshchagin 91f9f8f1ba tests: add test for https://github.com/systemd/systemd/issues/2730 2016-03-01 03:12:24 +00:00
Ronny Chevalier 50f130c286 test-execute: add nfsnobody alternative as a nobody user 2016-02-28 15:00:18 +01:00
Ronny Chevalier 19c0b0b9a5 core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
The manpage of seccomp specify that using seccomp with
SECCOMP_SET_MODE_FILTER will return EACCES if the caller do not have
CAP_SYS_ADMIN set, or if the no_new_privileges bit is not set. Hence,
without NoNewPrivilege set, it is impossible to use a SystemCall*
directive with a User directive set in system mode.

Now, NoNewPrivileges is set if we are in user mode, or if we are in
system mode and we don't have CAP_SYS_ADMIN, and SystemCall*
directives are used.
2016-02-28 14:44:26 +01:00
Zbigniew Jędrzejewski-Szmek 587751eb66 udev-test.pl: add --strace option
It's useful when trying to see what the tests are doing.
I hardcoded '-efile' as the option to strace, but in the future
it might be useful to make this configurable.
2016-02-22 13:21:32 -05:00
Evgeny Vereshchagin 252549990f tests: add test for https://github.com/systemd/systemd/issues/2637
+ perl -e 'exit(!(qq{0} eq qq{\x25U}))'
exec-spec-interpolation.service: Main process exited, code=exited, status=1/FAILURE
exec-spec-interpolation.service: Unit entered failed state.
exec-spec-interpolation.service: Failed with result 'exit-code'.
        PID: 11270
        Start Timestamp: Wed 2016-02-17 22:21:31 UTC
        Exit Timestamp: Wed 2016-02-17 22:21:31 UTC
        Exit Code: exited
        Exit Status: 1
Assertion 'service->main_exec_status.status == status_expected' failed at src/test/test-execute.c:65, function check(). Aborting.
2016-02-17 22:40:26 +00:00
Evgeny Vereshchagin 09f6f45a29 tests: add test for https://github.com/systemd/systemd/issues/1981 2016-02-10 18:19:08 +00:00
Lennart Poettering 9e7454e0e2 Merge pull request #2535 from PhillipSz/remove-exit-0
test: remove exit 0 at the end
2016-02-08 17:27:18 +01:00
Evgeny Vereshchagin 646048b40a tests: fix #457
There are some limits on XFS:
major_max=511
minor_max=262143
see https://github.com/torvalds/linux/blob/master/fs/xfs/xfs_iops.c

if (S_ISCHR(mode) || S_ISBLK(mode)) {
    if (unlikely(!sysv_valid_dev(rdev) || MAJOR(rdev) & ~0x1ff))
        return -EINVAL;
2016-02-08 11:23:18 +00:00
Phillip Sz e3ceb75be3 test: remove exit 0 at the end
We don't need that at the end, as it will always exit with 0 if
everything is okey.
2016-02-05 11:38:58 +01:00
Evgeny Vereshchagin 5c7290b195 tests: add test-selinux-checks 2016-01-31 09:02:51 +00:00
Evgeny Vereshchagin d5172c7913 tests: fix install_pam
* pam_unix depends on unix_chkpwd
* selinux=1 -> pam_unix runs unix_chkpwd for root too

https://git.fedorahosted.org/cgit/linux-pam.git/tree/modules/pam_unix/passverify.c?id=e89d4c97385ff8180e6e81e84c5aa745daf28a79#n202
2016-01-25 05:30:19 +00:00
Evgeny Vereshchagin e3ce42e705 tests: add setup_selinux 2016-01-25 05:30:06 +00:00
Lukas Nykryn c584ffc0b7 sysv-generator: do not join dependencies on one line, split them
If there is a lot of initscripts and dependencies between them we might
end generating After= (and similar) lines which are longer then LINE_MAX
and thus rejected by parser in systemd.

Fixes #2099
2016-01-21 12:53:14 +01:00
Evgeny Vereshchagin 5a613464fa tests: add STRIP_BINARIES
We need a beautiful stacktraces sometimes
For example https://github.com/systemd/systemd/pull/2328
2016-01-18 07:27:49 +00:00
Evgeny Vereshchagin b46f4ef107 tests: fix TEST-03-JOBS
We have

JOB UNIT                     TYPE  STATE
  1 testsuite.target         start waiting
 81 end.service              start waiting
187 sleep.service            start waiting
136 hello.service            start waiting
 82 testsuite.service        start running
135 hello-after-sleep.target start waiting

sometimes
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin 98ca53dac2 tests: remove unnecessary setup_nspawn_root
we don't run nspawn in TEST-02-CRYPTSETUP
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin ac289ce3f5 tests: fix TEST-02-CRYPTSETUP on Debian/Ubuntu 2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin 9974ff63b1 tests: install fsck*
systemd-fsck depends on /sbin/fsck*
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin 24be78d72b tests: remove unnecessary --boot
* Use $ROOTLIBDIR/systemd always
* Don't pass $ROOTLIBDIR/systemd as the first argument:

$ cat /proc/1/cmdline
/lib/systemd/systemd/lib/systemd/systemd...
2016-01-18 03:56:51 +00:00
Evgeny Vereshchagin cb2f9d3f29 tests: add function for valgrind wrapper creation
I used it for d9814c7 and bffd87b
2016-01-15 02:53:47 +00:00
Evgeny Vereshchagin a2fbff31c9 tests: add function for valgrind installation
I used it for d9814c76ec
Very handy:)
2016-01-14 08:11:17 +00:00
Evgeny Vereshchagin 75f63f0640 README, tests: remove /etc/mtab
This is a followup for 1d40ddb
2016-01-14 00:11:07 +00:00
Ismo Puustinen 70d7aea5c7 tests: test ambient capabilities.
The ambient capability tests are only run if the kernel has support for
ambient capabilities.
2016-01-12 12:14:50 +02:00
Evgeny Vereshchagin 3889613ec6 tests: add regression test for `systemctl restart systemd-journald`
See https://github.com/systemd/systemd/issues/2236
2015-12-30 05:00:14 +00:00
Lennart Poettering e4b0e86225 Merge pull request #2056 from evverx/expose-soft-limits-on-the-bus
Expose soft limits on the bus
2015-12-10 11:20:03 +01:00
Tom Gundersen 5fa3be82e5 Merge pull request #1934 from martinpitt/master
tests: add networkd integration test
2015-12-03 18:22:06 +01:00
Evgeny Vereshchagin 68a8f17775 tests: add basic rlimits test 2015-11-28 16:47:56 +00:00
Evgeny Vereshchagin e8e5a6e255 tests: use sync instead of flush
flush doesn't sync a journal -> tests sometimes fail
2015-11-27 13:55:23 +00:00
Evgeny Vereshchagin c7bb28732f tests: don't run test on incomplete setup
This is a follow-up commit for
https://github.com/systemd/systemd/pull/1937

See https://github.com/systemd/systemd/pull/2030
2015-11-27 13:29:51 +00:00
Lennart Poettering d353a16d1f Merge pull request #1937 from evverx/fix-stdout-parsing
Fix stdout stream parsing
2015-11-27 14:03:49 +01:00
Martin Pitt 4ddb85b18b tests: add networkd integration test
This uses temporary configuration in /run and temporary veth devices, and does
not write anything on disk or change any system configuration; but it assumes
(and checks at the beginning) that networkd is not currently running.

This can be run on a normal installation, in QEMU, nspawn, or LXC.

As this requires root privileges, this is not integrated into "make check".
2015-11-27 11:53:07 +01:00
Evgeny Vereshchagin cd949ee734 tests: don't run tests on incomplete setup 2015-11-25 17:51:17 +00:00
Evgeny Vereshchagin 55161d41eb tests: remove unnecessary /sys/fs/cgroup/systemd checking
A unified hierarchy obsoletes this checking
2015-11-25 11:43:58 +00:00
Evgeny Vereshchagin 2c393ed761 tests: don't rely on system's machined
Fixes backward/forward incompatibility errors on spawning.

For example:
$ sudo make run
...
Failed to register machine: Cannot set property TasksMax, or unknown
property.

$ ../../systemd-nspawn --version
systemd 228

$ systemd-nspawn --version
systemd 225
2015-11-24 14:33:16 +00:00
Lennart Poettering 8c191eecd4 Merge pull request #1957 from zonque/qemu-test
test: make QEMU tests work on Semaphore
2015-11-24 15:02:20 +01:00
Evgeny Vereshchagin 61fea35e14 tests: fix initrd searching on Debian/Ubuntu 2015-11-20 12:10:12 +00:00
Daniel Mack 6f9d3b08cf test: 01-basic: mask some services that currently don't run in qemu 2015-11-19 17:15:26 +01:00
Daniel Mack 3f5c306d38 test: disable nspawn checks if machine wasn't booted with systemd
Sempaphore containers are not booted with systemd, so machined is not
available, which makes nspawn bail. Just skip nspawn tests in such
environments.

[ -d /run/systemd/system ] is esentially what sd_booted(3) is doing,
but on Ubuntu 15.05, without 'systemd-container' installed, we also
need to check for the presence of the systemd-machined binary.
2015-11-19 17:14:44 +01:00
Evgeny Vereshchagin 278d511547 tests: fix ls: cannot access /var/tmp/systemd-test.*/journal/*/*.journal
don't lose logs from the test machine too
2015-11-19 14:52:41 +00:00
Daniel Mack dbf43a42b8 test: make qemu use kvm if available
If we're running in a KVM virtualized environment (such as Semaphore's
Docker enabled platform), pass '-cpu host' to QEMU.
2015-11-19 14:25:32 +01:00
Daniel Mack 1b1eae69ce test: increase loop device size to 400MB
It turns out the full OS tree which is assembled into the loop-dev
mount point is bigger than 300MB. Increase the size.
2015-11-19 14:25:32 +01:00
Evgeny Vereshchagin 45d39b4f81 tests: journal-stdout-stream: add cases for leading and trailing spaces 2015-11-17 23:47:23 +00:00
Evgeny Vereshchagin 1c36b4a73b tests: add basic journal test 2015-11-17 23:46:31 +00:00
Evgeny Vereshchagin 417491f122 tests: copy /etc/pam.d/systemd-user from the host on Debian, Ubuntu
Fixes:
systemd-testsuite systemd[34]: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth
systemd-testsuite systemd[34]: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth
systemd-testsuite systemd[34]: user@0.service: Failed at step PAM spawning /lib/systemd/systemd: Operation not permitted
...
on Debian, Ubuntu
2015-11-17 00:09:28 +00:00
Evgeny Vereshchagin bf3a947cb4 tests: intsall /etc/login.defs
Fixes:
systemd-testsuite login[31]: cannot open login definitions /etc/login.defs [No such file or directory]
systemd-testsuite systemd[1]: Received SIGCHLD from PID 31 (login).
systemd-testsuite systemd[1]: Child 31 (login) died (code=exited, status=1/FAILURE)
systemd-testsuite systemd[1]: console-getty.service: Child 31 belongs to console-getty.service
systemd-testsuite systemd[1]: console-getty.service: Main process exited, code=exited, status=1/FAILURE
systemd-testsuite systemd[1]: console-getty.service: Changed running -> dead

on Debian/Ubuntu

Useful on other distros
2015-11-16 03:15:10 +00:00
Evgeny Vereshchagin 0fe15dc8dd tests: fix pam_modules installation on Debian (and Debian-like systems)
libpam_modules installs modules into /lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security
on Debian

Fixes:
systemd-testsuite login[36]: PAM unable to dlopen(pam_group.so): /lib/security/pam_group.so: cannot open shared object file: No such file or directory
systemd-testsuite login[36]: PAM adding faulty module: pam_group.so
systemd-testsuite login[36]: PAM unable to dlopen(pam_limits.so): /lib/security/pam_limits.so: cannot open shared object file: No such file or directory
systemd-testsuite login[36]: PAM adding faulty module: pam_limits.so
...
etc
2015-11-15 21:21:18 +00:00
Evgeny Vereshchagin c7eda0133b tests: install execs from user units too
Fixes:
systemd[39]: systemd-exit.service: Executing: /bin/kill -s 58 29
systemd[39]: systemd-exit.service: Failed at step EXEC spawning /bin/kill: No such file or directory
systemd[29]: Received SIGCHLD from PID 39 ((kill)).
systemd[29]: Child 39 ((kill)) died (code=exited, status=203/EXEC)
2015-11-15 18:30:37 +00:00
Evgeny Vereshchagin b04b3e5803 tests: fix unstoppable service
[/etc/systemd/system/unstoppable.service:4] Unbalanced quoting,
ignoring: "/bin/echo 'I'm unstoppable!'"
2015-11-12 03:24:10 +00:00
Filipe Brandenburger 4c80d201ac test-execute: Add tests for new PassEnvironment= directive
Check the base case, plus erasing the list, listing the same variable
name more than once and when variables are absent from the manager
execution environment.

Confirmed that `sudo ./test-execute` passes and that modifying the test
cases (or the values of the set variables in test-execute.c) is enough
to make the test cases fail.
2015-11-11 07:55:23 -08:00
Lennart Poettering b95292a152 Merge pull request #1834 from filbranden/testexecute2
test-execute: Fix systemd escaping and shell issues (v2)
2015-11-10 19:49:51 +01:00
Evgeny Vereshchagin 5c404f1ab8 tests: various fixes
* remove journal flushing (systemd-journal-flush.service runs journalctl --flush on boot)
* use sh -c and PATH instead of @SYSTEMCTL@ expansion
* remove unnecessary semicolons etc
2015-11-10 18:01:15 +00:00
Filipe Brandenburger cdaf507048 test-execute: Fix systemd escaping and shell issues
In most cases, systemd requires escaping $ (for systemd variable
substitution) and % (for specifiers) by doubling them. This was somewhat
of an issue in tests like exec-environment*.service where systemd was
doing the substitutions and we were not really checking that those were
available in the actual environment of the command. Fix that.

Expressions such as `exit $(test ...)` are incorrect. They only work
because $(test ...) will produce no output, so the command will become a
bare "exit" which will exit with the status of the latest executed
command which turns out to be the test... The direct approach is simply
calling "test" as the last command, for which the shell will propagate
the exit status.

One situation where this was breaking tests was on `exit $(test ...) &&
$(test ...) && $(test ...)` where the second and third tests were not
really executing, since the first command is actually `exit` so && was
doing nothing there. Fixed it by just using `test ... && test ... &&
test ...` as it was initially intended.

Pass -x to all shell executions for them to produce useful debugging
output to stderr. Consequently, removed most of the explicit `echo`s
that are no longer needed.

Mark all units as Type=oneshot explicitly.

Also made sure all shell variables are properly quoted.

v2: Added an explicit LC_ALL=C to ionice invocations since some locales
(such as French) will add a space before the colon in the output.

Tested by running `sudo ./test-execute` and confirming all tests enabled
on my system (essentially all of them except for the s390 one) passed.
Tweaked the variables or options or expected values and confirmed the
tests do indeed fail when the values are not exactly the expected ones.

v2: Also tested with `LANG=fr_FR.UTF-8 sudo ./test-execute` to confirm
it still works in a different locale.
2015-11-10 07:58:29 -08:00
Jesus Ornelas Aguayo 59ef392e00 test: Fix typo in TEST-03-JOBS/test-jobs.sh
Fix typo s/enqueueing/enqueuing/

Signed-off-by: Jesus Ornelas Aguayo <jesus.ornelas.aguayo@intel.com>
2015-11-06 13:01:21 -06:00
Evgeny Vereshchagin 64810140a1 test-execute: don't use /usr/bin/uname. use sh and PATH 2015-11-06 15:45:32 +00:00
Evgeny Vereshchagin e63b61be53 test-functions: fix dbus-1 installation
The basic setup for the well-known system and session buses is
now done in read-only files in ${datadir} (normally /usr/share).
See the NEWS entry for 1.9.18 for details.

http://cgit.freedesktop.org/dbus/dbus/tree/NEWS
2015-11-04 18:33:37 +00:00
Ronny Chevalier aa8e00da54 test-path: move all related test files to a specific directory
To avoid polluting test/
2015-10-31 15:07:19 +01:00
Ronny Chevalier ac40081621 test-execute: move all files related to a specific directory
To avoid polluting test/
2015-10-31 15:07:19 +01:00
Ronny Chevalier a622675862 test-execute: add tests for IOSchedulingClass 2015-10-31 15:07:19 +01:00
Ronny Chevalier c388dfea5a test-execute: add tests for OOMScoreAdjust 2015-10-31 15:07:19 +01:00
Ronny Chevalier 03bd70dd01 test-execute: add test for EnvironmentFile 2015-10-31 15:07:19 +01:00
Ronny Chevalier 63447f1153 test-execute: add test for PrivateNetwork 2015-10-31 15:07:19 +01:00
Ronny Chevalier ff4ca461ed test: add tests to ensure that the capabilities are properly set 2015-10-29 17:14:18 +01:00
Hendrik Brueckner 7517f51ef9 s390: add personality support
Introduce personality support for Linux on z Systems to run
particular services with a 64-bit or 31-bit personality.
2015-09-24 13:03:18 +02:00
Ronny Chevalier 5bc7452b32 core: fix group ownership when Group is set
When Group is set in the unit, the runtime directories are owned by
this group and not the default group of the user (same for cgroup paths
and standard outputs)

Fix #1231
2015-09-21 18:14:44 +02:00
Ronny Chevalier cc3ddc851f test-execute: add tests for RuntimeDirectory 2015-09-21 18:14:44 +02:00
Filipe Brandenburger 4d55fc5b21 test: udev - Signal that test was skipped when running as non-root
It is more accurate to report that the test was skipped rather than
succeeded if we did not get to run it because it requires root.

Tested by running `make check` and inspecting the log file:

  $ cat test/udev-test.pl.log
  Must have root permissions to run properly.
  SKIP test/udev-test.pl (exit status: 77)

The `make check` output also reported:

  SKIP: test/udev-test.pl
2015-08-30 22:10:30 -07:00
Martin Pitt 52a321d839 sysv-generator test: Fix random ordering failure
test_simple_escaped() sometimes fails with

AssertionError: Lists differ: ['foo\\x2b.service', 'foo-admin.service'] != ['foo-admin.service', 'foo\\x2b.service']

We don't need to assume any order here, so compare them as a set, not a list.
2015-07-01 07:34:23 +02:00
Kay Sievers f2b8052fb6 udev: remove WAIT_FOR key
This facility was never a proper solution, but only papered over
real bugs in the kernel. There are no known sysfs "timing bugs"
since a long time.
2015-06-30 19:57:40 +02:00
Felipe Sateler 264581a2f1 sysv-generator: escape names when translating from sysv name
While the LSB suggests only [A-Za-z0-9], that doesn't prevent admins
from doing the wrong thing. Lets not generate invalid names in
that case.
2015-06-29 16:07:49 -03:00
Martin Pitt 6b7d32add4 sysv-generator test: always log to console
Set $SYSTEMD_LOG_TARGET so that the output always goes to stdout/stderr. This
fixes running the test as root, as that logged to the journal previously.

https://github.com/systemd/systemd/issues/195
2015-06-15 08:59:44 +02:00
Kay Sievers 2375607039 remove gudev and gtk-doc
The library moved to:
  https://git.gnome.org/browse/libgudev/
2015-06-03 00:22:53 +02:00
Zbigniew Jędrzejewski-Szmek 903e7c37ca Use "new" --job-mode= option in more places
--irreversible/--ignore-dependencies/--fail are deprececated since 4dc5b821ae.

Also add shell completions for --jobs-mode.
2015-05-18 01:08:09 -04:00
Alberto Fanjul Alonso 230f048566 sysv-generator test: Fix assertion 2015-04-28 15:44:23 +02:00
Tom Gundersen b3f2490072 test: udev, valgrind - track origins of uninitiaziled memory 2015-04-03 17:27:45 +02:00
Tom Gundersen 333e07b793 test: udev - add gdb support 2015-03-27 16:23:46 +01:00
Kay Sievers 7361099e42 boot: efi - remove custom splash support 2015-02-26 19:51:08 +01:00
Kay Sievers 37fa369066 boot: efi - support embedded splash image 2015-02-26 18:58:30 +01:00
Kay Sievers a19b0678be boot: efi - remove default boot splash handling 2015-02-26 01:03:29 +01:00
Martin Pitt 4e5589836c sysv-generator: fix wrong "Overwriting existing symlink" warnings
Fix result testing of is_symlink() to ignore negative results, which happen if
the file name does not exist at all. In this case we do not want a warning and
unlink the non-existing link.

https://bugs.debian.org/778700
2015-02-19 11:06:24 +01:00
Martin Pitt 0377e373d1 systemd-sysv-generator test: Adjust to dropped runlevelN.target mapping
Commit d5d8429a dropped the explicit runlevelN.target mapping. Adjust the tests
accordingly to explicitly state the expected targets instead of runlevels.
2015-02-19 09:09:57 +01:00
Didier Roche 89ea179b60 Add mock fsck process 2015-02-18 16:33:46 +01:00
Tom Gundersen e7dd673d1e gummiboot/sd-boot/systemd-boot: rename galore
What used to be gummiboot, was renamed sd-boot when it was merged into
systemd. Let's try to be a bit more consistent with the rest of systemd
and rename it again as follows:

The EFI bootloader is now called 'systemd-bootx64.efi', and its sources are in
'src/boot/efi/'. The drop-in directory where bootctl will find EFI loaders
is now /usr/lib/systemd/boot/efi/.
2015-02-18 15:23:23 +01:00
Kay Sievers 0fa2cac4f0 sd-boot: add EFI boot manager and stub loader 2015-02-17 14:36:59 +01:00
Martin Pitt f4f01ec146 sysv-generator: Skip init scripts for existing native services
This avoids taking the SysV init script enablement state into account if we
have native units. Otherwise systemctl disable on native unit would not
be respected in the presence of an enabled SysV script.

Also, there's no need to do all the parsing and creation of service files if we
already have a native systemd unit for the processed SysV init script.
2015-02-11 13:02:01 +01:00
Harald Hoyer b6f0c419e3 test-functions: search for the initrd and kernel according to the BLS
Also search for the initrd and kernel according to the boot loader
specification.
2015-02-03 10:51:29 +01:00
Harald Hoyer edbced8a15 test-functions: use sfdisk without cyl,head,sectors
newer sfdisk implementations do not work with these anymore
2015-02-03 10:47:06 +01:00
Harald Hoyer 99877b7e37 test-functions:install_libnss() call dracut_install with all $NSS_LIBS
dracut_install() can cope with more than one file
2015-02-03 10:46:57 +01:00
Martin Pitt 7d023341c7 tests: install ldconfig.real for Debian based distros
In Debian based distributions ldconfig is just a shell wrapper around
ldconfig.real, for deferring it during package installation.
2015-02-03 09:50:45 +01:00
Martin Pitt c50a4525aa tests: install hostname debug tool
This is mostly a vehicle to pull in libnsl.so which gets dlopen()ed by NSS
under certain NSS configurations.
2015-02-03 09:50:45 +01:00
Martin Pitt cffae62bcb tests: install all required libnss modules
Don't assume "files" for everything in nsswitch. Instead, ask "getent passwd"
about which libnss modules it dlopen()s, and install these.
2015-02-03 09:50:45 +01:00
Martin Pitt 53d90f9582 tests: don't hardcode systemctl path
Get it from type -P instead, to support --enable-split-usr.
2015-02-03 09:50:45 +01:00
Martin Pitt 3486cb6cfa tests: determine rootlibdir from pkg-config
Prefer asking pkg-config for the rootlibdir, to also support systems with
--enable-split-usr. Fall back to the hardcoded /usr/lib/systemd if that fails.
2015-02-03 09:50:45 +01:00
Martin Pitt 4be4833ece tests: Make sushell optional in image creation
sushell does not exist in all distributions, and it can be changed with
configure --with-debug-shell, so make installation of it optional.
2015-02-03 09:50:45 +01:00
Marko Myllynen 25b47f96d9 Use eurlatgr as the example console font
See https://fedoraproject.org/wiki/Changes/NewDefaultConsoleFont

https://bugzilla.redhat.com/show_bug.cgi?id=1182529
2015-01-22 01:14:53 -05:00
Martin Pitt 77354c7e6f sysv-generator: Replace Provides: symlinks with real units
Since commit b7e7184 the SysV generator creates symlinks for all "Provides:" in
the LSB header. However, this is too greedy; there are cases where the
creation of a unit .service file fails because of an already existing
symlink with the same name:

 - Backup files such as /etc/init.d/foo.bak still have "Provides: foo", and
   thus get a foo.service -> foo.bak.service link. foo.bak would not be enabled
   in rcN.d/, but we (deliberately) create units for all executables in init.d/
   so that a manual "systemctl start" works. If foo.bak is processed before,
   the symlink already exists.

 - init.d/bar has "Provides: foo", while there also is a real init.d/foo. The
   former would create a link foo.service -> bar.service, while the latter
   would fail to create the real foo.service.

If we encounter an existing symlink, just remove it before writing a real unit.

Note that two init.d scripts "foo" and "bar" which both provide the same name
"common" already work. The first processed init script wins and creates the
"common.service" symlink, and the second just fails to create the symlink
again. Thus create an additional test case for this to ensure that it keeps
working sensibly.

https://bugs.debian.org/775404
2015-01-21 17:01:00 +01:00
Martin Pitt d816e2b790 systemd-sysv-generator test: test scripts with hidden suffixes
We don't expect any unit generated from temporary package manager, swap, and
similar files.
2015-01-21 15:30:01 +01:00
Martin Pitt 29e0e6d8c1 sysv-generator: Handle .sh suffixes when translating Provides:
When deciding whether the provided name equals the file name in
sysv_translate_facility(), also consider them equal if the file name has a
".sh" suffix.

This was uncovered by commit b7e7184 which then created a symlink
"<name>.service" to itself for ".sh" suffixed init.d scripts.

For additional robustness, refuse to create symlinks to itself in add_alias().

Add test case which reproduces the bug.

https://bugs.debian.org/775889
2015-01-21 14:53:38 +01:00
Martin Pitt eb89bc1d25 systemd-sysv-generator test: fix enabled check
Fix hardcoded "foo.service", test for the actual unit parameter.
2015-01-21 10:22:10 +01:00
Martin Pitt 56401ac57a systemd-sysv-generator test: don't parse symlinks
Generated services which are symlinks should be tested/handled differently from
files, so ignore them in run_generator()'s result parsing.
2015-01-21 09:45:15 +01:00
Martin Pitt e28aa588f0 test: add integration test for systemd-sysv-generator
This covers the general functionality as well as regression tests for recent
fixes like commits b7e718 and 1ed0c19.
2015-01-21 08:07:07 +01:00
Martin Pitt 72521ab9fd test: eliminate shell wrapper for Python test
Use the parallel test runner's TEST_EXTENSIONS/*_LOG_COMPILER feature
(https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html)
to run *.py tests through $(PYTHON), and only if we have python
available/enabled.

This eliminates the need of having shell wrappers, thus drop
test/rules-test.sh.
2015-01-20 21:26:35 +01:00
Martin Pitt e8015e6e28 test: simplify rules-test.sh wrapper
Drop globbing of rules/*.rules in the rules-test.sh wrapper and move that logic
into the actual test rule-syntax-check.py. This can still be called with
individual rules files, but when being called without arguments it will now
process all top_builddir/rules/*.rules.

Preparation for dropping the shell wrappers altogether.
2015-01-20 20:52:25 +01:00
Martin Pitt 6c8f2e7d78 test: Use configured Python
Don't hardcode "python" or /usr/bin/python, but use the configured $(PYTHON).
2015-01-20 12:49:08 +01:00
Martin Pitt c6be83c16d test/rule-syntax-check.py: Fix for Python 3
Make this work with both Python 2 and 3.
2015-01-20 12:18:40 +01:00
Ronny Chevalier 27c5347c8c test-execute: add tests for UMask directive 2014-12-11 18:32:57 +01:00
Tom Gundersen 02cd084db7 tests: udev - assume /etc/machine-id rather than /etc/hosts
On todays machines /etc/hosts is not mandatory. /etc/machine-id is though, so let's rely on that instead.

This makes the udev tests pass again for me.
2014-12-11 14:17:35 +01:00
Jan Synacek 0eb3cc8850 test: fix some tests when running inside a container 2014-12-10 13:36:10 +01:00
Lennart Poettering 55e189007c bus-policy: also add in other bus policy tests from dbus1
dbus1 only checks if these files parse correctly so let's do the same for now.
2014-11-26 20:58:34 +01:00
Lennart Poettering 3a9cca1104 bus-policy: steal a test case for prefix ownership from dbus1, and make sure it passes with the bus proxy enforcement 2014-11-26 20:22:22 +01:00
Michal Schmidt 06c1c4f98c test: add test for crash when adding a JOB_NOP 2014-11-26 16:33:40 +01:00
Ronny Chevalier 281e05b6cb tests: add test-execute
add tests for the following directives:
- WorkingDirectory
- Personality
- IgnoreSIGPIPE
- PrivateTmp
- SystemCallFilter: It makes test/TEST-04-SECCOMP obsolete, so it has
  been removed.
- SystemCallErrorNumber
- User
- Group
- Environment
2014-11-13 10:39:51 +01:00
Ronny Chevalier bc9992978c tests: add test-path
It tests all available directives of Path units:
- PathChanged
- PathModified
- PathExists
- PathExisysGlob
- DirectoryNotEmpty
- MakeDirectory
- DirectoryMode
- Unit
2014-11-08 22:45:56 +01:00
Daniel Mack e91c8c2019 bus-proxyd: assorted cleanups and fixes
Just some cleanups around policy checks that came up during review.
The code is still not productive.
2014-10-07 18:02:38 +02:00
Daniel Mack 078ef7b85a bus-policy: split API for bus-proxyd
Instead of operating on an sd_bus_message object, expose an API that has 4
functions:

  policy_check_own()
  policy_check_hello()
  policy_check_recv()
  policy_check_send()

This also allows dropping extra code to parse message contents - the bus
proxy already has dedicated code paths for that, and we can hook into
those later.

Tests amended accordingly.
2014-09-24 17:07:14 +02:00
Daniel Mack 20725d929f bus-policy: add test utility
Add some test files and routines for dbus policy checking.
2014-09-20 18:47:45 +02:00
Tom Gundersen 9158d03e40 test: udev - restrict nemuric uid's to existing ones
We now verify the existence of uid's before applying them to devicenodes, so change the
test accordingly. We assume that both uid/gid 1 and 2 exist on the test system.
2014-09-20 18:12:53 +02:00
Zbigniew Jędrzejewski-Szmek d1fab3fe88 core: warn when merged units have conflicting dependencies
A unit should not Conflict with itself. It also does not make
much sense for a unit to be After or Before itself, or to
trigger itself in some way.

If one of those dependency types is encountered, warn, instead
of dropping it silently like other dependency types.

% build/systemd-analyze verify test/loopy3.service
...
Dependency Conflicts dropped when merging unit loopy4.service into loopy3.service
Dependency ConflictedBy dropped when merging unit loopy4.service into loopy3.service
2014-08-07 20:46:49 -04:00