summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-12 14:25:17 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-18 22:11:58 -0400
commitce737f46cd8aa8bfa0b586d0a821c815835000ab (patch)
tree90f284e6c4700849e6382620291fc46069180031 /man
parentd440fb97ba36e0a1dcf03e41601e53303a4d6288 (diff)
downloadsystemd-ce737f46cd8aa8bfa0b586d0a821c815835000ab.tar.gz
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.
Diffstat (limited to 'man')
-rw-r--r--man/sd_pid_get_session.xml8
-rw-r--r--man/sd_session_is_active.xml5
2 files changed, 7 insertions, 6 deletions
diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml
index 806cff34e4..0c135ba871 100644
--- a/man/sd_pid_get_session.xml
+++ b/man/sd_pid_get_session.xml
@@ -177,7 +177,7 @@
processes, user processes that are shared between multiple
sessions of the same user, or kernel threads). For processes not
being part of a login session, this function will fail with
- -ENODATA. The returned string needs to be freed with the libc
+ <constant>-ENODATA</constant>. The returned string needs to be freed with the libc
<citerefentry
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use.</para>
@@ -189,7 +189,7 @@
paths. Note that not all processes are part of a system
unit/service (e.g. user processes, or kernel threads). For
processes not being part of a systemd system unit, this function
- will fail with -ENODATA. (More specifically, this call will not
+ will fail with <constant>-ENODATA</constant>. (More specifically, this call will not
work for kernel threads.) The returned string needs to be freed
with the libc <citerefentry
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
@@ -208,7 +208,7 @@
multiple login sessions of the same user, whereas
<function>sd_pid_get_session()</function> will fail. For processes
not being part of a login session and not being a shared process
- of a user, this function will fail with -ENODATA.</para>
+ of a user, this function will fail with <constant>-ENODATA</constant>.</para>
<para><function>sd_pid_get_machine_name()</function> may be used
to determine the name of the VM or container is a member of. The
@@ -217,7 +217,7 @@
<citerefentry
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use. For processes not part of a VM or containers, this
- function fails with -ENODATA.</para>
+ function fails with <constant>-ENODATA</constant>.</para>
<para><function>sd_pid_get_slice()</function> may be used to
determine the slice unit the process is a member of. See
diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml
index a6076b177a..f95e74ead6 100644
--- a/man/sd_session_is_active.xml
+++ b/man/sd_session_is_active.xml
@@ -184,8 +184,9 @@
<para><function>sd_session_get_seat()</function> may be used to
determine the seat identifier of the seat the session identified
by the specified session identifier belongs to. Note that not all
- sessions are attached to a seat, this call will fail for them. The
- returned string needs to be freed with the libc
+ sessions are attached to a seat, this call will fail (returning
+ <constant>-ENODATA</constant>) for them. The returned string needs
+ to be freed with the libc
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use.</para>