The package rpms/qemu-sanity-check.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/qemu-sanity-check.git/commit/?id=....
Change:
+ExclusiveArch: %{kernel_arches}
Thanks.
Full change:
============
commit 004332dc372a1f9e042dd7433a6d7680b69ef4a2
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Fri Sep 25 10:56:42 2020 +0100
Add some upstream patches to fix aarch64 tests.
Enable tests on aarch64.
diff --git a/0001-tests-run-qemu-sanity-check-Add-v-flag-for-verbose-m.patch
b/0001-tests-run-qemu-sanity-check-Add-v-flag-for-verbose-m.patch
new file mode 100644
index 0000000..97feec8
--- /dev/null
+++ b/0001-tests-run-qemu-sanity-check-Add-v-flag-for-verbose-m.patch
@@ -0,0 +1,24 @@
+From 3b6b45488513dfb2c2a871d020dee532eb89714d Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones(a)redhat.com>
+Date: Fri, 25 Sep 2020 09:38:36 +0100
+Subject: [PATCH 1/4] tests: run-qemu-sanity-check: Add -v flag for verbose
+ messages.
+
+Useful when debugging test failures.
+---
+ run-qemu-sanity-check | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/run-qemu-sanity-check b/run-qemu-sanity-check
+index 65039ce..79745e5 100755
+--- a/run-qemu-sanity-check
++++ b/run-qemu-sanity-check
+@@ -17,4 +17,4 @@
+ # with this program; if not, write to the Free Software Foundation, Inc.,
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+-./qemu-sanity-check --initrd=./initrd "$@"
++./qemu-sanity-check -v --initrd=./initrd "$@"
+--
+2.28.0.rc2
+
diff --git a/0002-Add-cpu-option.patch b/0002-Add-cpu-option.patch
new file mode 100644
index 0000000..80347fc
--- /dev/null
+++ b/0002-Add-cpu-option.patch
@@ -0,0 +1,104 @@
+From 0460bb87b6fba08fb5df8056cc3fb67ffa8e8080 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones(a)redhat.com>
+Date: Fri, 25 Sep 2020 09:45:30 +0100
+Subject: [PATCH 2/4] Add --cpu option.
+
+If not set, then pick a more suitable default for aarch64.
+---
+ qemu-sanity-check.in | 32 +++++++++++++++++++++++++++-----
+ qemu-sanity-check.pod.in | 6 ++++++
+ 2 files changed, 33 insertions(+), 5 deletions(-)
+
+diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in
+index 72257a8..5a3594a 100644
+--- a/qemu-sanity-check.in
++++ b/qemu-sanity-check.in
+@@ -27,13 +27,25 @@ canonical_arch="$(uname -m | sed
's/i[456]86/i386/')"
+ verbose=no
+ timeout=10m
+ accel=kvm:tcg
++cpu=
++machine=
+
+-# Default machine type depends on arch. You can override this using
+-# -m|--machine option.
++# Both libguestfs and virt-manager choose cpu=host when we think that
++# KVM is available, and default otherwise. Although testing for KVM
++# is hairy, I found that on aarch64 it can fail unless we choose
++# cpu=host for KVM.
++if test -r /dev/kvm; then
++ cpu=host
++fi
++
++# Default machine and CPU type depends on arch. You can override this
++# using -m|--machine and --cpu options.
+ case "$canonical_arch" in
+- arm*|aarch*) machine=virt ;;
+- # On non-ARM let qemu pick the default.
+- *) machine= ;;
++ arm*)
++ machine=virt ;;
++ aarch*)
++ if [ "$cpu" = "" ]; then cpu=cortex-a57; fi
++ machine=virt ;;
+ esac
+
+ # Handle command line parsing.
+@@ -43,6 +55,7 @@ function usage {
+ echo "Options:"
+ echo " --help Display this help"
+ echo " --accel=[kvm|tcg] Force KVM or software emulation"
++ echo " --cpu=cpu Set CPU"
+ echo " -i|--initrd=initrd Set location of initramfs"
+ echo " -k|--kernel=vmlinuz Set location of kernel"
+ echo " -m|--machine=machine Set machine type"
+@@ -57,6 +70,7 @@ TEMP=$(getopt \
+ -o i:k:m:q:t:vV \
+ --long help \
+ --long accel: \
++ --long cpu: \
+ --long initrd: \
+ --long kernel: \
+ --long machine: \
+@@ -77,6 +91,10 @@ while true; do
+ accel="$2"
+ shift 2
+ ;;
++ --cpu)
++ cpu="$2"
++ shift 2
++ ;;
+ -i|--initrd)
+ initrd="$2"
+ shift 2
+@@ -167,6 +185,10 @@ argv[$((i++))]="-no-user-config"
+ argv[$((i++))]="-nodefaults"
+ argv[$((i++))]="-machine"
+ argv[$((i++))]="$machine${machine:+,}accel=$accel"
++if [ "$cpu" != "" ]; then
++ argv[$((i++))]="-cpu"
++ argv[$((i++))]="$cpu"
++fi
+ argv[$((i++))]="-no-reboot"
+ argv[$((i++))]="-serial"
+ argv[$((i++))]="file:$test_output"
+diff --git a/qemu-sanity-check.pod.in b/qemu-sanity-check.pod.in
+index 8bf1d4b..7ef3200 100644
+--- a/qemu-sanity-check.pod.in
++++ b/qemu-sanity-check.pod.in
+@@ -78,6 +78,12 @@ Other typical values of this parameter are: C<tcg>, which means
to
+ force software emulation. C<kvm>, which means to force KVM and fail
+ if KVM is unavailable.
+
++=item B<--cpu>=CPU
++
++Set the qemu I<--cpu> option. If not set then a suitable default is
++picked depending on the architecture and whether KVM is available.
++You can also use I<--cpu=> to let qemu pick the default.
++
+ =item B<-i> INITRD
+
+ =item B<--initrd>=INITRD
+--
+2.28.0.rc2
+
diff --git a/0003-Set-RAM-to-something-larger-than-qemu-default.patch
b/0003-Set-RAM-to-something-larger-than-qemu-default.patch
new file mode 100644
index 0000000..b4e928e
--- /dev/null
+++ b/0003-Set-RAM-to-something-larger-than-qemu-default.patch
@@ -0,0 +1,37 @@
+From 6331d12bc4814a27579b96acc299314d278be4dc Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones(a)redhat.com>
+Date: Fri, 25 Sep 2020 10:00:23 +0100
+Subject: [PATCH 3/4] Set RAM to something larger than qemu default.
+
+The qemu default is quite small - 128MB - so may be unsuitable on many
+architectures even though we are only booting a kernel and trivial
+initrd. It's better to set this to something more normal, and in case
+we don't use the extra RAM it won't make any difference.
+---
+ qemu-sanity-check.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in
+index 5a3594a..5066ebc 100644
+--- a/qemu-sanity-check.in
++++ b/qemu-sanity-check.in
+@@ -28,6 +28,7 @@ verbose=no
+ timeout=10m
+ accel=kvm:tcg
+ cpu=
++memory=768
+ machine=
+
+ # Both libguestfs and virt-manager choose cpu=host when we think that
+@@ -189,6 +190,8 @@ if [ "$cpu" != "" ]; then
+ argv[$((i++))]="-cpu"
+ argv[$((i++))]="$cpu"
+ fi
++argv[$((i++))]="-m"
++argv[$((i++))]="$memory"
+ argv[$((i++))]="-no-reboot"
+ argv[$((i++))]="-serial"
+ argv[$((i++))]="file:$test_output"
+--
+2.28.0.rc2
+
diff --git a/0004-Set-console-on-ARM-and-s390.patch
b/0004-Set-console-on-ARM-and-s390.patch
new file mode 100644
index 0000000..22d11dc
--- /dev/null
+++ b/0004-Set-console-on-ARM-and-s390.patch
@@ -0,0 +1,48 @@
+From 897c61498660017e91b16acc6817f99fc09cf39e Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones(a)redhat.com>
+Date: Fri, 25 Sep 2020 10:01:33 +0100
+Subject: [PATCH 4/4] Set console on ARM and s390.
+
+---
+ qemu-sanity-check.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in
+index 5066ebc..79372ed 100644
+--- a/qemu-sanity-check.in
++++ b/qemu-sanity-check.in
+@@ -29,6 +29,7 @@ timeout=10m
+ accel=kvm:tcg
+ cpu=
+ memory=768
++console=ttyS0
+ machine=
+
+ # Both libguestfs and virt-manager choose cpu=host when we think that
+@@ -43,10 +44,14 @@ fi
+ # using -m|--machine and --cpu options.
+ case "$canonical_arch" in
+ arm*)
++ console=ttyAMA0
+ machine=virt ;;
+ aarch*)
++ console=ttyAMA0
+ if [ "$cpu" = "" ]; then cpu=cortex-a57; fi
+ machine=virt ;;
++ s390*)
++ console=ttysclp0 ;;
+ esac
+
+ # Handle command line parsing.
+@@ -200,7 +205,7 @@ argv[$((i++))]="$kernel"
+ argv[$((i++))]="-initrd"
+ argv[$((i++))]="$initrd"
+ argv[$((i++))]="-append"
+-argv[$((i++))]="console=ttyS0 oops=panic panic=-1"
++argv[$((i++))]="console=$console oops=panic panic=-1"
+
+ if [ "$verbose" = "yes" ]; then
+ echo "${argv[@]}"
+--
+2.28.0.rc2
+
diff --git a/qemu-sanity-check.spec b/qemu-sanity-check.spec
index e978015..97c4d96 100644
--- a/qemu-sanity-check.spec
+++ b/qemu-sanity-check.spec
@@ -7,13 +7,11 @@
#
# 2020-09: armv7 failed with:
# ./qemu-sanity-check: cannot find a Linux kernel in /boot
-#
-# 2020-09: aarch64 hangs.
-%global test_arches %{s390x} x86_64
+%global test_arches aarch64 %{s390x} x86_64
Name: qemu-sanity-check
Version: 1.1.6
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Simple qemu and Linux kernel sanity checker
License: GPLv2+
@@ -25,6 +23,12 @@ Source1:
http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}
# Keyring used to verify tarball signature.
Source2: libguestfs.keyring
+# Patches (all upstream).
+Patch1: 0001-tests-run-qemu-sanity-check-Add-v-flag-for-verbose-m.patch
+Patch2: 0002-Add-cpu-option.patch
+Patch3: 0003-Set-RAM-to-something-larger-than-qemu-default.patch
+Patch4: 0004-Set-console-on-ARM-and-s390.patch
+
# To verify the tarball signature.
BuildRequires: gnupg2
@@ -142,6 +146,10 @@ make DESTDIR=$RPM_BUILD_ROOT install
%changelog
+* Fri Sep 25 2020 Richard W.M. Jones <rjones(a)redhat.com> - 1.1.6-2
+- Add some upstream patches to fix aarch64 tests.
+- Enable tests on aarch64.
+
* Thu Sep 10 2020 Richard W.M. Jones <rjones(a)redhat.com> - 1.1.6-1
- New upstream version 1.1.6.
- Remove all patches.
commit b2bde86cec19fe20629a670a5ce69803b6fc2ac1
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Fri Sep 25 10:55:36 2020 +0100
Fix indentation.
diff --git a/qemu-sanity-check.spec b/qemu-sanity-check.spec
index 2978393..e978015 100644
--- a/qemu-sanity-check.spec
+++ b/qemu-sanity-check.spec
@@ -11,17 +11,17 @@
# 2020-09: aarch64 hangs.
%global test_arches %{s390x} x86_64
-Name: qemu-sanity-check
-Version: 1.1.6
-Release: 1%{?dist}
-Summary: Simple qemu and Linux kernel sanity checker
-License: GPLv2+
+Name: qemu-sanity-check
+Version: 1.1.6
+Release: 1%{?dist}
+Summary: Simple qemu and Linux kernel sanity checker
+License: GPLv2+
-ExclusiveArch: %{kernel_arches}
+ExclusiveArch: %{kernel_arches}
-URL:
http://people.redhat.com/~rjones/qemu-sanity-check
-Source0:
http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}-%{versio...
-Source1:
http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}-%{versio...
+URL:
http://people.redhat.com/~rjones/qemu-sanity-check
+Source0:
http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}-%{versio...
+Source1:
http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}-%{versio...
# Keyring used to verify tarball signature.
Source2: libguestfs.keyring
@@ -34,44 +34,44 @@ BuildRequires: gcc
BuildRequires: /usr/bin/perldoc
# For building the initramfs.
-BuildRequires: cpio
-BuildRequires: glibc-static
+BuildRequires: cpio
+BuildRequires: glibc-static
# For testing.
-BuildRequires: qemu
-BuildRequires: kernel
+BuildRequires: qemu
+BuildRequires: kernel
# For complicated reasons, this is required so that
# /bin/kernel-install puts the kernel directly into /boot, instead of
# into a /boot/<machine-id> subdirectory (in Fedora >= 23). Read the
# kernel-install script to understand why.
-BuildRequires: grubby
+BuildRequires: grubby
%ifarch %{ix86} x86_64
-Requires: qemu-system-x86
-%global qemu %{_bindir}/qemu-system-x86_64
+Requires: qemu-system-x86
+%global qemu %{_bindir}/qemu-system-x86_64
%endif
%ifarch armv7hl
-Requires: qemu-system-arm
-%global qemu %{_bindir}/qemu-system-arm
+Requires: qemu-system-arm
+%global qemu %{_bindir}/qemu-system-arm
%endif
%ifarch aarch64
-Requires: qemu-system-aarch64
-%global qemu %{_bindir}/qemu-system-aarch64
+Requires: qemu-system-aarch64
+%global qemu %{_bindir}/qemu-system-aarch64
%endif
%ifarch %{power64}
-Requires: qemu-system-ppc
-%global qemu %{_bindir}/qemu-system-ppc64
+Requires: qemu-system-ppc
+%global qemu %{_bindir}/qemu-system-ppc64
%endif
%ifarch %{s390x}
-Requires: qemu-system-s390x
-%global qemu %{_bindir}/qemu-system-s390x
+Requires: qemu-system-s390x
+%global qemu %{_bindir}/qemu-system-s390x
%endif
-Requires: kernel
+Requires: kernel
# Require the -nodeps subpackage.
-Requires: %{name}-nodeps = %{version}-%{release}
+Requires: %{name}-nodeps = %{version}-%{release}
%description