arm: Replace the obsolete qemu script
The qemu script used to detect the testdev is obsoleted, replace it with the modern way to detect if testdev exists.
--- arm/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arm/run +1 -2
@@ -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
Signature · 1 line
2.39.1
Quoted 2 lines · Shaoqin Huang
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?
Quoted 11 lines
Signed-off-by Shaoqin Huang <[email protected]>--- arm/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arm/run +0
-0
arm/run if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then · line 62
Quoted 6 lines
arm/run +1
-2@@ -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'
Quoted 6 lines
arm/run +0
-0echo "$qemu doesn't support chr-testdev. Exiting." exit 2 fiSignature · 1 line
2.39.1
Thanks,
drew
Quoted 8 lines · Andrew Jones
Quoted 2 lines · Shaoqin Huang
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.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Shaoqin Huang <[email protected]>--- arm/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arm/run +0
-0@@ -59,8 +59,7 @@ if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then exit 2 fi
Quoted 7 lines
arm/run if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then · line 62
Quoted 3 lines
arm/run +1
-2-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 usedWe can change the 'grep testdev >/dev/null' to 'grep -q testdev'
Thanks for advice. I will change it.
Quoted 11 lines
Quoted 7 lines
arm/run +0
-0echo "$qemu doesn't support chr-testdev. Exiting." exit 2 fiSignature · 1 line
2.39.1Thanks,
drew
Signature · 1 line
Shaoqin
Hi drew,
Quoted 23 lines · Andrew Jones
Quoted 2 lines · Shaoqin Huang
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?
Quoted 14 lines
Signed-off-by Shaoqin Huang <[email protected]>--- arm/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arm/run +0
-0@@ -59,8 +59,7 @@ if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then exit 2 fi
Quoted 8 lines
arm/run if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then · line 62
Quoted 3 lines
arm/run +1
-2-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 usedWe 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,
Quoted 10 lines
Quoted 6 lines
arm/run +0
-0echo "$qemu doesn't support chr-testdev. Exiting." exit 2 fiSignature · 1 line
2.39.1Thanks,
drew
Signature · 1 line
Shaoqin
Quoted 36 lines · Shaoqin Huang
Hi drew,
Quoted 28 lines · Andrew Jones
Quoted 2 lines · Shaoqin Huang
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?
Quoted 11 lines
Signed-off-by Shaoqin Huang <[email protected]>--- arm/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arm/run +0
-0arm/run if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then · line 61
Quoted 5 lines
arm/run +1
-2@@ -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 usedQuoted 2 lines
We can change the 'grep testdev >/dev/null' to 'grep -q testdev'
This just remind me if we could also change
Quoted 7 lines
if ! $qemu $M -device '?' 2>&1 | grep virtconsole >
/dev/null; thento
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
Quoted 17 lines
Thanks,
Quoted 10 lines
Quoted 6 lines
arm/run +0
-0echo "$qemu doesn't support chr-testdev. Exiting." exit 2 fiSignature · 1 line
2.39.1Thanks,
drewSignature · 1 line
Shaoqin
Quoted 45 lines · Andrew Jones
Quoted 36 lines · Shaoqin Huang
Hi drew,
Quoted 28 lines · Andrew Jones
Quoted 2 lines · Shaoqin Huang
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?
Quoted 11 lines
Signed-off-by Shaoqin Huang <[email protected]>--- arm/run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arm/run +0
-0arm/run if ! $qemu $M -device '?' 2>&1 | grep virtconsole > /dev/null; then · line 61
Quoted 5 lines
arm/run +1
-2@@ -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
Quoted 2 lines
We can change the 'grep testdev >/dev/null' to 'grep -q testdev'
This just remind me if we could also change
Quoted 7 lines
if ! $qemu $M -device '?' 2>&1 | grep virtconsole >
/dev/null; thento
if ! $qemu $M -device '?' | grep -q virtconsole; then
And all other place like that.
Quoted 8 lines
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
Quoted 21 lines
Thanks,
drewQuoted 17 lines
Thanks,
Quoted 10 lines
Quoted 6 lines
arm/run +0
-0echo "$qemu doesn't support chr-testdev. Exiting." exit 2 fiSignature · 1 line
2.39.1Thanks,
drewSignature · 1 line
Shaoqin
Signature · 1 line
Shaoqin