--- /dev/null
+#!/bin/sh -
+cat <<'EOF'
+# dmidecode 3.0
+Getting SMBIOS data from sysfs.
+SMBIOS 2.6 present.
+12 structures occupying 562 bytes.
+Table at 0x000F101F.
+
+Handle 0x0001, DMI type 0, 24 bytes
+BIOS Information
+ Vendor: BHYVE
+ Version: 1.00
+ Release Date: 03/14/2014
+ Address: 0xF0000
+ Runtime Size: 64 kB
+ ROM Size: 64 kB
+ Characteristics:
+ ISA is supported
+ PCI is supported
+ BIOS shadowing is allowed
+ Boot from CD is supported
+ EDD is supported
+ ACPI is supported
+ BIOS boot specification is supported
+ System is a virtual machine
+ BIOS Revision: 0.0
+
+Handle 0x0002, DMI type 1, 27 bytes
+System Information
+ Manufacturer:
+ Product Name: BHYVE
+ Version: 1.0
+ Serial Number: None
+ UUID: 5420C3C9-6963-5F33-A700-11604F0FCDF2
+ Wake-up Type: Power Switch
+ SKU Number: None
+ Family:
+
+Handle 0x0003, DMI type 3, 18 bytes
+Chassis Information
+ Manufacturer:
+ Type: Unknown
+ Lock: Not Present
+ Version: 1.0
+ Serial Number: None
+ Asset Tag: None
+ Boot-up State: Safe
+ Power Supply State: Safe
+ Thermal State: Safe
+ Security Status: None
+ OEM Information: 0x00000000
+
+Handle 0x0004, DMI type 4, 42 bytes
+Processor Information
+ Socket Designation: CPU #0
+ Type: Central Processor
+ Family: Other
+ Manufacturer:
+ ID: 00 00 00 00 00 00 00 00
+ Version:
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: Unknown
+ Current Speed: Unknown
+ Status: Populated, Enabled
+ Upgrade: None
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+ Serial Number: None
+ Asset Tag: None
+ Part Number: None
+ Characteristics:
+ 64-bit capable
+
+Handle 0x0005, DMI type 4, 42 bytes
+Processor Information
+ Socket Designation: CPU #1
+ Type: Central Processor
+ Family: Other
+ Manufacturer:
+ ID: 00 00 00 00 00 00 00 00
+ Version:
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: Unknown
+ Current Speed: Unknown
+ Status: Populated, Enabled
+ Upgrade: None
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+ Serial Number: None
+ Asset Tag: None
+ Part Number: None
+ Characteristics:
+ 64-bit capable
+
+Handle 0x0006, DMI type 4, 42 bytes
+Processor Information
+ Socket Designation: CPU #2
+ Type: Central Processor
+ Family: Other
+ Manufacturer:
+ ID: 00 00 00 00 00 00 00 00
+ Version:
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: Unknown
+ Current Speed: Unknown
+ Status: Populated, Enabled
+ Upgrade: None
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+ Serial Number: None
+ Asset Tag: None
+ Part Number: None
+ Characteristics:
+ 64-bit capable
+
+Handle 0x0007, DMI type 4, 42 bytes
+Processor Information
+ Socket Designation: CPU #3
+ Type: Central Processor
+ Family: Other
+ Manufacturer:
+ ID: 00 00 00 00 00 00 00 00
+ Version:
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: Unknown
+ Current Speed: Unknown
+ Status: Populated, Enabled
+ Upgrade: None
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+ Serial Number: None
+ Asset Tag: None
+ Part Number: None
+ Characteristics:
+ 64-bit capable
+
+Handle 0x0008, DMI type 16, 23 bytes
+Physical Memory Array
+ Location: System Board Or Motherboard
+ Use: System Memory
+ Error Correction Type: None
+ Maximum Capacity: 2 GB
+ Error Information Handle: No Error
+ Number Of Devices: 1
+
+Handle 0x0009, DMI type 17, 40 bytes
+Memory Device
+ Array Handle: 0x0007
+ Error Information Handle: No Error
+ Total Width: 64 bits
+ Data Width: 64 bits
+ Size: 0 TB
+ Form Factor: Unknown
+ Set: None
+ Locator:
+ Bank Locator:
+ Type: Unknown
+ Type Detail: Unknown
+ Speed: Unknown
+ Manufacturer:
+ Serial Number: None
+ Asset Tag: None
+ Part Number: None
+ Rank: Unknown
+ Configured Clock Speed: Unknown
+ Minimum Voltage: Unknown
+ Maximum Voltage: Unknown
+ Configured Voltage: Unknown
+
+Handle 0x000A, DMI type 19, 31 bytes
+Memory Array Mapped Address
+ Starting Address: 0x0000000000000000k
+ Ending Address: 0x0000000080000000k
+ Range Size: 2 GB
+ Physical Array Handle: 0x0007
+ Partition Width: 1
+
+Handle 0x000B, DMI type 32, 11 bytes
+System Boot Information
+ Status: No errors detected
+
+Handle 0x000C, DMI type 127, 4 bytes
+End Of Table
+
+EOF
--- /dev/null
+# Test for bhyve
+# 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/bhyve
+
+output="$(./virt-what --test-root=$root 2>&1)"
+expected="bhyve"
+
+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