summaryrefslogtreecommitdiff
path: root/src/login/test-login.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/test-login.c')
-rw-r--r--src/login/test-login.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/login/test-login.c b/src/login/test-login.c
index 4596721060..2aaa31f22f 100644
--- a/src/login/test-login.c
+++ b/src/login/test-login.c
@@ -30,7 +30,7 @@
int main(int argc, char* argv[]) {
int r, k;
uid_t u, u2;
- char *seat;
+ char *seat, *type, *class;
char *session;
char *state;
char *session2;
@@ -75,6 +75,14 @@ int main(int argc, char* argv[]) {
printf("uid = %lu\n", (unsigned long) u);
assert_se(u == u2);
+ assert_se(sd_session_get_type(session, &type) >= 0);
+ printf("type = %s\n", type);
+ free(type);
+
+ assert_se(sd_session_get_class(session, &class) >= 0);
+ printf("class = %s\n", class);
+ free(class);
+
assert_se(sd_session_get_seat(session, &seat) >= 0);
printf("seat = %s\n", seat);
@@ -125,13 +133,13 @@ int main(int argc, char* argv[]) {
printf("seats = %s\n", t);
free(t);
+ assert_se(sd_get_seats(NULL) == r);
+
r = sd_seat_get_active(NULL, &t, NULL);
assert_se(r >= 0);
printf("active session on current seat = %s\n", t);
free(t);
- assert_se(sd_get_seats(NULL) == r);
-
r = sd_get_sessions(&sessions);
assert_se(r >= 0);
assert_se(r == (int) strv_length(sessions));