diff mbox series

[kvm-unit-tests,v2,1/2] arm: Replace the obsolete qemu script

Message ID 20230303041052.176745-2-shahuang@redhat.com (mailing list archive)
State New, archived
Headers show
Series Clean up the arm/run script | expand

Commit Message

Shaoqin Huang March 3, 2023, 4:10 a.m. UTC
The qemu script used to detect the testdev is obsoleted, replace it
with the modern way to detect if testdev exists which was first
introduced at QEMU v2.7.50 by:
517b3d4016 (chardev: Add 'help' option to print all available chardev backend types).

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
---
 arm/run | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arm/run b/arm/run
index 1284891..b918029 100755
--- a/arm/run
+++ b/arm/run
@@ -59,8 +59,7 @@  if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then
 	exit 2
 fi
 
-if $qemu $M -chardev testdev,id=id -initrd . 2>&1 \
-		| grep backend > /dev/null; then
+if ! $qemu $M -chardev '?' | grep -q testdev; then
 	echo "$qemu doesn't support chr-testdev. Exiting."
 	exit 2
 fi