|
|
6f448a |
From f25e07d43db40355b321493f78758ea058fa3849 Mon Sep 17 00:00:00 2001
|
|
|
6f448a |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
6f448a |
Date: Wed, 31 Oct 2018 15:23:45 +0000
|
|
|
fcf72c |
Subject: [PATCH 13/22] aws: Add regression test for AWS on KVM on ARM
|
|
|
6f448a |
architecture.
|
|
|
6f448a |
|
|
|
6f448a |
---
|
|
|
6f448a |
Makefile.am | 1 +
|
|
|
6f448a |
tests/aws-kvm-arm/proc/cpuinfo | 9 +++
|
|
|
6f448a |
tests/aws-kvm-arm/proc/self/status | 54 +++++++++++++++
|
|
|
6f448a |
tests/aws-kvm-arm/sbin/dmidecode | 68 +++++++++++++++++++
|
|
|
6f448a |
tests/aws-kvm-arm/sbin/uname | 2 +
|
|
|
6f448a |
tests/aws-kvm-arm/sbin/virt-what-cpuid-helper | 2 +
|
|
|
6f448a |
tests/test-aws-kvm-arm.sh | 36 ++++++++++
|
|
|
6f448a |
7 files changed, 172 insertions(+)
|
|
|
6f448a |
create mode 100644 tests/aws-kvm-arm/proc/cpuinfo
|
|
|
6f448a |
create mode 100644 tests/aws-kvm-arm/proc/self/status
|
|
|
6f448a |
create mode 100755 tests/aws-kvm-arm/sbin/dmidecode
|
|
|
6f448a |
create mode 100755 tests/aws-kvm-arm/sbin/uname
|
|
|
6f448a |
create mode 100755 tests/aws-kvm-arm/sbin/virt-what-cpuid-helper
|
|
|
6f448a |
create mode 100755 tests/test-aws-kvm-arm.sh
|
|
|
6f448a |
|
|
|
6f448a |
diff --git a/Makefile.am b/Makefile.am
|
|
|
6f448a |
index 22680a0..67502fc 100644
|
|
|
6f448a |
--- a/Makefile.am
|
|
|
6f448a |
+++ b/Makefile.am
|
|
|
6f448a |
@@ -40,6 +40,7 @@ endif
|
|
|
6f448a |
|
|
|
6f448a |
TESTS = \
|
|
|
6f448a |
tests/test-aws-baremetal-x86.sh \
|
|
|
6f448a |
+ tests/test-aws-kvm-arm.sh \
|
|
|
6f448a |
tests/test-aws-kvm-x86.sh \
|
|
|
6f448a |
tests/test-aws-xen-x86.sh \
|
|
|
6f448a |
tests/test-baremetal.sh \
|
|
|
6f448a |
diff --git a/tests/aws-kvm-arm/proc/cpuinfo b/tests/aws-kvm-arm/proc/cpuinfo
|
|
|
6f448a |
new file mode 100644
|
|
|
6f448a |
index 0000000..bc5a5bb
|
|
|
6f448a |
--- /dev/null
|
|
|
6f448a |
+++ b/tests/aws-kvm-arm/proc/cpuinfo
|
|
|
6f448a |
@@ -0,0 +1,9 @@
|
|
|
6f448a |
+processor : 0
|
|
|
6f448a |
+BogoMIPS : 166.66
|
|
|
6f448a |
+Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
|
|
|
6f448a |
+CPU implementer : 0x41
|
|
|
6f448a |
+CPU architecture: 8
|
|
|
6f448a |
+CPU variant : 0x0
|
|
|
6f448a |
+CPU part : 0xd08
|
|
|
6f448a |
+CPU revision : 3
|
|
|
6f448a |
+
|
|
|
6f448a |
diff --git a/tests/aws-kvm-arm/proc/self/status b/tests/aws-kvm-arm/proc/self/status
|
|
|
6f448a |
new file mode 100644
|
|
|
6f448a |
index 0000000..121a8cc
|
|
|
6f448a |
--- /dev/null
|
|
|
6f448a |
+++ b/tests/aws-kvm-arm/proc/self/status
|
|
|
6f448a |
@@ -0,0 +1,54 @@
|
|
|
6f448a |
+Name: cat
|
|
|
6f448a |
+Umask: 0022
|
|
|
6f448a |
+State: R (running)
|
|
|
6f448a |
+Tgid: 17874
|
|
|
6f448a |
+Ngid: 0
|
|
|
6f448a |
+Pid: 17874
|
|
|
6f448a |
+PPid: 9992
|
|
|
6f448a |
+TracerPid: 0
|
|
|
6f448a |
+Uid: 0 0 0 0
|
|
|
6f448a |
+Gid: 0 0 0 0
|
|
|
6f448a |
+FDSize: 256
|
|
|
6f448a |
+Groups: 0
|
|
|
6f448a |
+NStgid: 17874
|
|
|
6f448a |
+NSpid: 17874
|
|
|
6f448a |
+NSpgid: 17874
|
|
|
6f448a |
+NSsid: 9992
|
|
|
6f448a |
+VmPeak: 109760 kB
|
|
|
6f448a |
+VmSize: 109760 kB
|
|
|
6f448a |
+VmLck: 0 kB
|
|
|
6f448a |
+VmPin: 0 kB
|
|
|
6f448a |
+VmHWM: 832 kB
|
|
|
6f448a |
+VmRSS: 832 kB
|
|
|
6f448a |
+RssAnon: 448 kB
|
|
|
6f448a |
+RssFile: 384 kB
|
|
|
6f448a |
+RssShmem: 0 kB
|
|
|
6f448a |
+VmData: 384 kB
|
|
|
6f448a |
+VmStk: 192 kB
|
|
|
6f448a |
+VmExe: 64 kB
|
|
|
6f448a |
+VmLib: 1664 kB
|
|
|
6f448a |
+VmPTE: 192 kB
|
|
|
6f448a |
+VmPMD: 128 kB
|
|
|
6f448a |
+VmSwap: 0 kB
|
|
|
6f448a |
+HugetlbPages: 0 kB
|
|
|
6f448a |
+Threads: 1
|
|
|
6f448a |
+SigQ: 0/1470
|
|
|
6f448a |
+SigPnd: 0000000000000000
|
|
|
6f448a |
+ShdPnd: 0000000000000000
|
|
|
6f448a |
+SigBlk: 0000000000000000
|
|
|
6f448a |
+SigIgn: 0000000000000000
|
|
|
6f448a |
+SigCgt: 0000000000000000
|
|
|
6f448a |
+CapInh: 0000000000000000
|
|
|
6f448a |
+CapPrm: 0000003fffffffff
|
|
|
6f448a |
+CapEff: 0000003fffffffff
|
|
|
6f448a |
+CapBnd: 0000003fffffffff
|
|
|
6f448a |
+CapAmb: 0000000000000000
|
|
|
6f448a |
+NoNewPrivs: 0
|
|
|
6f448a |
+Seccomp: 0
|
|
|
6f448a |
+Speculation Store Bypass: unknown
|
|
|
6f448a |
+Cpus_allowed: 1
|
|
|
6f448a |
+Cpus_allowed_list: 0
|
|
|
6f448a |
+Mems_allowed: 1
|
|
|
6f448a |
+Mems_allowed_list: 0
|
|
|
6f448a |
+voluntary_ctxt_switches: 0
|
|
|
6f448a |
+nonvoluntary_ctxt_switches: 0
|
|
|
6f448a |
diff --git a/tests/aws-kvm-arm/sbin/dmidecode b/tests/aws-kvm-arm/sbin/dmidecode
|
|
|
6f448a |
new file mode 100755
|
|
|
6f448a |
index 0000000..d126758
|
|
|
6f448a |
--- /dev/null
|
|
|
6f448a |
+++ b/tests/aws-kvm-arm/sbin/dmidecode
|
|
|
6f448a |
@@ -0,0 +1,68 @@
|
|
|
6f448a |
+#!/bin/sh -
|
|
|
6f448a |
+cat <<'EOF'
|
|
|
6f448a |
+# dmidecode 3.1
|
|
|
6f448a |
+Getting SMBIOS data from sysfs.
|
|
|
6f448a |
+SMBIOS 2.7 present.
|
|
|
6f448a |
+5 structures occupying 233 bytes.
|
|
|
6f448a |
+Table at 0x7F780000.
|
|
|
6f448a |
+
|
|
|
6f448a |
+Handle 0x0000, DMI type 0, 24 bytes
|
|
|
6f448a |
+BIOS Information
|
|
|
6f448a |
+ Vendor: Amazon EC2
|
|
|
6f448a |
+ Version: 1.0
|
|
|
6f448a |
+ Release Date: 12/1/2018
|
|
|
6f448a |
+ Address: 0xF0000
|
|
|
6f448a |
+ Runtime Size: 64 kB
|
|
|
6f448a |
+ ROM Size: 64 kB
|
|
|
6f448a |
+ Characteristics:
|
|
|
6f448a |
+ PCI is supported
|
|
|
6f448a |
+ EDD is supported
|
|
|
6f448a |
+ ACPI is supported
|
|
|
6f448a |
+ System is a virtual machine
|
|
|
6f448a |
+ BIOS Revision: 1.0
|
|
|
6f448a |
+
|
|
|
6f448a |
+Handle 0x0001, DMI type 1, 27 bytes
|
|
|
6f448a |
+System Information
|
|
|
6f448a |
+ Manufacturer: Amazon EC2
|
|
|
6f448a |
+ Product Name: a1.medium
|
|
|
6f448a |
+ Version: Not Specified
|
|
|
6f448a |
+ Serial Number: ec2ce86a-12c2-9388-d9b0-8dc833cba752
|
|
|
6f448a |
+ UUID: ec2ce86a-12c2-9388-d9b0-8dc833cba752
|
|
|
6f448a |
+ Wake-up Type: Power Switch
|
|
|
6f448a |
+ SKU Number: Not Specified
|
|
|
6f448a |
+ Family: Not Specified
|
|
|
6f448a |
+
|
|
|
6f448a |
+Handle 0x0002, DMI type 2, 15 bytes
|
|
|
6f448a |
+Base Board Information
|
|
|
6f448a |
+ Manufacturer: Amazon EC2
|
|
|
6f448a |
+ Product Name: Not Specified
|
|
|
6f448a |
+ Version: Not Specified
|
|
|
6f448a |
+ Serial Number: Not Specified
|
|
|
6f448a |
+ Asset Tag: i-01c1b85d3dcc02ed7
|
|
|
6f448a |
+ Features: None
|
|
|
6f448a |
+ Location In Chassis: Not Specified
|
|
|
6f448a |
+ Chassis Handle: 0x0003
|
|
|
6f448a |
+ Type: Other
|
|
|
6f448a |
+ Contained Object Handles: 0
|
|
|
6f448a |
+
|
|
|
6f448a |
+Handle 0x0003, DMI type 3, 21 bytes
|
|
|
6f448a |
+Chassis Information
|
|
|
6f448a |
+ Manufacturer: Amazon EC2
|
|
|
6f448a |
+ Type: Other
|
|
|
6f448a |
+ Lock: Not Present
|
|
|
6f448a |
+ Version: Not Specified
|
|
|
6f448a |
+ Serial Number: Not Specified
|
|
|
6f448a |
+ Asset Tag: Amazon EC2
|
|
|
6f448a |
+ Boot-up State: Safe
|
|
|
6f448a |
+ Power Supply State: Safe
|
|
|
6f448a |
+ Thermal State: Safe
|
|
|
6f448a |
+ Security Status: None
|
|
|
6f448a |
+ OEM Information: 0x00000000
|
|
|
6f448a |
+ Height: Unspecified
|
|
|
6f448a |
+ Number Of Power Cords: 1
|
|
|
6f448a |
+ Contained Elements: 0
|
|
|
6f448a |
+
|
|
|
6f448a |
+Handle 0xFEFF, DMI type 127, 4 bytes
|
|
|
6f448a |
+End Of Table
|
|
|
6f448a |
+
|
|
|
6f448a |
+EOF
|
|
|
6f448a |
diff --git a/tests/aws-kvm-arm/sbin/uname b/tests/aws-kvm-arm/sbin/uname
|
|
|
6f448a |
new file mode 100755
|
|
|
6f448a |
index 0000000..bd33a2d
|
|
|
6f448a |
--- /dev/null
|
|
|
6f448a |
+++ b/tests/aws-kvm-arm/sbin/uname
|
|
|
6f448a |
@@ -0,0 +1,2 @@
|
|
|
6f448a |
+#!/bin/sh -
|
|
|
6f448a |
+echo aarch64
|
|
|
6f448a |
diff --git a/tests/aws-kvm-arm/sbin/virt-what-cpuid-helper b/tests/aws-kvm-arm/sbin/virt-what-cpuid-helper
|
|
|
6f448a |
new file mode 100755
|
|
|
6f448a |
index 0000000..4475399
|
|
|
6f448a |
--- /dev/null
|
|
|
6f448a |
+++ b/tests/aws-kvm-arm/sbin/virt-what-cpuid-helper
|
|
|
6f448a |
@@ -0,0 +1,2 @@
|
|
|
6f448a |
+#!/bin/sh -
|
|
|
6f448a |
+# prints nothing but exits successfully
|
|
|
6f448a |
diff --git a/tests/test-aws-kvm-arm.sh b/tests/test-aws-kvm-arm.sh
|
|
|
6f448a |
new file mode 100755
|
|
|
6f448a |
index 0000000..8875421
|
|
|
6f448a |
--- /dev/null
|
|
|
6f448a |
+++ b/tests/test-aws-kvm-arm.sh
|
|
|
6f448a |
@@ -0,0 +1,36 @@
|
|
|
6f448a |
+# Test for AWS.
|
|
|
6f448a |
+# Copyright (C) 2018 Red Hat Inc.
|
|
|
6f448a |
+#
|
|
|
6f448a |
+# This program is free software; you can redistribute it and/or modify
|
|
|
6f448a |
+# it under the terms of the GNU General Public License as published by
|
|
|
6f448a |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
6f448a |
+# (at your option) any later version.
|
|
|
6f448a |
+#
|
|
|
6f448a |
+# This program is distributed in the hope that it will be useful,
|
|
|
6f448a |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
6f448a |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
6f448a |
+# GNU General Public License for more details.
|
|
|
6f448a |
+#
|
|
|
6f448a |
+# You should have received a copy of the GNU General Public License
|
|
|
6f448a |
+# along with this program; if not, write to the Free Software
|
|
|
6f448a |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
6f448a |
+
|
|
|
6f448a |
+root=tests/aws-kvm-arm
|
|
|
6f448a |
+
|
|
|
6f448a |
+output="$(./virt-what --test-root=$root 2>&1)"
|
|
|
6f448a |
+# XXX At the moment KVM cannot be detected on this platform.
|
|
|
6f448a |
+# We hope to fix that, but for now the only fact printed is "aws".
|
|
|
6f448a |
+expected="aws"
|
|
|
6f448a |
+
|
|
|
6f448a |
+if [ "$output" != "$expected" ]; then
|
|
|
6f448a |
+ echo "$0: test failed because output did not match expected"
|
|
|
6f448a |
+ echo "Expected output was:"
|
|
|
6f448a |
+ echo "----------------------------------------"
|
|
|
6f448a |
+ echo "$expected"
|
|
|
6f448a |
+ echo "----------------------------------------"
|
|
|
6f448a |
+ echo "But the actual output of the program was:"
|
|
|
6f448a |
+ echo "----------------------------------------"
|
|
|
6f448a |
+ echo "$output"
|
|
|
6f448a |
+ echo "----------------------------------------"
|
|
|
6f448a |
+ exit 1
|
|
|
6f448a |
+fi
|
|
|
6f448a |
--
|
|
|
fcf72c |
2.32.0
|
|
|
6f448a |
|