]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-test: fix missing directory test/run 11099/head
authorAlexey Bogdanenko <alexey@bogdanenko.com>
Sat, 8 Dec 2018 12:35:30 +0000 (15:35 +0300)
committerAlexey Bogdanenko <alexey@bogdanenko.com>
Sun, 9 Dec 2018 17:53:11 +0000 (20:53 +0300)
Fixes the following error:

    Failed to mount test /run: No such file or directory

By the time command "./test-udev check" calls function "fake_filesystems",
directory "test/run" must be present.

test/udev-test.pl

index 3517feab155ed71fd1a2dc95e39a37138ce08f50..eb76ebd72efd6b63a7c9cf343c3844fd31adbfa1 100755 (executable)
@@ -1558,6 +1558,11 @@ sub udev_setup {
 
         system("rm", "-rf", "$udev_run");
 
+        if (!mkdir($udev_run)) {
+                warn "unable to create directory $udev_run";
+                return 0;
+        }
+
         return 1;
 }