test-systemd-tmpfiles: Fix execution when user is not in /etc/passwd
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 28 Jan 2023 14:09:25 +0000 (15:09 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 29 Jan 2023 17:49:38 +0000 (17:49 +0000)
commit60f42f7ec2d584cd7cfc8eb2eb617fcdab6aabb8
treec4a9d383322f6f12a89503e5a20ed4bb3872097e
parent98a6d8505dad62e0aa8deb2185249825bce176ef
test-systemd-tmpfiles: Fix execution when user is not in /etc/passwd

We might be running in a chroot as a uid that doesn't exist in /etc/passwd.
Let's make sure we don't fail in this scenario.

We pass $HOME when resetting the env so that we can find a home directory
and skip tests that depend on user name/group.
test/test-systemd-tmpfiles.py