]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-user-util: fix line break confusion
authorLennart Poettering <lennart@poettering.net>
Mon, 10 May 2021 17:19:02 +0000 (19:19 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 11 May 2021 05:32:24 +0000 (14:32 +0900)
This fixes some line-break confusion introduced by #11199
(c6cecb744b53561efd329309af7d02a3f9979ed1). It also restores a test with
GID_INVALID that was dropped, presumably by accident.

src/test/test-user-util.c

index 8924b5f95a16b354a9367a1124b0c5ccad21708f..94ca3f04bae7f872b8dfe0dc90b7123c156c4f27 100644 (file)
@@ -379,7 +379,9 @@ static void test_make_salt(void) {
 
 static void test_in_gid(void) {
         assert(in_gid(getgid()) >= 0);
-        assert(in_gid(getegid()) >= 0);        assert(in_gid(TTY_GID) == 0); /* The TTY gid is for owning ttys, it would be really really weird if we were in it. */
+        assert(in_gid(getegid()) >= 0);
+        assert(in_gid(GID_INVALID) < 0);
+        assert(in_gid(TTY_GID) == 0); /* The TTY gid is for owning ttys, it would be really really weird if we were in it. */
 }
 
 static void test_gid_lists_ops(void) {