Commit Graph

35145 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 08d541ca06 test: when skipping tests, always print something
It is quite confusing if the test "fails" without printing anything at all.

A typo in an 'if' statement is also fixed.
2018-09-13 12:07:34 +02:00
Zbigniew Jędrzejewski-Szmek 938be08926 meson: disable _all_ tests when -Dtests=false
Back in 08318a2c5a, value "false" was enabled for
'-Dtests=', but various tests were not conditionalized properly. So even with
-Dtests=false -Dslow-tests=false we'd run 120 tests. Let's make this consistent.
2018-09-13 12:07:34 +02:00
Zbigniew Jędrzejewski-Szmek d3da291eb0 meson: disable "slow tests" too when tests are generally disabled
We would have a strange situation where after setting -Dslow-tests=true -Dtests=false
we'd get mostly the slow tests (plus some other ones which I'll fix in
subsequent commit). Let's simplify things by making -Dtests=false just
disable those tests too.
2018-09-13 12:07:34 +02:00
Zbigniew Jędrzejewski-Szmek f57d003cb6 test-barrier: just make this a slow test
test-barrier was using a custom mechanism to skip itself. Let's
just follow the normal scheme.
2018-09-13 12:07:34 +02:00
Zbigniew Jędrzejewski-Szmek 0cf29baac0 tests: centralize check for slow tests 2018-09-13 12:07:27 +02:00
Yu Watanabe d491e65e74 man: document RUNTIME_DIRECTORY= or friends 2018-09-13 17:02:58 +09:00
Yu Watanabe 6088662d57 test-execute: add tests for $RUNTIME_DIRECTORY= or friends 2018-09-13 17:02:58 +09:00
Yu Watanabe fb2042dd55 core: add new environment variable $RUNTIME_DIRECTORY= or friends
The variable is generated from RuntimeDirectory= or friends.
If multiple directories are set, then they are concatenated with
the separator ':'.
2018-09-13 17:02:58 +09:00
Yu Watanabe a2917d3d2a test: replace swear words by 'hoge' 2018-09-13 17:02:58 +09:00
Yu Watanabe 474a595af7 test: add tests for strv_join_prefix() 2018-09-13 17:02:58 +09:00
Yu Watanabe 2b9a7d2e96 strv: introduce strv_join_prefix() 2018-09-13 17:02:58 +09:00
Yu Watanabe 7c1cb6f198 core: add one more assert() 2018-09-13 17:02:58 +09:00
Yu Watanabe 76a9460d44 core: fix assert() about number of built environment variables
Follow-up for 4b58153dd2 and
fd63e712b2.
2018-09-13 17:02:58 +09:00
Lennart Poettering c633b0a642 update TODO 2018-09-12 21:39:14 +02:00
afg 27b620b7db nspawn: use copy-static if systemd-resolved is up and image is writable 2018-09-12 20:48:21 +02:00
Lennart Poettering b0b3ba69c0
Merge pull request #10061 from xnox/fix-logindless-scheduled-shutdown
Fix logindless scheduled shutdown
2018-09-12 20:45:31 +02:00
Lennart Poettering b2b9edd4d1
Merge pull request #10060 from yuwata/property-take-value
bus-util: make --property= optionaly take value
2018-09-12 20:17:53 +02:00
Filipe Brandenburger 49cdae63d1 test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
This makes it so that tests no longer need to know the absolute paths to the
source and build dirs, instead using the systemd-runtest.env file to get these
paths when running from the build tree.

Confirmed that test-catalog works on `ninja test`, when called standalone and
also when the environment file is not present, in which case it will use the
installed location under /usr/lib/systemd/catalog.

The location can now also be overridden for this test by setting the
$SYSTEMD_CATALOG_DIR environment variable.
2018-09-12 09:49:03 -07:00
Filipe Brandenburger e2d413707f test: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA
This simplifies get_testdata_dir() to simply checking for an environment
variable, with an additional function to locate a systemd-runtest.env file in
the same directory as the test binary and reading environment variable
assignments from that file if it exists.

This makes it possible to:
- Run `ninja test` from the build dir and have it use ${srcdir}/test for
  test unit definitions.
- Run a test directly, such as `build/test-execute` and have it locate
  them correctly.
- Run installed tests (from systemd-tests package) and locate the test
  units in the installed location (/usr/lib/systemd/tests/testdata), in
  which case the absence of the systemd-runtest.env file will have
  get_testdata_dir() use the installed location hardcoded into the
  binaries.

