From: Richard W.M. Jones Date: Mon, 24 Jan 2011 11:16:53 +0000 (+0000) Subject: Add a regression test for Parallels Desktop (thanks Justin Clift). X-Git-Tag: 1.8~5 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=32e195d1309e7060ba7ed9aa20f26bcbc4635c5a;p=virt-what.git Add a regression test for Parallels Desktop (thanks Justin Clift). --- diff --git a/Makefile.am b/Makefile.am index 6ee6271..3b94e2f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,6 +38,11 @@ EXTRA_DIST = \ tests/linux-vserver/sbin/dmidecode \ tests/linux-vserver/sbin/id \ tests/linux-vserver/sbin/virt-what-cpuid-helper \ + tests/parallels-desktop/proc/cpuinfo \ + tests/parallels-desktop/proc/self/status \ + tests/parallels-desktop/sbin/dmidecode \ + tests/parallels-desktop/sbin/id \ + tests/parallels-desktop/sbin/virt-what-cpuid-helper \ tests/qemu/proc/cpuinfo \ tests/qemu/proc/self/status \ tests/qemu/sbin/dmidecode \ @@ -106,6 +111,7 @@ EXTRA_DIST = \ tests/test-esx4.1.sh \ tests/test-kvm.sh \ tests/test-linux-vserver.sh \ + tests/test-parallels-desktop.sh \ tests/test-qemu.sh \ tests/test-rhel5-xen-dom0.sh \ tests/test-rhel5-xen-domU-hvm.sh \ @@ -133,6 +139,7 @@ TESTS = \ tests/test-esx4.1.sh \ tests/test-kvm.sh \ tests/test-linux-vserver.sh \ + tests/test-parallels-desktop.sh \ tests/test-qemu.sh \ tests/test-rhel5-xen-dom0.sh \ tests/test-rhel5-xen-domU-hvm.sh \ diff --git a/tests/parallels-desktop/proc/cpuinfo b/tests/parallels-desktop/proc/cpuinfo new file mode 100644 index 0000000..d8b21b8 --- /dev/null +++ b/tests/parallels-desktop/proc/cpuinfo @@ -0,0 +1,19 @@ +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 23 +model name : Intel(R) Core(TM)2 Extreme CPU X9650 @ 3.00GHz +stepping : 7 +cpu MHz : 3434.878 +cache size : 6144 KB +fpu : yes +fpu_exception : yes +cpuid level : 10 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc up arch_perfmon rep_good aperfmperf pni ssse3 cx16 sse4_1 x2apic hypervisor lahf_lm +bogomips : 6869.75 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual +power management: + diff --git a/tests/parallels-desktop/proc/self/status b/tests/parallels-desktop/proc/self/status new file mode 100644 index 0000000..adc0df7 --- /dev/null +++ b/tests/parallels-desktop/proc/self/status @@ -0,0 +1,39 @@ +Name: cat +State: R (running) +Tgid: 3278 +Pid: 3278 +PPid: 3235 +TracerPid: 0 +Uid: 0 0 0 0 +Gid: 0 0 0 0 +Utrace: 0 +FDSize: 256 +Groups: 0 1 2 3 4 6 10 +VmPeak: 101052 kB +VmSize: 101052 kB +VmLck: 0 kB +VmHWM: 480 kB +VmRSS: 480 kB +VmData: 184 kB +VmStk: 136 kB +VmExe: 44 kB +VmLib: 1772 kB +VmPTE: 48 kB +VmSwap: 0 kB +Threads: 1 +SigQ: 0/7851 +SigPnd: 0000000000000000 +ShdPnd: 0000000000000000 +SigBlk: 0000000000000000 +SigIgn: 0000000000000000 +SigCgt: 0000000000000000 +CapInh: 0000000000000000 +CapPrm: ffffffffffffffff +CapEff: ffffffffffffffff +CapBnd: ffffffffffffffff +Cpus_allowed: ffff +Cpus_allowed_list: 0-15 +Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 +Mems_allowed_list: 0 +voluntary_ctxt_switches: 0 +nonvoluntary_ctxt_switches: 0 diff --git a/tests/parallels-desktop/sbin/dmidecode b/tests/parallels-desktop/sbin/dmidecode new file mode 100755 index 0000000..f4af185 --- /dev/null +++ b/tests/parallels-desktop/sbin/dmidecode @@ -0,0 +1,249 @@ +#!/bin/sh - +cat <<'EOF' +# dmidecode 2.11 +SMBIOS 2.3 present. +20 structures occupying 896 bytes. +Table at 0x000F6120. + +Handle 0x0000, DMI type 0, 20 bytes +BIOS Information + Vendor: Parallels Software International Inc. + Version: 6.0.11992.625164 + Release Date: 10/26/2007 + Address: 0xF0000 + Runtime Size: 64 kB + ROM Size: 64 kB + Characteristics: + ISA is supported + PCI is supported + PNP is supported + APM is supported + VLB is supported + Boot from CD is supported + 8042 keyboard services are supported (int 9h) + Serial services are supported (int 14h) + Printer services are supported (int 17h) + CGA/mono video services are supported (int 10h) + ACPI is supported + +Handle 0x0001, DMI type 1, 25 bytes +System Information + Manufacturer: Parallels Software International Inc. + Product Name: Parallels Virtual Platform + Version: None + Serial Number: Parallels-E0 53 44 86 B1 45 41 31 8F 40 65 7A AF AD BE A1 + UUID: E0534486-B145-4131-8F40-657AAFADBEA1 + Wake-up Type: Power Switch + +Handle 0x0002, DMI type 2, 8 bytes +Base Board Information + Manufacturer: Parallels Software International Inc. + Product Name: Parallels Virtual Platform + Version: None + Serial Number: None + +Handle 0x0003, DMI type 3, 18 bytes +Chassis Information + Manufacturer: Parallels Software International Inc. + Type: Unknown + Lock: Not Present + Version: + Serial Number: + Asset Tag: + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Safe + Security Status: None + OEM Information: 0x00000000 + +Handle 0x0004, DMI type 4, 35 bytes +Processor Information + Socket Designation: CPU Socket #0 + Type: Central Processor + Family: Unknown + Manufacturer: GenuineIntel + ID: 77 06 01 00 FF FB EB BF + Version: Not Specified + Voltage: 3.3 V + External Clock: 572 MHz + Max Speed: 3435 MHz + Current Speed: 3435 MHz + Status: Populated, Enabled + Upgrade: Other + L1 Cache Handle: Not Provided + L2 Cache Handle: Not Provided + L3 Cache Handle: Not Provided + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x0005, DMI type 9, 13 bytes +System Slot Information + Designation: ISA slot 1 + Type: 16-bit ISA + Current Usage: Unknown + Length: Unknown + Characteristics: + 3.3 V is provided + +Handle 0x0006, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 1 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 1 + Characteristics: + 3.3 V is provided + +Handle 0x0007, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 2 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 2 + Characteristics: + 3.3 V is provided + +Handle 0x0008, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 3 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 3 + Characteristics: + 3.3 V is provided + +Handle 0x0009, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 4 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 4 + Characteristics: + 3.3 V is provided + +Handle 0x000A, DMI type 9, 13 bytes +System Slot Information + Designation: PCI slot 5 + Type: 32-bit PCI + Current Usage: Unknown + Length: Unknown + ID: 5 + Characteristics: + 3.3 V is provided + +Handle 0x000B, DMI type 10, 8 bytes +On Board Device 1 Information + Type: Video + Status: Disabled + Description: Parallels Video Adapter +On Board Device 2 Information + Type: Sound + Status: Disabled + Description: Parallels Sound Adapter + +Handle 0x000C, DMI type 16, 15 bytes +Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 8 GB + Error Information Handle: Not Provided + Number Of Devices: 4 + +Handle 0x000D, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: 1024 MB + Form Factor: DIMM + Set: None + Locator: DIMM #0 + Bank Locator: BANK #0 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x000E, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM #1 + Bank Locator: BANK #1 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x000F, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM #2 + Bank Locator: BANK #2 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x0010, DMI type 17, 27 bytes +Memory Device + Array Handle: 0x000C + Error Information Handle: Not Provided + Total Width: 32 bits + Data Width: 32 bits + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM #3 + Bank Locator: BANK #3 + Type: DRAM + Type Detail: EDO + Speed: 667 MHz + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + +Handle 0x0011, DMI type 19, 15 bytes +Memory Array Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x0003FFFFFFF + Range Size: 1 GB + Physical Array Handle: 0x000C + Partition Width: 2 + +Handle 0x0012, DMI type 32, 20 bytes +System Boot Information + Status: No errors detected + +Handle 0x0013, DMI type 127, 4 bytes +End Of Table + +EOF diff --git a/tests/parallels-desktop/sbin/id b/tests/parallels-desktop/sbin/id new file mode 100755 index 0000000..6c704ac --- /dev/null +++ b/tests/parallels-desktop/sbin/id @@ -0,0 +1,2 @@ +#!/bin/sh - +echo 0 diff --git a/tests/parallels-desktop/sbin/virt-what-cpuid-helper b/tests/parallels-desktop/sbin/virt-what-cpuid-helper new file mode 100755 index 0000000..e918937 --- /dev/null +++ b/tests/parallels-desktop/sbin/virt-what-cpuid-helper @@ -0,0 +1,3 @@ +#!/bin/sh - +# It's unknown why Parallels reports itself as KVM. +echo KVMKVMKVM diff --git a/tests/test-parallels-desktop.sh b/tests/test-parallels-desktop.sh new file mode 100755 index 0000000..647ae85 --- /dev/null +++ b/tests/test-parallels-desktop.sh @@ -0,0 +1,34 @@ +# Test for Parallels Desktop (data contributed by Justin Clift). +# 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/parallels-desktop + +output="$(./virt-what --test-root=$root 2>&1)" +expected="parallels" + +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