tests: Fix ldoms test so it doesn't test the host.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 31 Jul 2017 14:04:28 +0000 (15:04 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 31 Jul 2017 14:04:48 +0000 (15:04 +0100)
Fixes commit dc0c2972e178a6de9ee87501acca54447ea9c699.

tests/ldoms/sbin/uname [new file with mode: 0755]
tests/ldoms/sbin/virt-what-cpuid-helper [new file with mode: 0755]
tests/test-ldoms.sh

diff --git a/tests/ldoms/sbin/uname b/tests/ldoms/sbin/uname
new file mode 100755 (executable)
index 0000000..9d07262
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh -
+echo sparc64
diff --git a/tests/ldoms/sbin/virt-what-cpuid-helper b/tests/ldoms/sbin/virt-what-cpuid-helper
new file mode 100755 (executable)
index 0000000..42b1f97
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh -
+echo 
index 68c3c77..6ae5aba 100755 (executable)
 
 root=tests/ldoms
 
-# Include src dir in PATH
-export PATH=.:${PATH}
-
-arch=$(uname -p | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/')
-
 output="$(./virt-what --test-root=$root 2>&1)"
-if [[ "${arch}" == sparc* ]]; then
-    expected="ldoms
+expected="ldoms
 ldoms-guest"
-else
-    expected=""
-fi
 
 if [ "$output" != "$expected" ]; then
     echo "$0: test failed because output did not match expected"