qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v3 5/5] qemu-iotests: add zone operation tests.


From: Sam Li
Subject: Re: [RFC v3 5/5] qemu-iotests: add zone operation tests.
Date: Tue, 28 Jun 2022 17:34:43 +0800

Stefan Hajnoczi <stefanha@redhat.com> 于2022年6月28日周二 16:20写道:
>
> On Mon, Jun 27, 2022 at 08:19:17AM +0800, Sam Li wrote:
> > diff --git a/tests/qemu-iotests/tests/zoned.sh 
> > b/tests/qemu-iotests/tests/zoned.sh
> > new file mode 100755
> > index 0000000000..262c0b5427
> > --- /dev/null
> > +++ b/tests/qemu-iotests/tests/zoned.sh
> > @@ -0,0 +1,49 @@
> > +#!/usr/bin/env bash
> > +#
> > +# Test zone management operations.
> > +#
> > +
> > +QEMU_IO="build/qemu-io"
> > +IMG="--image-opts driver=zoned_host_device,filename=/dev/nullb0"
> > +QEMU_IO_OPTIONS=$QEMU_IO_OPTIONS_NO_FMT
> > +
> > +echo "Testing a null_blk device"
> > +echo "Simple cases: if the operations work"
> > +sudo modprobe null_blk nr_devices=1 zoned=1
>
> Please use bash's "trap" command to remove null_blk on exit. That way
> cleanup happens whether the script exits successfully or not. See
> tests/qemu-iotests/108 for an example.

Noted. Should I just include "rmmod null_blk" in _cleanup()? I'm a
little confused about the normal way to write qemu-iotests.

>
> > +# success, all done
> > +sudo rmmod null_blk
> > +echo "*** done"
> > +#rm -f $seq.full
>
> Why is this commented out?
I should just remove it. seq is not used.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]