Explicit setting of $SYSTEMD_TEST_DATA still overrides the contents of
systemd-runtest.env.
2018-09-12 09:49:03 -07:00
Filipe Brandenburger 55890a40c3 test: remove support for suffix in get_testdata_dir()
Instead, use path_join() in callers wherever needed.
2018-09-12 09:49:03 -07:00
Zbigniew Jędrzejewski-Szmek 87ead8e298 Set theme jekyll-theme-slate 2018-09-12 11:51:27 +02:00
Yu Watanabe f28255e2d5 bash-completion: systemctl: re-implement __filter_units_by_properties()
This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.
2018-09-12 14:17:22 +09:00
Yu Watanabe eda193578e bus-util: make --property= optionally take value 2018-09-12 12:11:25 +09:00
Michael Biebl 878f2dae77
Merge pull request #10046 from yuwata/fix-10045
test: use installed catalogs when test-catalog is not located at build dir
2018-09-11 23:30:16 +02:00
Dimitri John Ledkov 940bec70bb systemctl: correctly proceed to immediate shutdown if scheduling fails
Actually check the return code from logind_schedule_shutdown() and proceed to
immediate shutdown if that fails. Negative return codes can be returned if
systemctl is compiled without logind support, or if logind otherwise failed
(either too old, disabled/masked, or it is incomplete
systemd-shim/systemd-service implementation).
2018-09-11 10:41:56 +01:00
Yu Watanabe 8aae9a66fa sd-device,libudev: make an argument for *_set_sysattr_value() const 2018-09-11 12:45:21 +09:00
Yu Watanabe 7f9e03952a libudev-monitor: use assert_return() in many places 2018-09-11 12:45:21 +09:00
Yu Watanabe e38242b03a libudev-monitor: add missing error checks in udev_monitor_enable_receiving() 2018-09-11 12:45:21 +09:00
Yu Watanabe a9808d8445 libudev-monitor: introduce udev_monitor_send_sd_device()
And use it in udev_monitor_send_device().
2018-09-11 12:45:21 +09:00
Yu Watanabe 23c457a7fb libudev-monitor: re-implement udev_monitor_receive_sd_device() 2018-09-11 12:45:21 +09:00
Yu Watanabe 759d9f3f8d libudev-monitor: use Hashmap or Set to store filters 2018-09-11 12:45:21 +09:00
Yu Watanabe 5e1e4c247b libudev-monitor: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe a062a72f1b libudev-monitor: rename monitor_set_nl_address() and make it return negative errno 2018-09-11 12:45:21 +09:00
Yu Watanabe be1791ad6a libudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c
As the function itself is quite generic.
2018-09-11 12:45:21 +09:00
Yu Watanabe 3d01fa902c libudev-monitor: use structured initializer in bpf_*()
This also drop inline attribute from the functions.
2018-09-11 12:45:21 +09:00
Yu Watanabe 7f79720711 libudev-monitor: use 'unsigned' instead of 'unsigned int' 2018-09-11 12:45:21 +09:00
Yu Watanabe 02e7ae2fdc libudev-device: create sd_device at first in udev_device_new_from_*() 2018-09-11 12:45:21 +09:00
Yu Watanabe a7e9db150b libudev-device: drop prototypes of unexistent functions 2018-09-11 12:45:21 +09:00
Yu Watanabe 536cbd7fa6 libudev: drop a prototype of unexistent function 2018-09-11 12:45:21 +09:00
Yu Watanabe 76387b9abb libudev-device: coding style fixes 2018-09-11 12:45:21 +09:00
Yu Watanabe 33a03e6eff libudev-device: fix return value of udev_device_has_tag() 2018-09-11 12:45:21 +09:00
Yu Watanabe 1b6374d285 libudev-device: use original negative errno 2018-09-11 12:45:21 +09:00
Yu Watanabe 71074e3a10 libudev-device: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe 60fdee32bd libudev-enumerate: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe 2b19953a0d libudev-hwdb: use assert_return_errno() 2018-09-11 12:45:21 +09:00
Yu Watanabe 68b80b8557 libudev-hwdb: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe b485aa5852 libudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct 2018-09-11 12:45:21 +09:00
Yu Watanabe f8cdabc0ec libudev-queue: coding style fixes 2018-09-11 12:45:21 +09:00
Yu Watanabe 09f638ebd9 libudev-queue: drop prototypes of nonexistent functions 2018-09-11 12:45:21 +09:00
Yu Watanabe 2dac88a9d1 libudev-queue: use _cleanup_ attribute and TAKE_FD() 2018-09-11 12:45:21 +09:00