]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add short test for device node permission
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Aug 2023 19:52:16 +0000 (04:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Aug 2023 19:52:16 +0000 (04:52 +0900)
test/units/testsuite-17.00.sh [new file with mode: 0755]

diff --git a/test/units/testsuite-17.00.sh b/test/units/testsuite-17.00.sh
new file mode 100755 (executable)
index 0000000..0203af8
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -ex
+set -o pipefail
+
+# shellcheck source=test/units/util.sh
+. "$(dirname "$0")"/util.sh
+
+# Tests for issue #28588 and #28653.
+
+assert_in "systemd-tmpfiles-setup-dev.service" "$(systemctl show --property After --value systemd-udevd.service)"
+assert_in "systemd-udevd.service" "$(systemctl show --property Before --value systemd-tmpfiles-setup-dev.service)"
+
+if [[ -f /dev/vfio/vfio ]]; then
+   assert_in "crw-rw-rw-" "$(stat --format=%A /dev/vfio/vfio)"
+fi
+
+exit 0