summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-04-21 09:49:36 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-04-21 09:54:55 +0100
commit74a75da0d0b330859efba84a3ec37a7a7076fb0e (patch)
tree50c1c5de4b028ce1a4bc0d33de11eec13fee24fd
parentb12933e28ac504f461dc1a2f9d4682c72f538d0e (diff)
downloadvirt-what-74a75da0d0b330859efba84a3ec37a7a7076fb0e.tar.gz
virt-what-74a75da0d0b330859efba84a3ec37a7a7076fb0e.tar.xz
virt-what-74a75da0d0b330859efba84a3ec37a7a7076fb0e.zip
Add a regression test for IBM PowerVM Lx86 emulator (thanks Yufang Zhang).
Data was collected by RWMJ from IBM eServer BladeCenter JS12 server, running a PowerVM Lx86 Virtual x86 Environment (VxE) guest.
-rw-r--r--Makefile.am7
-rw-r--r--tests/lx86/proc/cpuinfo76
-rw-r--r--tests/lx86/proc/self/status36
-rwxr-xr-xtests/lx86/sbin/dmidecode5
-rwxr-xr-xtests/lx86/sbin/id2
-rwxr-xr-xtests/lx86/sbin/virt-what-cpuid-helper8
-rwxr-xr-xtests/test-lx86.sh35
-rw-r--r--virt-what.pod3
8 files changed, 171 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 869f692..8a31f3f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,6 +43,11 @@ EXTRA_DIST = \
tests/linux-vserver/sbin/dmidecode \
tests/linux-vserver/sbin/id \
tests/linux-vserver/sbin/virt-what-cpuid-helper \
+ tests/lx86/proc/cpuinfo \
+ tests/lx86/proc/self/status \
+ tests/lx86/sbin/dmidecode \
+ tests/lx86/sbin/id \
+ tests/lx86/sbin/virt-what-cpuid-helper \
tests/parallels-desktop/proc/cpuinfo \
tests/parallels-desktop/proc/self/status \
tests/parallels-desktop/sbin/dmidecode \
@@ -117,6 +122,7 @@ EXTRA_DIST = \
tests/test-hyperv.sh \
tests/test-kvm.sh \
tests/test-linux-vserver.sh \
+ tests/test-lx86.sh \
tests/test-parallels-desktop.sh \
tests/test-qemu.sh \
tests/test-rhel5-xen-dom0.sh \
@@ -146,6 +152,7 @@ TESTS = \
tests/test-hyperv.sh \
tests/test-kvm.sh \
tests/test-linux-vserver.sh \
+ tests/test-lx86.sh \
tests/test-parallels-desktop.sh \
tests/test-qemu.sh \
tests/test-rhel5-xen-dom0.sh \
diff --git a/tests/lx86/proc/cpuinfo b/tests/lx86/proc/cpuinfo
new file mode 100644
index 0000000..9da5dca
--- /dev/null
+++ b/tests/lx86/proc/cpuinfo
@@ -0,0 +1,76 @@
+processor : 0
+vendor_id : PowerVM Lx86
+cpu family : 6
+model : 8
+model name : PowerVM Lx86
+stepping : 6
+cpu MHz : 3826.000
+cache size : 256 KB
+fdiv_bug : no
+hlt_bug : no
+f00f_bug : no
+coma_bug : no
+fpu : yes
+fpu_exception : yes
+cpuid level : 2
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx
+bogomips : 7652.000
+
+processor : 1
+vendor_id : PowerVM Lx86
+cpu family : 6
+model : 8
+model name : PowerVM Lx86
+stepping : 6
+cpu MHz : 3826.000
+cache size : 256 KB
+fdiv_bug : no
+hlt_bug : no
+f00f_bug : no
+coma_bug : no
+fpu : yes
+fpu_exception : yes
+cpuid level : 2
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx
+bogomips : 7652.000
+
+processor : 2
+vendor_id : PowerVM Lx86
+cpu family : 6
+model : 8
+model name : PowerVM Lx86
+stepping : 6
+cpu MHz : 3826.000
+cache size : 256 KB
+fdiv_bug : no
+hlt_bug : no
+f00f_bug : no
+coma_bug : no
+fpu : yes
+fpu_exception : yes
+cpuid level : 2
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx
+bogomips : 7652.000
+
+processor : 3
+vendor_id : PowerVM Lx86
+cpu family : 6
+model : 8
+model name : PowerVM Lx86
+stepping : 6
+cpu MHz : 3826.000
+cache size : 256 KB
+fdiv_bug : no
+hlt_bug : no
+f00f_bug : no
+coma_bug : no
+fpu : yes
+fpu_exception : yes
+cpuid level : 2
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx
+bogomips : 7652.000
+
diff --git a/tests/lx86/proc/self/status b/tests/lx86/proc/self/status
new file mode 100644
index 0000000..b7dff97
--- /dev/null
+++ b/tests/lx86/proc/self/status
@@ -0,0 +1,36 @@
+Name: cat
+State: R (running)
+SleepAVG: 78%
+Tgid: 12404
+Pid: 12404
+PPid: 7182
+TracerPid: 0
+Uid: 0 0 0 0
+Gid: 0 0 0 0
+FDSize: 8192
+Groups: 0 1 2 3 4 6 10
+VmPeak: 89280 kB
+VmSize: 89280 kB
+VmLck: 0 kB
+VmHWM: 17152 kB
+VmRSS: 17152 kB
+VmData: 12928 kB
+VmStk: 1408 kB
+VmExe: 553650368 kB
+VmLib: 18446744073155908992 kB
+VmPTE: 256 kB
+StaBrk: 0804e000 kB
+Brk: 0806f000 kB
+StaStk: bffe0000 kB
+Threads: 1
+SigQ: 1/14784
+SigPnd: 0000000000000000
+ShdPnd: 0000000000000000
+SigBlk: 0000000000000000
+SigIgn: 0000000000000000
+SigCgt: 40000000418004fc
+CapInh: 0000000000000000
+CapPrm: 00000000fffffeff
+CapEff: 00000000fffffeff
+Cpus_allowed: 00000000,00000000,00000000,0000000f
+Mems_allowed: 0001
diff --git a/tests/lx86/sbin/dmidecode b/tests/lx86/sbin/dmidecode
new file mode 100755
index 0000000..381ca08
--- /dev/null
+++ b/tests/lx86/sbin/dmidecode
@@ -0,0 +1,5 @@
+#!/bin/sh -
+cat <<'EOF'
+# dmidecode 2.7
+# No SMBIOS nor DMI entry point found, sorry.
+EOF
diff --git a/tests/lx86/sbin/id b/tests/lx86/sbin/id
new file mode 100755
index 0000000..6c704ac
--- /dev/null
+++ b/tests/lx86/sbin/id
@@ -0,0 +1,2 @@
+#!/bin/sh -
+echo 0
diff --git a/tests/lx86/sbin/virt-what-cpuid-helper b/tests/lx86/sbin/virt-what-cpuid-helper
new file mode 100755
index 0000000..cc0c3c5
--- /dev/null
+++ b/tests/lx86/sbin/virt-what-cpuid-helper
@@ -0,0 +1,8 @@
+#!/bin/sh -
+echo ""
+echo ""
+echo ""
+echo ""
+echo ""
+echo ""
+echo ""
diff --git a/tests/test-lx86.sh b/tests/test-lx86.sh
new file mode 100755
index 0000000..69d08a7
--- /dev/null
+++ b/tests/test-lx86.sh
@@ -0,0 +1,35 @@
+# Test for IBM PowerVM Lx86 emulator.
+# Data supplied by Yufang Zhang.
+# Copyright (C) 2011 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+root=tests/lx86
+
+output="$(./virt-what --test-root=$root 2>&1)"
+expected="powervm_lx86"
+
+if [ "$output" != "$expected" ]; then
+ echo "$0: test failed because output did not match expected"
+ echo "Expected output was:"
+ echo "----------------------------------------"
+ echo "$expected"
+ echo "----------------------------------------"
+ echo "But the actual output of the program was:"
+ echo "----------------------------------------"
+ echo "$output"
+ echo "----------------------------------------"
+ exit 1
+fi
diff --git a/virt-what.pod b/virt-what.pod
index 99547c0..4304297 100644
--- a/virt-what.pod
+++ b/virt-what.pod
@@ -95,7 +95,8 @@ Status: contributed by Justin Clift
The guest is running inside IBM PowerVM Lx86 Linux/x86 emulator.
-Status: data supplied by Jeffrey Scheel, not confirmed
+Status: data originally supplied by Jeffrey Scheel, confimed by
+Yufang Zhang and RWMJ
=item B<qemu>