naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
923a60
From 0f3a67a0e4d243952e9ae4965a30e704885f03ef Mon Sep 17 00:00:00 2001
923a60
From: Michal Sekletar <msekletar@users.noreply.github.com>
923a60
Date: Fri, 6 Jan 2017 10:27:35 +0100
923a60
Subject: [PATCH] tests: fix failure of test-execute if /dev/mem is not
923a60
 available (#5028)
923a60
923a60
/dev/mem isn't necessarily available. Recently, I've encountered arm64
923a60
systems that didn't provide raw memory access via /dev/mem. Instead,
923a60
let's use /dev/kmsg since we don't support systems w/o it anyway.
923a60
923a60
Cherry-picked from: 01349f5d01e0b59168722403b0c1c2325b15512c
923a60
Resolves: #1410056
923a60
---
923a60
 test/exec-privatedevices-no.service  | 2 +-
923a60
 test/exec-privatedevices-yes.service | 2 +-
923a60
 2 files changed, 2 insertions(+), 2 deletions(-)
923a60
923a60
diff --git a/test/exec-privatedevices-no.service b/test/exec-privatedevices-no.service
923a60
index cf4f275fb6..af1daf78f1 100644
923a60
--- a/test/exec-privatedevices-no.service
923a60
+++ b/test/exec-privatedevices-no.service
923a60
@@ -2,6 +2,6 @@
923a60
 Description=Test for PrivateDev=no
923a60
 
923a60
 [Service]
923a60
-ExecStart=/bin/sh -c 'exit $(test -c /dev/mem)'
923a60
+ExecStart=/bin/sh -c 'exit $(test -c /dev/kmsg)'
923a60
 Type=oneshot
923a60
 PrivateDevices=no
923a60
diff --git a/test/exec-privatedevices-yes.service b/test/exec-privatedevices-yes.service
923a60
index 85b3f4f981..384a7b01af 100644
923a60
--- a/test/exec-privatedevices-yes.service
923a60
+++ b/test/exec-privatedevices-yes.service
923a60
@@ -2,6 +2,6 @@
923a60
 Description=Test for PrivateDev=yes
923a60
 
923a60
 [Service]
923a60
-ExecStart=/bin/sh -c 'exit $(test ! -c /dev/mem)'
923a60
+ExecStart=/bin/sh -c 'exit $(test ! -c /dev/kmsg)'
923a60
 Type=oneshot
923a60
 PrivateDevices=yes