Commit graph

15 commits

Author SHA1 Message Date
Holger Hans Peter Freyther 143bfdaf0b test: Make testing work on systems without or old systemd
* Introduce a macro to conditionally execute tests. This avoids
  skipping the entire test if some parts require systemd
* Skip the journal tests when no /etc/machine-id is present
* Change test-catalog to load the catalog from the source directory
  of systemd.
* /proc/PID/comm got introduced in v2.6.33 but travis is still
  using v2.6.32.
* Enable make check and make distcheck on the travis build
* Use -D"CATALOG_DIR=STR($(abs_top_srcdir)/catalog)" as a STRINGIY
  would result in the path '/home/ich/source/linux' to be expanded
  to '/home/ich/source/1' as linux is defined to 1.
2013-08-22 00:52:14 -04:00
Kay Sievers f04ca8c214 tests: skip tests when executed without privileges but which require them 2013-07-18 23:05:29 +02:00
Zbigniew Jędrzejewski-Szmek b463b81399 test-path-util,test-sched-prio: uninitialize manager to appease valgrind 2013-07-12 13:24:06 -04:00
Lennart Poettering 6fa4853328 core: serialize/deserialize bus subscribers 2013-07-10 23:41:03 +02:00
Harald Hoyer 7fd1b19bc9 move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-18 09:11:22 +02:00
Zbigniew Jędrzejewski-Szmek 49e5de64e2 tests: skip bus test if bus cannot be opened
To make the result more visible, special return value
is used to tell automake that the test was skipped. While
at it, use the same return value in other skipped tests.
2013-03-26 23:50:44 -04:00
Zbigniew Jędrzejewski-Szmek 3baed19327 Simplify the meaning of %s
The rules governing %s where just too complicated. First of
all, looking at $SHELL is dangerous. For systemd --system,
it usually wouldn't be set. But it could be set if the admin
first started a debug shell, let's say /sbin/sash, and then
launched systemd from it. This shouldn't influence how daemons
are started later on, so is better ignored. Similar reasoning
holds for session mode. Some shells set $SHELL, while other
set it only when it wasn't set previously (e.g. zsh). This
results in fragility that is better avoided by ignoring $SHELL
totally.

With $SHELL out of the way, simplify things by saying that
%s==/bin/sh for root, and the configured shell otherwise.
get_shell() is the only caller, so it can be inlined.

Fixes one issue seen with 'make check'.
2013-03-26 23:49:44 -04:00
Zbigniew Jędrzejewski-Szmek c5e33bf834 tests: skip tests if manager cannot be created
When running without a user session, tests fail.
2013-02-06 19:29:33 -05:00
Zbigniew Jędrzejewski-Szmek fa3cd7394c tests: run manager in session mode
False positives pop up otherwise.

FAIL: test-unit-name (exit: 134)
================================

Failed to open /dev/tty0: Permission denied
Failed to create root cgroup hierarchy: Permission denied
Assertion 'manager_new(SYSTEMD_SYSTEM, &m) == 0' failed at src/test/test-unit-name.c:125, function test_unit_printf(). Aborting.
2013-02-06 17:06:26 -05:00
Zbigniew Jędrzejewski-Szmek 1682ff6011 tests: add test for unit name printing 2013-01-29 19:01:41 -05:00
Zbigniew Jędrzejewski-Szmek 3251c0d239 tests: compress unit name tests and add more asserts 2013-01-29 19:01:41 -05:00
Lennart Poettering 1b2ac6b311 test: extend unit-name test a bit 2012-09-12 08:31:08 +02:00
Lennart Poettering 8556879e0d unit-name: rework unit_name_replace_instance function()
https://bugzilla.redhat.com/show_bug.cgi?id=855863
2012-09-12 04:46:38 +02:00
Lennart Poettering 35eb6b124e cryptsetup: fix escaping when generating cryptsetup units 2012-06-25 20:16:15 +02:00
Lennart Poettering b0193f1c1f systemctl: automatically turn paths and unescaped unit names into proper unit names
This makes sure that

  systemctl status /home

is implicitly translated to:

  systemctl status /home.mount

Similar, /dev/foobar becomes dev-foobar.device.

Also, all characters that cannot be part of a unit name are implicitly
escaped.
2012-06-22 13:08:48 +02:00