[virt-tools-list] virt-what patch to support Logical Domains (LDoms) on Linux SPARC

Richard W.M. Jones rjones at redhat.com
Mon Jul 31 14:07:51 UTC 2017


Hi, I added the attached patch on top so that the test suite
doesn't test the host.  However I had to guess the output of
‘uname -p‘ and ‘virt-what-cpuid-helper’ on the real platform.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
-------------- next part --------------
>From 0e25bd8297ddedec14a260b25a6347ccca784df3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Mon, 31 Jul 2017 15:04:28 +0100
Subject: [PATCH] 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



More information about the virt-tools-list mailing list