TESTS = \
tests/test-baremetal.sh \
- tests/test-esx4.1.sh
-# tests/test-kvm.sh \
-# tests/test-qemu.sh \
+ tests/test-esx4.1.sh \
+ tests/test-kvm.sh \
+ tests/test-qemu.sh
# tests/test-virtualbox.sh \
# tests/test-xen-dom0.sh \
# tests/test-xen-domU.sh
--- /dev/null
+processor : 0
+vendor_id : GenuineIntel
+cpu family : 6
+model : 2
+model name : QEMU Virtual CPU version 0.13.0
+stepping : 3
+cpu MHz : 2660.156
+cache size : 4096 KB
+fpu : yes
+fpu_exception : yes
+cpuid level : 4
+wp : yes
+flags : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good unfair_spinlock pni cx16 popcnt hypervisor lahf_lm
+bogomips : 5320.31
+clflush size : 64
+cache_alignment : 64
+address sizes : 40 bits physical, 48 bits virtual
+power management:
+
--- /dev/null
+#!/bin/sh -
+cat <<'EOF'
+# dmidecode 2.10
+SMBIOS 2.4 present.
+10 structures occupying 263 bytes.
+Table at 0x3FFFFEF0.
+
+Handle 0x0000, DMI type 0, 24 bytes
+BIOS Information
+ Vendor: Bochs
+ Version: Bochs
+ Release Date: 01/01/2007
+ Address: 0xE8000
+ Runtime Size: 96 kB
+ ROM Size: 64 kB
+ Characteristics:
+ BIOS characteristics not supported
+ Targeted content distribution is supported
+ BIOS Revision: 1.0
+
+Handle 0x0100, DMI type 1, 27 bytes
+System Information
+ Manufacturer: Bochs
+ Product Name: Bochs
+ Version: Not Specified
+ Serial Number: Not Specified
+ UUID: 7061F170-D1CF-6F48-6770-984E8D171011
+ Wake-up Type: Power Switch
+ SKU Number: Not Specified
+ Family: Not Specified
+
+Handle 0x0300, DMI type 3, 20 bytes
+Chassis Information
+ Manufacturer: Bochs
+ Type: Other
+ Lock: Not Present
+ Version: Not Specified
+ Serial Number: Not Specified
+ Asset Tag: Not Specified
+ Boot-up State: Safe
+ Power Supply State: Safe
+ Thermal State: Safe
+ Security Status: Unknown
+ OEM Information: 0x00000000
+ Height: Unspecified
+ Number Of Power Cords: Unspecified
+
+Handle 0x0401, DMI type 4, 32 bytes
+Processor Information
+ Socket Designation: CPU01
+ Type: Central Processor
+ Family: Other
+ Manufacturer: Bochs
+ ID: 23 06 00 00 FD FB 8B 07
+ Version: Not Specified
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: 2000 MHz
+ Current Speed: 2000 MHz
+ Status: Populated, Enabled
+ Upgrade: Other
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+
+Handle 0x1000, DMI type 16, 15 bytes
+Physical Memory Array
+ Location: Other
+ Use: System Memory
+ Error Correction Type: Multi-bit ECC
+ Maximum Capacity: 1 GB
+ Error Information Handle: Not Provided
+ Number Of Devices: 1
+
+Handle 0x1100, DMI type 17, 21 bytes
+Memory Device
+ Array Handle: 0x1000
+ Error Information Handle: 0x0000
+ Total Width: 64 bits
+ Data Width: 64 bits
+ Size: 1024 MB
+ Form Factor: DIMM
+ Set: None
+ Locator: DIMM 0
+ Bank Locator: Not Specified
+ Type: RAM
+ Type Detail: None
+
+Handle 0x1300, DMI type 19, 15 bytes
+Memory Array Mapped Address
+ Starting Address: 0x00000000000
+ Ending Address: 0x0003FFFFFFF
+ Range Size: 1 GB
+ Physical Array Handle: 0x1000
+ Partition Width: 0
+
+Handle 0x1400, DMI type 20, 19 bytes
+Memory Device Mapped Address
+ Starting Address: 0x00000000000
+ Ending Address: 0x0003FFFFFFF
+ Range Size: 1 GB
+ Physical Device Handle: 0x1100
+ Memory Array Mapped Address Handle: 0x1300
+ Partition Row Position: 1
+
+Handle 0x2000, DMI type 32, 11 bytes
+System Boot Information
+ Status: No errors detected
+
+Handle 0x7F00, DMI type 127, 4 bytes
+End Of Table
+
+EOF
--- /dev/null
+#!/bin/sh -
+echo 0
--- /dev/null
+#!/bin/sh -
+echo KVMKVMKVM
--- /dev/null
+processor : 0
+vendor_id : AuthenticAMD
+cpu family : 6
+model : 2
+model name : QEMU Virtual CPU version 0.13.0
+stepping : 3
+cpu MHz : 2659.401
+cache size : 512 KB
+fpu : yes
+fpu_exception : yes
+cpuid level : 4
+wp : yes
+flags : fpu pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up unfair_spinlock pni cx16 popcnt hypervisor lahf_lm svm abm sse4a
+bogomips : 5318.80
+TLB size : 1024 4K pages
+clflush size : 64
+cache_alignment : 64
+address sizes : 40 bits physical, 48 bits virtual
+power management:
+
--- /dev/null
+#!/bin/sh -
+cat <<'EOF'
+# dmidecode 2.10
+SMBIOS 2.4 present.
+10 structures occupying 263 bytes.
+Table at 0x3FFFFEF0.
+
+Handle 0x0000, DMI type 0, 24 bytes
+BIOS Information
+ Vendor: Bochs
+ Version: Bochs
+ Release Date: 01/01/2007
+ Address: 0xE8000
+ Runtime Size: 96 kB
+ ROM Size: 64 kB
+ Characteristics:
+ BIOS characteristics not supported
+ Targeted content distribution is supported
+ BIOS Revision: 1.0
+
+Handle 0x0100, DMI type 1, 27 bytes
+System Information
+ Manufacturer: Bochs
+ Product Name: Bochs
+ Version: Not Specified
+ Serial Number: Not Specified
+ UUID: 7061F170-D1CF-6F48-6770-984E8D171011
+ Wake-up Type: Power Switch
+ SKU Number: Not Specified
+ Family: Not Specified
+
+Handle 0x0300, DMI type 3, 20 bytes
+Chassis Information
+ Manufacturer: Bochs
+ Type: Other
+ Lock: Not Present
+ Version: Not Specified
+ Serial Number: Not Specified
+ Asset Tag: Not Specified
+ Boot-up State: Safe
+ Power Supply State: Safe
+ Thermal State: Safe
+ Security Status: Unknown
+ OEM Information: 0x00000000
+ Height: Unspecified
+ Number Of Power Cords: Unspecified
+
+Handle 0x0401, DMI type 4, 32 bytes
+Processor Information
+ Socket Designation: CPU01
+ Type: Central Processor
+ Family: Other
+ Manufacturer: Bochs
+ ID: 23 06 00 00 F9 FB 8B 07
+ Version: Not Specified
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: 2000 MHz
+ Current Speed: 2000 MHz
+ Status: Populated, Enabled
+ Upgrade: Other
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+
+Handle 0x1000, DMI type 16, 15 bytes
+Physical Memory Array
+ Location: Other
+ Use: System Memory
+ Error Correction Type: Multi-bit ECC
+ Maximum Capacity: 1 GB
+ Error Information Handle: Not Provided
+ Number Of Devices: 1
+
+Handle 0x1100, DMI type 17, 21 bytes
+Memory Device
+ Array Handle: 0x1000
+ Error Information Handle: 0x0000
+ Total Width: 64 bits
+ Data Width: 64 bits
+ Size: 1024 MB
+ Form Factor: DIMM
+ Set: None
+ Locator: DIMM 0
+ Bank Locator: Not Specified
+ Type: RAM
+ Type Detail: None
+
+Handle 0x1300, DMI type 19, 15 bytes
+Memory Array Mapped Address
+ Starting Address: 0x00000000000
+ Ending Address: 0x0003FFFFFFF
+ Range Size: 1 GB
+ Physical Array Handle: 0x1000
+ Partition Width: 0
+
+Handle 0x1400, DMI type 20, 19 bytes
+Memory Device Mapped Address
+ Starting Address: 0x00000000000
+ Ending Address: 0x0003FFFFFFF
+ Range Size: 1 GB
+ Physical Device Handle: 0x1100
+ Memory Array Mapped Address Handle: 0x1300
+ Partition Row Position: 1
+
+Handle 0x2000, DMI type 32, 11 bytes
+System Boot Information
+ Status: No errors detected
+
+Handle 0x7F00, DMI type 127, 4 bytes
+End Of Table
+
+EOF
--- /dev/null
+#!/bin/sh -
+echo 0
--- /dev/null
+#!/bin/sh -
+# For reasons that are genuinely unknown, virt-what-cpuid-helper
+# in a qemu guest prints out a '?' character.
+echo '?'
--- /dev/null
+# Test for KVM
+# Copyright (C) 2008-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/kvm
+
+output="$(./virt-what --test-root=$root 2>&1)"
+expected="kvm"
+
+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
--- /dev/null
+# Test for qemu
+# Copyright (C) 2008-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/qemu
+
+output="$(./virt-what --test-root=$root 2>&1)"
+expected="qemu"
+
+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