daandemeyer / rpms / systemd

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