summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichal Koutný <mkoutny@suse.com>2020-04-22 00:31:54 +0200
committerMichal Koutný <mkoutny@suse.com>2020-04-22 10:35:12 +0200
commit9acb2964d7798813274dbd5992fb6f370add23b9 (patch)
tree349524e575311bdd6ef475a8b92a718a01c7f17d /test
parentbac567a53be1995cc24b6de0c175839f4f57afeb (diff)
downloadsystemd-9acb2964d7798813274dbd5992fb6f370add23b9.tar.gz
test: Simplify hostname checking
Both hostname and uname utilities boil down to uname(2) syscall. Reduce tests dependency footprint by using uname for checking hostname too.
Diffstat (limited to 'test')
-rw-r--r--test/test-execute/exec-specifier.service2
-rw-r--r--test/test-execute/exec-specifier@.service2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/test-execute/exec-specifier.service b/test/test-execute/exec-specifier.service
index 7c3f81f2b5..a58abc68dd 100644
--- a/test/test-execute/exec-specifier.service
+++ b/test/test-execute/exec-specifier.service
@@ -27,5 +27,5 @@ ExecStart=test %h = /root
ExecStart=sh -c 'test %s = /bin/sh'
ExecStart=sh -c 'test %m = $$(cat /etc/machine-id)'
ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
-ExecStart=sh -c 'test %H = $$(hostname)'
+ExecStart=sh -c 'test %H = $$(uname -n)'
ExecStart=sh -c 'test %v = $$(uname -r)'
diff --git a/test/test-execute/exec-specifier@.service b/test/test-execute/exec-specifier@.service
index a388926846..faecbf37bc 100644
--- a/test/test-execute/exec-specifier@.service
+++ b/test/test-execute/exec-specifier@.service
@@ -25,5 +25,5 @@ ExecStart=test %h = /root
ExecStart=sh -c 'test %s = /bin/sh'
ExecStart=sh -c 'test %m = $$(cat /etc/machine-id)'
ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
-ExecStart=sh -c 'test %H = $$(hostname)'
+ExecStart=sh -c 'test %H = $$(uname -n)'
ExecStart=sh -c 'test %v = $$(uname -r)'