daandemeyer / rpms / systemd

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