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@xxxxxxxxxx> > > > --- > > > 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 >