]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl ... 37616/head
authorLennart Poettering <lennart@poettering.net>
Mon, 26 May 2025 11:46:21 +0000 (13:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 May 2025 08:41:52 +0000 (10:41 +0200)
test/units/TEST-50-DISSECT.mountfsd.sh

index 0ab1a6107966304aed239db1728f6e6a87935793..205fabec190d1ed9721f899055ad73db7f0453b4 100755 (executable)
@@ -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