|
|
90b589 |
From 350291e1ca417eab9d2aa2408589f0259cac007c Mon Sep 17 00:00:00 2001
|
|
|
90b589 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
90b589 |
Date: Wed, 31 Oct 2018 15:23:45 +0000
|
|
|
c18f13 |
Subject: [PATCH 12/22] aws: Add regression test for AWS on Xen on x86_64
|
|
|
90b589 |
architecture.
|
|
|
90b589 |
|
|
|
90b589 |
---
|
|
|
90b589 |
Makefile.am | 6 +
|
|
|
90b589 |
tests/aws-xen-x86/proc/cpuinfo | 52 +++++++
|
|
|
90b589 |
tests/aws-xen-x86/proc/self/status | 46 ++++++
|
|
|
90b589 |
tests/aws-xen-x86/sbin/dmidecode | 135 ++++++++++++++++++
|
|
|
90b589 |
tests/aws-xen-x86/sbin/uname | 2 +
|
|
|
90b589 |
tests/aws-xen-x86/sbin/virt-what-cpuid-helper | 2 +
|
|
|
90b589 |
tests/test-aws-xen-x86.sh | 36 +++++
|
|
|
90b589 |
7 files changed, 279 insertions(+)
|
|
|
90b589 |
create mode 100644 tests/aws-xen-x86/proc/cpuinfo
|
|
|
90b589 |
create mode 100644 tests/aws-xen-x86/proc/self/status
|
|
|
90b589 |
create mode 100755 tests/aws-xen-x86/sbin/dmidecode
|
|
|
90b589 |
create mode 100755 tests/aws-xen-x86/sbin/uname
|
|
|
90b589 |
create mode 100755 tests/aws-xen-x86/sbin/virt-what-cpuid-helper
|
|
|
90b589 |
create mode 100755 tests/test-aws-xen-x86.sh
|
|
|
90b589 |
|
|
|
90b589 |
diff --git a/Makefile.am b/Makefile.am
|
|
|
90b589 |
index ad47097..22680a0 100644
|
|
|
90b589 |
--- a/Makefile.am
|
|
|
90b589 |
+++ b/Makefile.am
|
|
|
90b589 |
@@ -41,6 +41,7 @@ endif
|
|
|
90b589 |
TESTS = \
|
|
|
90b589 |
tests/test-aws-baremetal-x86.sh \
|
|
|
90b589 |
tests/test-aws-kvm-x86.sh \
|
|
|
90b589 |
+ tests/test-aws-xen-x86.sh \
|
|
|
90b589 |
tests/test-baremetal.sh \
|
|
|
90b589 |
tests/test-bhyve.sh \
|
|
|
90b589 |
tests/test-docker.sh \
|
|
|
90b589 |
@@ -85,6 +86,11 @@ EXTRA_DIST = \
|
|
|
90b589 |
tests/aws-kvm-x86/sbin/dmidecode \
|
|
|
90b589 |
tests/aws-kvm-x86/sbin/uname \
|
|
|
90b589 |
tests/aws-kvm-x86/sbin/virt-what-cpuid-helper \
|
|
|
90b589 |
+ tests/aws-xen-x86/proc/cpuinfo \
|
|
|
90b589 |
+ tests/aws-xen-x86/proc/self/status \
|
|
|
90b589 |
+ tests/aws-xen-x86/sbin/dmidecode \
|
|
|
90b589 |
+ tests/aws-xen-x86/sbin/uname \
|
|
|
90b589 |
+ tests/aws-xen-x86/sbin/virt-what-cpuid-helper \
|
|
|
90b589 |
tests/baremetal/proc/cpuinfo \
|
|
|
90b589 |
tests/baremetal/proc/self/status \
|
|
|
90b589 |
tests/baremetal/sbin/dmidecode \
|
|
|
90b589 |
diff --git a/tests/aws-xen-x86/proc/cpuinfo b/tests/aws-xen-x86/proc/cpuinfo
|
|
|
90b589 |
new file mode 100644
|
|
|
90b589 |
index 0000000..ff0b16b
|
|
|
90b589 |
--- /dev/null
|
|
|
90b589 |
+++ b/tests/aws-xen-x86/proc/cpuinfo
|
|
|
90b589 |
@@ -0,0 +1,52 @@
|
|
|
90b589 |
+processor : 0
|
|
|
90b589 |
+vendor_id : GenuineIntel
|
|
|
90b589 |
+cpu family : 6
|
|
|
90b589 |
+model : 63
|
|
|
90b589 |
+model name : Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
|
|
|
90b589 |
+stepping : 2
|
|
|
90b589 |
+microcode : 0x3c
|
|
|
90b589 |
+cpu MHz : 2900.281
|
|
|
90b589 |
+cache size : 25600 KB
|
|
|
90b589 |
+physical id : 0
|
|
|
90b589 |
+siblings : 2
|
|
|
90b589 |
+core id : 0
|
|
|
90b589 |
+cpu cores : 1
|
|
|
90b589 |
+apicid : 0
|
|
|
90b589 |
+initial apicid : 0
|
|
|
90b589 |
+fpu : yes
|
|
|
90b589 |
+fpu_exception : yes
|
|
|
90b589 |
+cpuid level : 13
|
|
|
90b589 |
+wp : yes
|
|
|
90b589 |
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
|
|
|
90b589 |
+bogomips : 5800.06
|
|
|
90b589 |
+clflush size : 64
|
|
|
90b589 |
+cache_alignment : 64
|
|
|
90b589 |
+address sizes : 46 bits physical, 48 bits virtual
|
|
|
90b589 |
+power management:
|
|
|
90b589 |
+
|
|
|
90b589 |
+processor : 1
|
|
|
90b589 |
+vendor_id : GenuineIntel
|
|
|
90b589 |
+cpu family : 6
|
|
|
90b589 |
+model : 63
|
|
|
90b589 |
+model name : Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
|
|
|
90b589 |
+stepping : 2
|
|
|
90b589 |
+microcode : 0x3c
|
|
|
90b589 |
+cpu MHz : 2900.281
|
|
|
90b589 |
+cache size : 25600 KB
|
|
|
90b589 |
+physical id : 0
|
|
|
90b589 |
+siblings : 2
|
|
|
90b589 |
+core id : 0
|
|
|
90b589 |
+cpu cores : 1
|
|
|
90b589 |
+apicid : 1
|
|
|
90b589 |
+initial apicid : 1
|
|
|
90b589 |
+fpu : yes
|
|
|
90b589 |
+fpu_exception : yes
|
|
|
90b589 |
+cpuid level : 13
|
|
|
90b589 |
+wp : yes
|
|
|
90b589 |
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
|
|
|
90b589 |
+bogomips : 5800.06
|
|
|
90b589 |
+clflush size : 64
|
|
|
90b589 |
+cache_alignment : 64
|
|
|
90b589 |
+address sizes : 46 bits physical, 48 bits virtual
|
|
|
90b589 |
+power management:
|
|
|
90b589 |
+
|
|
|
90b589 |
diff --git a/tests/aws-xen-x86/proc/self/status b/tests/aws-xen-x86/proc/self/status
|
|
|
90b589 |
new file mode 100644
|
|
|
90b589 |
index 0000000..4e93816
|
|
|
90b589 |
--- /dev/null
|
|
|
90b589 |
+++ b/tests/aws-xen-x86/proc/self/status
|
|
|
90b589 |
@@ -0,0 +1,46 @@
|
|
|
90b589 |
+Name: cat
|
|
|
90b589 |
+Umask: 0022
|
|
|
90b589 |
+State: R (running)
|
|
|
90b589 |
+Tgid: 22828
|
|
|
90b589 |
+Ngid: 0
|
|
|
90b589 |
+Pid: 22828
|
|
|
90b589 |
+PPid: 17431
|
|
|
90b589 |
+TracerPid: 0
|
|
|
90b589 |
+Uid: 0 0 0 0
|
|
|
90b589 |
+Gid: 0 0 0 0
|
|
|
90b589 |
+FDSize: 256
|
|
|
90b589 |
+Groups: 0
|
|
|
90b589 |
+VmPeak: 107972 kB
|
|
|
90b589 |
+VmSize: 107972 kB
|
|
|
90b589 |
+VmLck: 0 kB
|
|
|
90b589 |
+VmPin: 0 kB
|
|
|
90b589 |
+VmHWM: 360 kB
|
|
|
90b589 |
+VmRSS: 360 kB
|
|
|
90b589 |
+RssAnon: 76 kB
|
|
|
90b589 |
+RssFile: 284 kB
|
|
|
90b589 |
+RssShmem: 0 kB
|
|
|
90b589 |
+VmData: 180 kB
|
|
|
90b589 |
+VmStk: 132 kB
|
|
|
90b589 |
+VmExe: 44 kB
|
|
|
90b589 |
+VmLib: 1936 kB
|
|
|
90b589 |
+VmPTE: 36 kB
|
|
|
90b589 |
+VmSwap: 0 kB
|
|
|
90b589 |
+Threads: 1
|
|
|
90b589 |
+SigQ: 0/14231
|
|
|
90b589 |
+SigPnd: 0000000000000000
|
|
|
90b589 |
+ShdPnd: 0000000000000000
|
|
|
90b589 |
+SigBlk: 0000000000000000
|
|
|
90b589 |
+SigIgn: 0000000000000000
|
|
|
90b589 |
+SigCgt: 0000000000000000
|
|
|
90b589 |
+CapInh: 0000000000000000
|
|
|
90b589 |
+CapPrm: 0000001fffffffff
|
|
|
90b589 |
+CapEff: 0000001fffffffff
|
|
|
90b589 |
+CapBnd: 0000001fffffffff
|
|
|
90b589 |
+CapAmb: 0000000000000000
|
|
|
90b589 |
+Seccomp: 0
|
|
|
90b589 |
+Cpus_allowed: 7fff
|
|
|
90b589 |
+Cpus_allowed_list: 0-14
|
|
|
90b589 |
+Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
|
|
|
90b589 |
+Mems_allowed_list: 0
|
|
|
90b589 |
+voluntary_ctxt_switches: 1
|
|
|
90b589 |
+nonvoluntary_ctxt_switches: 1
|
|
|
90b589 |
diff --git a/tests/aws-xen-x86/sbin/dmidecode b/tests/aws-xen-x86/sbin/dmidecode
|
|
|
90b589 |
new file mode 100755
|
|
|
90b589 |
index 0000000..bc9cde5
|
|
|
90b589 |
--- /dev/null
|
|
|
90b589 |
+++ b/tests/aws-xen-x86/sbin/dmidecode
|
|
|
90b589 |
@@ -0,0 +1,135 @@
|
|
|
90b589 |
+#!/bin/sh -
|
|
|
90b589 |
+cat <<'EOF'
|
|
|
90b589 |
+# dmidecode 3.0
|
|
|
90b589 |
+Getting SMBIOS data from sysfs.
|
|
|
90b589 |
+SMBIOS 2.7 present.
|
|
|
90b589 |
+12 structures occupying 398 bytes.
|
|
|
90b589 |
+Table at 0x000EB01F.
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x0000, DMI type 0, 24 bytes
|
|
|
90b589 |
+BIOS Information
|
|
|
90b589 |
+ Vendor: Xen
|
|
|
90b589 |
+ Version: 4.2.amazon
|
|
|
90b589 |
+ Release Date: 08/24/2006
|
|
|
90b589 |
+ Address: 0xE8000
|
|
|
90b589 |
+ Runtime Size: 96 kB
|
|
|
90b589 |
+ ROM Size: 64 kB
|
|
|
90b589 |
+ Characteristics:
|
|
|
90b589 |
+ PCI is supported
|
|
|
90b589 |
+ EDD is supported
|
|
|
90b589 |
+ Targeted content distribution is supported
|
|
|
90b589 |
+ BIOS Revision: 4.2
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x0100, DMI type 1, 27 bytes
|
|
|
90b589 |
+System Information
|
|
|
90b589 |
+ Manufacturer: Xen
|
|
|
90b589 |
+ Product Name: HVM domU
|
|
|
90b589 |
+ Version: 4.2.amazon
|
|
|
90b589 |
+ Serial Number: ec2f5c70-6dfc-83a7-f5ec-ef7b97aea4c9
|
|
|
90b589 |
+ UUID: EC2F5C70-6DFC-83A7-F5EC-EF7B97AEA4C9
|
|
|
90b589 |
+ Wake-up Type: Power Switch
|
|
|
90b589 |
+ SKU Number: Not Specified
|
|
|
90b589 |
+ Family: Not Specified
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x0300, DMI type 3, 13 bytes
|
|
|
90b589 |
+Chassis Information
|
|
|
90b589 |
+ Manufacturer: Xen
|
|
|
90b589 |
+ Type: Other
|
|
|
90b589 |
+ Lock: Not Present
|
|
|
90b589 |
+ Version: Not Specified
|
|
|
90b589 |
+ Serial Number: Not Specified
|
|
|
90b589 |
+ Asset Tag: Not Specified
|
|
|
90b589 |
+ Boot-up State: Safe
|
|
|
90b589 |
+ Power Supply State: Safe
|
|
|
90b589 |
+ Thermal State: Safe
|
|
|
90b589 |
+ Security Status: Unknown
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x0401, DMI type 4, 26 bytes
|
|
|
90b589 |
+Processor Information
|
|
|
90b589 |
+ Socket Designation: CPU 1
|
|
|
90b589 |
+ Type: Central Processor
|
|
|
90b589 |
+ Family: Other
|
|
|
90b589 |
+ Manufacturer: Intel
|
|
|
90b589 |
+ ID: F2 06 03 00 FF FB 89 17
|
|
|
90b589 |
+ Version: Not Specified
|
|
|
90b589 |
+ Voltage: Unknown
|
|
|
90b589 |
+ External Clock: Unknown
|
|
|
90b589 |
+ Max Speed: 2900 MHz
|
|
|
90b589 |
+ Current Speed: 2900 MHz
|
|
|
90b589 |
+ Status: Populated, Enabled
|
|
|
90b589 |
+ Upgrade: Other
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x0402, DMI type 4, 26 bytes
|
|
|
90b589 |
+Processor Information
|
|
|
90b589 |
+ Socket Designation: CPU 2
|
|
|
90b589 |
+ Type: Central Processor
|
|
|
90b589 |
+ Family: Other
|
|
|
90b589 |
+ Manufacturer: Intel
|
|
|
90b589 |
+ ID: F2 06 03 00 FF FB 89 17
|
|
|
90b589 |
+ Version: Not Specified
|
|
|
90b589 |
+ Voltage: Unknown
|
|
|
90b589 |
+ External Clock: Unknown
|
|
|
90b589 |
+ Max Speed: 2900 MHz
|
|
|
90b589 |
+ Current Speed: 2900 MHz
|
|
|
90b589 |
+ Status: Populated, Enabled
|
|
|
90b589 |
+ Upgrade: Other
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x0B00, DMI type 11, 5 bytes
|
|
|
90b589 |
+OEM Strings
|
|
|
90b589 |
+ String 1: Xen
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x1000, DMI type 16, 19 bytes
|
|
|
90b589 |
+Physical Memory Array
|
|
|
90b589 |
+ Location: Other
|
|
|
90b589 |
+ Use: System Memory
|
|
|
90b589 |
+ Error Correction Type: Multi-bit ECC
|
|
|
90b589 |
+ Maximum Capacity: 3840 MB
|
|
|
90b589 |
+ Error Information Handle: Not Provided
|
|
|
90b589 |
+ Number Of Devices: 1
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x1100, DMI type 17, 34 bytes
|
|
|
90b589 |
+Memory Device
|
|
|
90b589 |
+ Array Handle: 0x1000
|
|
|
90b589 |
+ Error Information Handle: 0x0000
|
|
|
90b589 |
+ Total Width: 64 bits
|
|
|
90b589 |
+ Data Width: 64 bits
|
|
|
90b589 |
+ Size: 3840 MB
|
|
|
90b589 |
+ Form Factor: DIMM
|
|
|
90b589 |
+ Set: None
|
|
|
90b589 |
+ Locator: DIMM 0
|
|
|
90b589 |
+ Bank Locator: Not Specified
|
|
|
90b589 |
+ Type: RAM
|
|
|
90b589 |
+ Type Detail: None
|
|
|
90b589 |
+ Speed: Unknown
|
|
|
90b589 |
+ Manufacturer: Not Specified
|
|
|
90b589 |
+ Serial Number: Not Specified
|
|
|
90b589 |
+ Asset Tag: Not Specified
|
|
|
90b589 |
+ Part Number: Not Specified
|
|
|
90b589 |
+ Rank: Unknown
|
|
|
90b589 |
+ Configured Clock Speed: Unknown
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x1300, DMI type 19, 31 bytes
|
|
|
90b589 |
+Memory Array Mapped Address
|
|
|
90b589 |
+ Starting Address: 0x00000000000
|
|
|
90b589 |
+ Ending Address: 0x000EFFFFFFF
|
|
|
90b589 |
+ Range Size: 3840 MB
|
|
|
90b589 |
+ Physical Array Handle: 0x1000
|
|
|
90b589 |
+ Partition Width: 1
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x1400, DMI type 20, 35 bytes
|
|
|
90b589 |
+Memory Device Mapped Address
|
|
|
90b589 |
+ Starting Address: 0x00000000000
|
|
|
90b589 |
+ Ending Address: 0x000EFFFFFFF
|
|
|
90b589 |
+ Range Size: 3840 MB
|
|
|
90b589 |
+ Physical Device Handle: 0x1100
|
|
|
90b589 |
+ Memory Array Mapped Address Handle: 0x1300
|
|
|
90b589 |
+ Partition Row Position: 1
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x2000, DMI type 32, 11 bytes
|
|
|
90b589 |
+System Boot Information
|
|
|
90b589 |
+ Status: No errors detected
|
|
|
90b589 |
+
|
|
|
90b589 |
+Handle 0x7F00, DMI type 127, 4 bytes
|
|
|
90b589 |
+End Of Table
|
|
|
90b589 |
+
|
|
|
90b589 |
+EOF
|
|
|
90b589 |
diff --git a/tests/aws-xen-x86/sbin/uname b/tests/aws-xen-x86/sbin/uname
|
|
|
90b589 |
new file mode 100755
|
|
|
90b589 |
index 0000000..ab0ec89
|
|
|
90b589 |
--- /dev/null
|
|
|
90b589 |
+++ b/tests/aws-xen-x86/sbin/uname
|
|
|
90b589 |
@@ -0,0 +1,2 @@
|
|
|
90b589 |
+#!/bin/sh -
|
|
|
90b589 |
+echo x86_64
|
|
|
90b589 |
diff --git a/tests/aws-xen-x86/sbin/virt-what-cpuid-helper b/tests/aws-xen-x86/sbin/virt-what-cpuid-helper
|
|
|
90b589 |
new file mode 100755
|
|
|
90b589 |
index 0000000..8d8df4a
|
|
|
90b589 |
--- /dev/null
|
|
|
90b589 |
+++ b/tests/aws-xen-x86/sbin/virt-what-cpuid-helper
|
|
|
90b589 |
@@ -0,0 +1,2 @@
|
|
|
90b589 |
+#!/bin/sh -
|
|
|
90b589 |
+echo XenVMMXenVMM
|
|
|
90b589 |
diff --git a/tests/test-aws-xen-x86.sh b/tests/test-aws-xen-x86.sh
|
|
|
90b589 |
new file mode 100755
|
|
|
90b589 |
index 0000000..22b7f83
|
|
|
90b589 |
--- /dev/null
|
|
|
90b589 |
+++ b/tests/test-aws-xen-x86.sh
|
|
|
90b589 |
@@ -0,0 +1,36 @@
|
|
|
90b589 |
+# Test for AWS.
|
|
|
90b589 |
+# Copyright (C) 2018 Red Hat Inc.
|
|
|
90b589 |
+#
|
|
|
90b589 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
90b589 |
+# it under the terms of the GNU General Public License as published by
|
|
|
90b589 |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
90b589 |
+# (at your option) any later version.
|
|
|
90b589 |
+#
|
|
|
90b589 |
+# This program is distributed in the hope that it will be useful,
|
|
|
90b589 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
90b589 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
90b589 |
+# GNU General Public License for more details.
|
|
|
90b589 |
+#
|
|
|
90b589 |
+# You should have received a copy of the GNU General Public License
|
|
|
90b589 |
+# along with this program; if not, write to the Free Software
|
|
|
90b589 |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
90b589 |
+
|
|
|
90b589 |
+root=tests/aws-xen-x86
|
|
|
90b589 |
+
|
|
|
90b589 |
+output="$(./virt-what --test-root=$root 2>&1)"
|
|
|
90b589 |
+expected="xen
|
|
|
90b589 |
+xen-hvm
|
|
|
90b589 |
+aws"
|
|
|
90b589 |
+
|
|
|
90b589 |
+if [ "$output" != "$expected" ]; then
|
|
|
90b589 |
+ echo "$0: test failed because output did not match expected"
|
|
|
90b589 |
+ echo "Expected output was:"
|
|
|
90b589 |
+ echo "----------------------------------------"
|
|
|
90b589 |
+ echo "$expected"
|
|
|
90b589 |
+ echo "----------------------------------------"
|
|
|
90b589 |
+ echo "But the actual output of the program was:"
|
|
|
90b589 |
+ echo "----------------------------------------"
|
|
|
90b589 |
+ echo "$output"
|
|
|
90b589 |
+ echo "----------------------------------------"
|
|
|
90b589 |
+ exit 1
|
|
|
90b589 |
+fi
|
|
|
90b589 |
--
|
|
|
c18f13 |
2.32.0
|
|
|
90b589 |
|