From: Shaoqin Huang <shahuang@redhat.com>
To: kvmarm@lists.linux.dev
Cc: Shaoqin Huang <shahuang@redhat.com>,
Andrew Jones <andrew.jones@linux.dev>,
kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH v2 2/2] arm: Clean up the run script
Date: Thu, 2 Mar 2023 23:10:52 -0500 [thread overview]
Message-ID: <20230303041052.176745-3-shahuang@redhat.com> (raw)
In-Reply-To: <20230303041052.176745-1-shahuang@redhat.com>
Using more simple bash command to clean up the run script.
No functional change intended.
Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
---
arm/run | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arm/run b/arm/run
index b918029..c6f25b8 100755
--- a/arm/run
+++ b/arm/run
@@ -28,7 +28,7 @@ fi
ACCEL=$accel
-if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then
+if ! $qemu -machine '?' | grep -q 'ARM Virtual Machine'; then
echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting."
exit 2
fi
@@ -36,7 +36,7 @@ fi
M='-machine virt'
if [ "$ACCEL" = "kvm" ]; then
- if $qemu $M,\? 2>&1 | grep gic-version > /dev/null; then
+ if $qemu $M,\? | grep -q gic-version; then
M+=',gic-version=host'
fi
fi
@@ -54,7 +54,7 @@ if [ "$ARCH" = "arm" ]; then
M+=",highmem=off"
fi
-if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then
+if ! $qemu $M -device '?' | grep -q virtconsole; then
echo "$qemu doesn't support virtio-console for chr-testdev. Exiting."
exit 2
fi
@@ -68,7 +68,7 @@ chr_testdev='-device virtio-serial-device'
chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd'
pci_testdev=
-if $qemu $M -device '?' 2>&1 | grep pci-testdev > /dev/null; then
+if $qemu $M -device '?' | grep -q pci-testdev; then
pci_testdev="-device pci-testdev"
fi
--
2.39.1
next prev parent reply other threads:[~2023-03-03 4:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 4:10 [kvm-unit-tests PATCH v2 0/2] Clean up the arm/run script Shaoqin Huang
2023-03-03 4:10 ` [kvm-unit-tests PATCH v2 1/2] arm: Replace the obsolete qemu script Shaoqin Huang
2023-03-03 4:10 ` Shaoqin Huang [this message]
2023-03-21 15:41 ` [kvm-unit-tests PATCH v2 0/2] Clean up the arm/run script Andrew Jones
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=20230303041052.176745-3-shahuang@redhat.com \
--to=shahuang@redhat.com \
--cc=andrew.jones@linux.dev \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
/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.
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 NNTP newsgroup(s).