public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaoqin Huang <shahuang@redhat.com>
To: Andrew Jones <andrew.jones@linux.dev>
Cc: kvmarm@lists.linux.dev, "open list:ARM" <kvm@vger.kernel.org>
Subject: Re: [kvm-unit-tests] arm: Replace the obsolete qemu script
Date: Thu, 2 Mar 2023 18:09:36 +0800	[thread overview]
Message-ID: <5b019bd3-cc57-017a-e0f6-bf9ebc97ad11@redhat.com> (raw)
In-Reply-To: <20230301125004.d5giadtz4yaqdjam@orel>

Hi drew,

On 3/1/23 20:50, Andrew Jones wrote:
> On Wed, Mar 01, 2023 at 02:17:37AM -0500, Shaoqin Huang wrote:
>> The qemu script used to detect the testdev is obsoleted, replace it
>> with the modern way to detect if testdev exists.
> 
> Hi Shaoqin,
> 
> Can you please point out the oldest QEMU version for which the modern
> way works?
> 
>>
>> Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
>> ---
>>   arm/run | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arm/run b/arm/run
>> index 1284891..9800cfb 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 '?' 2>&1 | grep testdev > /dev/null; then
>                                ^ This shouldn't be necessary. afaict,
> 			        only stdio is used
> 
> We can change the 'grep testdev >/dev/null' to 'grep -q testdev'
> 

This just remind me if we could also change

if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then

to

if ! $qemu $M -device '?' | grep -q virtconsole; then

And all other place like that.

Thanks,

>>   	echo "$qemu doesn't support chr-testdev. Exiting."
>>   	exit 2
>>   fi
>> -- 
>> 2.39.1
>>
> 
> Thanks,
> drew
> 

-- 
Shaoqin


  parent reply	other threads:[~2023-03-02 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  7:17 [kvm-unit-tests] arm: Replace the obsolete qemu script Shaoqin Huang
2023-03-01 12:50 ` Andrew Jones
2023-03-02  2:45   ` Shaoqin Huang
2023-03-02 10:09   ` Shaoqin Huang [this message]
2023-03-02 11:52     ` Andrew Jones
2023-03-02 12:12       ` Shaoqin Huang

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=5b019bd3-cc57-017a-e0f6-bf9ebc97ad11@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