]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-login/test-login.c
test-login: make the test non-manual
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 May 2017 18:25:17 +0000 (14:25 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 02:11:58 +0000 (22:11 -0400)
commitce737f46cd8aa8bfa0b586d0a821c815835000ab
tree90f284e6c4700849e6382620291fc46069180031
parentd440fb97ba36e0a1dcf03e41601e53303a4d6288
test-login: make the test non-manual

test-login.c is largely rewritten to use _cleanup_ and give more meaningful
messages (function names are used instead of creative terms like "active
session", so that when something unexpected is returned, it's much easier to
see what function is responsible).

The monitoring part is only activated if '-m' is passed on the command line.

It runs against the information from /run/systemd/ in the live system, but that
should be OK: logind/sd-login interface is supposed to be stable and both
backwards and forwards compatible.

If not running in a login session, some tests are skipped.

Those two changes together mean that it's possible to run test-login in the
test suite.

Tests for sd_pid_get_{unit,user_unit,slice} are added.
Makefile.am
man/sd_pid_get_session.xml
man/sd_session_is_active.xml
src/libsystemd/sd-login/test-login.c
src/test/meson.build