daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
21255d
From 974431a70775d5127cd973c4b4705d2cf8884011 Mon Sep 17 00:00:00 2001
21255d
From: Alexey Bogdanenko <alexey@bogdanenko.com>
21255d
Date: Sat, 8 Dec 2018 15:35:30 +0300
21255d
Subject: [PATCH] udev-test: fix missing directory test/run
21255d
21255d
Fixes the following error:
21255d
21255d
    Failed to mount test /run: No such file or directory
21255d
21255d
By the time command "./test-udev check" calls function "fake_filesystems",
21255d
directory "test/run" must be present.
21255d
21255d
(cherry picked from commit 1e5548c0e0962424b6ca5fdfd35c866b70760c8f)
21255d
21255d
Related: #1642728
21255d
---
21255d
 test/udev-test.pl | 5 +++++
21255d
 1 file changed, 5 insertions(+)
21255d
21255d
diff --git a/test/udev-test.pl b/test/udev-test.pl
21255d
index 3517feab15..eb76ebd72e 100755
21255d
--- a/test/udev-test.pl
21255d
+++ b/test/udev-test.pl
21255d
@@ -1558,6 +1558,11 @@ sub udev_setup {
21255d
 
21255d
         system("rm", "-rf", "$udev_run");
21255d
 
21255d
+        if (!mkdir($udev_run)) {
21255d
+                warn "unable to create directory $udev_run";
21255d
+                return 0;
21255d
+        }
21255d
+
21255d
         return 1;
21255d
 }
21255d