test: avoid asserting on default user shell
authorLuca Boccassi <bluca@debian.org>
Thu, 16 Nov 2023 23:17:29 +0000 (23:17 +0000)
committerLuca Boccassi <bluca@debian.org>
Thu, 16 Nov 2023 23:17:31 +0000 (23:17 +0000)
In some build environments it might differ:

/* test_get_user_creds_one("root", "root", 0, 0, "/root", "/usr/bin/bash") */
got "root", 0, 0, "/root", "/bin/sh": Success
Assertion 'path_equal(rshell, shell)' failed at src/test/test-user-util.c:345, function test_get_user_creds_one(). Aborting.

https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=alpha&ver=255%7Erc2-1&stamp=1700147880&raw=0

src/test/test-user-util.c

index 66f3b38..db76cde 100644 (file)
@@ -342,7 +342,6 @@ static void test_get_user_creds_one(const char *id, const char *name, uid_t uid,
         assert_se(ruid == uid);
         assert_se(rgid == gid);
         assert_se(path_equal(rhome, home));
-        assert_se(path_equal(rshell, shell));
 }
 
 TEST(get_user_creds) {