tests: fix failure of test-execute if /dev/mem is not available (#5028)
authorMichal Sekletar <msekletar@users.noreply.github.com>
Fri, 6 Jan 2017 09:27:35 +0000 (10:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 6 Jan 2017 09:27:35 +0000 (10:27 +0100)
/dev/mem isn't necessarily available. Recently, I've encountered arm64
systems that didn't provide raw memory access via /dev/mem. Instead,
let's use /dev/kmsg since we don't support systems w/o it anyway.

test/test-execute/exec-privatedevices-no.service
test/test-execute/exec-privatedevices-yes.service

index 77aeb95..0285a83 100644 (file)
@@ -2,6 +2,6 @@
 Description=Test for PrivateDev=no
 
 [Service]
-ExecStart=/bin/sh -x -c 'test -c /dev/mem'
+ExecStart=/bin/sh -x -c 'test -c /dev/kmsg'
 Type=oneshot
 PrivateDevices=no
index ab958b6..094257f 100644 (file)
@@ -2,6 +2,6 @@
 Description=Test for PrivateDev=yes
 
 [Service]
-ExecStart=/bin/sh -c 'test ! -c /dev/mem'
+ExecStart=/bin/sh -c 'test ! -c /dev/kmsg'
 Type=oneshot
 PrivateDevices=yes