From: Lennart Poettering Date: Mon, 26 May 2025 11:46:21 +0000 (+0200) Subject: ci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl ... X-Git-Tag: v258-rc1~480^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F37616%2Fhead;p=thirdparty%2Fsystemd.git ci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl --push-fd= --- diff --git a/test/units/TEST-50-DISSECT.mountfsd.sh b/test/units/TEST-50-DISSECT.mountfsd.sh index 0ab1a610796..205fabec190 100755 --- a/test/units/TEST-50-DISSECT.mountfsd.sh +++ b/test/units/TEST-50-DISSECT.mountfsd.sh @@ -90,3 +90,8 @@ fi systemd-run -M testuser@ --user --pipe -p RootImage=/var/tmp/unpriv.raw -p PrivateUsers=1 --wait echo thisisatest >/tmp/unpriv.out3 echo thisisatest | cmp /tmp/unpriv.out3 - + +# make sure MakeDirectory() works correctly +assert_eq "$(run0 -u testuser varlinkctl --exec call /run/systemd/io.systemd.MountFileSystem io.systemd.MountFileSystem.MakeDirectory --push-fd=./ '{ "parentFileDescriptor" : 0, "name" : "foreignuidowned" }' -- stat -Lc "%u" /proc/self/fd/3)" 2147352576 +assert_eq "$(stat -c "%u" ~testuser/foreignuidowned)" 2147352576 +rmdir ~testuser/foreignuidowned