From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386)
Date: Tue, 20 Aug 2024 01:14:31 +0200 [thread overview]
Message-ID: <20240819231434.1481576-2-sbrivio@redhat.com> (raw)
In-Reply-To: <20240819231434.1481576-1-sbrivio@redhat.com>
It's qemu-system-i386, but uname -m reports i686. I didn't test i486
and i586.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
test/lib/setup | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/test/lib/setup b/test/lib/setup
index 9b39b9f..58371bd 100755
--- a/test/lib/setup
+++ b/test/lib/setup
@@ -17,6 +17,8 @@ INITRAMFS="${BASEPATH}/mbuto.img"
VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )"
__mem_kib="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)"
VMEM="$((${__mem_kib} / 1024 / 4))"
+QEMU_ARCH="$(uname -m)"
+[ "${QEMU_ARCH}" = "i686" ] && QEMU_ARCH=i386
# setup_build() - Set up pane layout for build tests
setup_build() {
@@ -53,7 +55,7 @@ setup_passt() {
wait_for [ -f "${STATESETUP}/passt.pid" ]
GUEST_CID=94557
- context_run_bg qemu 'qemu-system-$(uname -m)' \
+ context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \
' -machine accel=kvm' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
@@ -148,7 +150,7 @@ setup_passt_in_ns() {
wait_for [ -f "${STATESETUP}/passt.pid" ]
GUEST_CID=94557
- context_run_bg qemu 'qemu-system-$(uname -m)' \
+ context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \
' -machine accel=kvm' \
' -M accel=kvm:tcg' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
@@ -220,7 +222,7 @@ setup_two_guests() {
wait_for [ -f "${STATESETUP}/passt_2.pid" ]
GUEST_1_CID=94557
- context_run_bg qemu_1 'qemu-system-$(uname -m)' \
+ context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}" \
' -M accel=kvm:tcg' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
@@ -233,7 +235,7 @@ setup_two_guests() {
" -device vhost-vsock-pci,guest-cid=$GUEST_1_CID"
GUEST_2_CID=94558
- context_run_bg qemu_2 'qemu-system-$(uname -m)' \
+ context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}" \
' -M accel=kvm:tcg' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
--
@@ -17,6 +17,8 @@ INITRAMFS="${BASEPATH}/mbuto.img"
VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )"
__mem_kib="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)"
VMEM="$((${__mem_kib} / 1024 / 4))"
+QEMU_ARCH="$(uname -m)"
+[ "${QEMU_ARCH}" = "i686" ] && QEMU_ARCH=i386
# setup_build() - Set up pane layout for build tests
setup_build() {
@@ -53,7 +55,7 @@ setup_passt() {
wait_for [ -f "${STATESETUP}/passt.pid" ]
GUEST_CID=94557
- context_run_bg qemu 'qemu-system-$(uname -m)' \
+ context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \
' -machine accel=kvm' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
@@ -148,7 +150,7 @@ setup_passt_in_ns() {
wait_for [ -f "${STATESETUP}/passt.pid" ]
GUEST_CID=94557
- context_run_bg qemu 'qemu-system-$(uname -m)' \
+ context_run_bg qemu 'qemu-system-'"${QEMU_ARCH}" \
' -machine accel=kvm' \
' -M accel=kvm:tcg' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
@@ -220,7 +222,7 @@ setup_two_guests() {
wait_for [ -f "${STATESETUP}/passt_2.pid" ]
GUEST_1_CID=94557
- context_run_bg qemu_1 'qemu-system-$(uname -m)' \
+ context_run_bg qemu_1 'qemu-system-'"${QEMU_ARCH}" \
' -M accel=kvm:tcg' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
@@ -233,7 +235,7 @@ setup_two_guests() {
" -device vhost-vsock-pci,guest-cid=$GUEST_1_CID"
GUEST_2_CID=94558
- context_run_bg qemu_2 'qemu-system-$(uname -m)' \
+ context_run_bg qemu_2 'qemu-system-'"${QEMU_ARCH}" \
' -M accel=kvm:tcg' \
' -m '${VMEM}' -cpu host -smp '${VCPUS} \
' -kernel ' "/boot/vmlinuz-$(uname -r)" \
--
2.43.0
next prev parent reply other threads:[~2024-08-19 23:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 23:14 [PATCH 0/4] Assorted test fixes for i386/i686 and OpenSSH 9.8 Stefano Brivio
2024-08-19 23:14 ` Stefano Brivio [this message]
2024-08-20 0:45 ` [PATCH 1/4] test/lib/setup: Transform i686 kernel architecture name into QEMU name (i386) David Gibson
2024-08-19 23:14 ` [PATCH 2/4] test/passt.mbuto: Run sshd from vsock proxy with absolute path Stefano Brivio
2024-08-20 0:45 ` David Gibson
2024-08-19 23:14 ` [PATCH 3/4] test/passt.mbuto: Install sshd-session OpenSSH's split process Stefano Brivio
2024-08-20 0:46 ` David Gibson
2024-08-26 6:41 ` David Gibson
2024-08-26 7:55 ` Stefano Brivio
2024-08-26 8:21 ` David Gibson
2024-08-19 23:14 ` [PATCH 4/4] test: Duplicate existing recvfrom() valgrind suppression for recv() Stefano Brivio
2024-08-20 0:46 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240819231434.1481576-2-sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).