* [kvm-unit-tests] arm: Replace the obsolete qemu script
@ 2023-03-01 7:17 Shaoqin Huang
2023-03-01 12:50 ` Andrew Jones
0 siblings, 1 reply; 6+ messages in thread
From: Shaoqin Huang @ 2023-03-01 7:17 UTC (permalink / raw)
To: kvmarm; +Cc: Shaoqin Huang, Andrew Jones, open list:ARM
The qemu script used to detect the testdev is obsoleted, replace it
with the modern way to detect if testdev exists.
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
echo "$qemu doesn't support chr-testdev. Exiting."
exit 2
fi
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests] arm: Replace the obsolete qemu script
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
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Jones @ 2023-03-01 12:50 UTC (permalink / raw)
To: Shaoqin Huang; +Cc: kvmarm, open list:ARM
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'
> echo "$qemu doesn't support chr-testdev. Exiting."
> exit 2
> fi
> --
> 2.39.1
>
Thanks,
drew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests] arm: Replace the obsolete qemu script
2023-03-01 12:50 ` Andrew Jones
@ 2023-03-02 2:45 ` Shaoqin Huang
2023-03-02 10:09 ` Shaoqin Huang
1 sibling, 0 replies; 6+ messages in thread
From: Shaoqin Huang @ 2023-03-02 2:45 UTC (permalink / raw)
To: Andrew Jones; +Cc: kvmarm, open list:ARM
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?
Hi drew,
This way was introduced by 517b3d4016 (chardev: Add 'help' option to
print all available chardev backend types). Which the QEMU verison is
v2.7.50.
>
>>
>> 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'
Thanks for advice. I will change it.
>
>> echo "$qemu doesn't support chr-testdev. Exiting."
>> exit 2
>> fi
>> --
>> 2.39.1
>>
>
> Thanks,
> drew
>
--
Shaoqin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests] arm: Replace the obsolete qemu script
2023-03-01 12:50 ` Andrew Jones
2023-03-02 2:45 ` Shaoqin Huang
@ 2023-03-02 10:09 ` Shaoqin Huang
2023-03-02 11:52 ` Andrew Jones
1 sibling, 1 reply; 6+ messages in thread
From: Shaoqin Huang @ 2023-03-02 10:09 UTC (permalink / raw)
To: Andrew Jones; +Cc: kvmarm, open list:ARM
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests] arm: Replace the obsolete qemu script
2023-03-02 10:09 ` Shaoqin Huang
@ 2023-03-02 11:52 ` Andrew Jones
2023-03-02 12:12 ` Shaoqin Huang
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Jones @ 2023-03-02 11:52 UTC (permalink / raw)
To: Shaoqin Huang; +Cc: kvmarm, open list:ARM
On Thu, Mar 02, 2023 at 06:09:36PM +0800, Shaoqin Huang wrote:
> 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.
Yup.
Also, unrelated, but can you change your patch prefix to
kvm-unit-tests PATCH
as suggested in the README? My filters are looking for 'PATCH'.
Thanks,
drew
>
> Thanks,
>
> > > echo "$qemu doesn't support chr-testdev. Exiting."
> > > exit 2
> > > fi
> > > --
> > > 2.39.1
> > >
> >
> > Thanks,
> > drew
> >
>
> --
> Shaoqin
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-unit-tests] arm: Replace the obsolete qemu script
2023-03-02 11:52 ` Andrew Jones
@ 2023-03-02 12:12 ` Shaoqin Huang
0 siblings, 0 replies; 6+ messages in thread
From: Shaoqin Huang @ 2023-03-02 12:12 UTC (permalink / raw)
To: Andrew Jones; +Cc: kvmarm, open list:ARM
On 3/2/23 19:52, Andrew Jones wrote:
> On Thu, Mar 02, 2023 at 06:09:36PM +0800, Shaoqin Huang wrote:
>> 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.
>
> Yup.
>
> Also, unrelated, but can you change your patch prefix to
>
> kvm-unit-tests PATCH
>
> as suggested in the README? My filters are looking for 'PATCH'.
>
Hi drew,
My bad. Has update it.
Thanks,
Shaoqin
> Thanks,
> drew
>
>>
>> Thanks,
>>
>>>> echo "$qemu doesn't support chr-testdev. Exiting."
>>>> exit 2
>>>> fi
>>>> --
>>>> 2.39.1
>>>>
>>>
>>> Thanks,
>>> drew
>>>
>>
>> --
>> Shaoqin
>>
>
--
Shaoqin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-02 12:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-03-02 11:52 ` Andrew Jones
2023-03-02 12:12 ` Shaoqin Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox