teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0424-tests-fix-failure-of-test-execute-if-dev-mem-is-not-.patch

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