virt-what/0002-tests-Fix-ldoms-test-so-it-doesn-t-test-the-host.patch
2017-07-31 15:11:10 +01:00

58 lines
1.6 KiB
Diff

From 0e25bd8297ddedec14a260b25a6347ccca784df3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 31 Jul 2017 15:04:28 +0100
Subject: [PATCH 2/2] tests: Fix ldoms test so it doesn't test the host.
Fixes commit dc0c2972e178a6de9ee87501acca54447ea9c699.
---
tests/ldoms/sbin/uname | 2 ++
tests/ldoms/sbin/virt-what-cpuid-helper | 2 ++
tests/test-ldoms.sh | 11 +----------
3 files changed, 5 insertions(+), 10 deletions(-)
create mode 100755 tests/ldoms/sbin/uname
create mode 100755 tests/ldoms/sbin/virt-what-cpuid-helper
diff --git a/tests/ldoms/sbin/uname b/tests/ldoms/sbin/uname
new file mode 100755
index 0000000..9d07262
--- /dev/null
+++ b/tests/ldoms/sbin/uname
@@ -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
index 0000000..42b1f97
--- /dev/null
+++ b/tests/ldoms/sbin/virt-what-cpuid-helper
@@ -0,0 +1,2 @@
+#!/bin/sh -
+echo
diff --git a/tests/test-ldoms.sh b/tests/test-ldoms.sh
index 68c3c77..6ae5aba 100755
--- a/tests/test-ldoms.sh
+++ b/tests/test-ldoms.sh
@@ -17,18 +17,9 @@
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"
--
2.13.2