naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
6136c1
From 6a908a38135d050b7c271fdea9c061d7e7ad8ef7 Mon Sep 17 00:00:00 2001
6136c1
From: Yu Watanabe <watanabe.yu+github@gmail.com>
6136c1
Date: Tue, 23 Oct 2018 07:23:01 +0900
6136c1
Subject: [PATCH] test: create /dev/null in test-udev.pl
6136c1
6136c1
(cherry picked from commit a41ff38b0999fb83464309a29b8f39450b8d4b85)
6136c1
6136c1
Related: #1642728
6136c1
---
6136c1
 test/udev-test.pl | 3 ++-
6136c1
 1 file changed, 2 insertions(+), 1 deletion(-)
6136c1
6136c1
diff --git a/test/udev-test.pl b/test/udev-test.pl
6136c1
index 0433629c7c..a1c24f49b4 100755
6136c1
--- a/test/udev-test.pl
6136c1
+++ b/test/udev-test.pl
6136c1
@@ -1537,13 +1537,14 @@ sub udev_setup {
6136c1
         system("umount", $udev_tmpfs);
6136c1
         rmdir($udev_tmpfs);
6136c1
         mkdir($udev_tmpfs) || die "unable to create udev_tmpfs: $udev_tmpfs\n";
6136c1
-        system("mount", "-o", "rw,mode=755,nosuid,noexec,nodev", "-t", "tmpfs", "tmpfs", $udev_tmpfs) && die "unable to mount tmpfs";
6136c1
+        system("mount", "-o", "rw,mode=755,nosuid,noexec", "-t", "tmpfs", "tmpfs", $udev_tmpfs) && die "unable to mount tmpfs";
6136c1
 
6136c1
         mkdir($udev_dev) || die "unable to create udev_dev: $udev_dev\n";
6136c1
         # setting group and mode of udev_dev ensures the tests work
6136c1
         # even if the parent directory has setgid bit enabled.
6136c1
         chown (0, 0, $udev_dev) || die "unable to chown $udev_dev\n";
6136c1
         chmod (0755, $udev_dev) || die "unable to chmod $udev_dev\n";
6136c1
+        system("mknod", $udev_dev . "/null", "c", "1", "3") && "unable to create $udev_dev/null";
6136c1
 
6136c1
         system("cp", "-r", "test/sys/", $udev_sys) && die "unable to copy test/sys";
6136c1