qemu-block
[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: Stefan Hajnoczi
Subject: Re: [RFC v3 5/5] qemu-iotests: add zone operation tests.
Date: Tue, 28 Jun 2022 09:19:27 +0100

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.

> +# success, all done
> +sudo rmmod null_blk
> +echo "*** done"
> +#rm -f $seq.full

Why is this commented out?

Attachment: signature.asc
Description: PGP signature


reply via email to

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