mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
tests: compare with correct shell
We synthesize the passwd record for UID 0, hence we need to compare with our synthesized data and not with the data stored in /etc/passwd
This commit is contained in:
parent
8f63253149
commit
63d6135fea
|
@ -686,6 +686,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
(void) unsetenv("USER");
|
||||
(void) unsetenv("LOGNAME");
|
||||
(void) unsetenv("SHELL");
|
||||
|
||||
/* It is needed otherwise cgroup creation fails */
|
||||
if (getuid() != 0) {
|
||||
|
|
|
@ -17,7 +17,7 @@ ExecStart=test %L = /var/log
|
|||
ExecStart=sh -c 'test %u = $$(id -un 0)'
|
||||
ExecStart=test %U = 0
|
||||
ExecStart=sh -c 'test %h = $$(getent passwd 0 | cut -d: -f 6)'
|
||||
ExecStart=sh -c 'test %s = $$(getent passwd 0 | cut -d: -f 7)'
|
||||
ExecStart=sh -c 'test %s = /bin/sh'
|
||||
ExecStart=sh -c 'test %m = $$(cat /etc/machine-id)'
|
||||
ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
|
||||
ExecStart=sh -c 'test %H = $$(hostname)'
|
||||
|
|
|
@ -17,7 +17,7 @@ ExecStart=test %L = /var/log
|
|||
ExecStart=sh -c 'test %u = $$(id -un 0)'
|
||||
ExecStart=test %U = 0
|
||||
ExecStart=sh -c 'test %h = $$(getent passwd 0 | cut -d: -f 6)'
|
||||
ExecStart=sh -c 'test %s = $$(getent passwd 0 | cut -d: -f 7)'
|
||||
ExecStart=sh -c 'test %s = /bin/sh'
|
||||
ExecStart=sh -c 'test %m = $$(cat /etc/machine-id)'
|
||||
ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
|
||||
ExecStart=sh -c 'test %H = $$(hostname)'
|
||||
|
|
Loading…
Reference in a new issue