mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-05 09:17:44 +03:00
tests: make sure tests pass when invoked in "sudo"
This is a follow-up for 6309e51ea3
and makes sure
we compare test results with the right user identifier.
This commit is contained in:
parent
2ca8dc15f9
commit
999a6c5d9c
@ -589,7 +589,7 @@ static void test_install_printf(void) {
|
||||
assert_se(specifier_machine_id('m', NULL, NULL, &mid) >= 0 && mid);
|
||||
assert_se(specifier_boot_id('b', NULL, NULL, &bid) >= 0 && bid);
|
||||
assert_se((host = gethostname_malloc()));
|
||||
assert_se((user = getusername_malloc()));
|
||||
assert_se((user = uid_to_name(getuid())));
|
||||
assert_se(asprintf(&uid, UID_FMT, getuid()) >= 0);
|
||||
|
||||
#define expect(src, pattern, result) \
|
||||
|
Loading…
Reference in New Issue
Block a user