mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qemu-iotests: test zone append operation
The patch tests zone append writes by reporting the zone wp after the completion of the call. "zap -p" option can print the sector offset value after completion, which should be the start sector where the append write begins. Signed-off-by: Sam Li <faithilikerun@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20230508051510.177850-4-faithilikerun@gmail.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
4751d09adc
commit
fe4fe70d27
3 changed files with 107 additions and 0 deletions
|
@ -82,6 +82,22 @@ echo "(5) resetting the second zone"
|
|||
$QEMU_IO $IMG -c "zrs 268435456 268435456"
|
||||
echo "After resetting a zone:"
|
||||
$QEMU_IO $IMG -c "zrp 268435456 1"
|
||||
echo
|
||||
echo
|
||||
echo "(6) append write" # the physical block size of the device is 4096
|
||||
$QEMU_IO $IMG -c "zrp 0 1"
|
||||
$QEMU_IO $IMG -c "zap -p 0 0x1000 0x2000"
|
||||
echo "After appending the first zone firstly:"
|
||||
$QEMU_IO $IMG -c "zrp 0 1"
|
||||
$QEMU_IO $IMG -c "zap -p 0 0x1000 0x2000"
|
||||
echo "After appending the first zone secondly:"
|
||||
$QEMU_IO $IMG -c "zrp 0 1"
|
||||
$QEMU_IO $IMG -c "zap -p 268435456 0x1000 0x2000"
|
||||
echo "After appending the second zone firstly:"
|
||||
$QEMU_IO $IMG -c "zrp 268435456 1"
|
||||
$QEMU_IO $IMG -c "zap -p 268435456 0x1000 0x2000"
|
||||
echo "After appending the second zone secondly:"
|
||||
$QEMU_IO $IMG -c "zrp 268435456 1"
|
||||
|
||||
# success, all done
|
||||
echo "*** done"
|
||||
|
|
|
@ -50,4 +50,20 @@ start: 0x80000, len 0x80000, cap 0x80000, wptr 0x100000, zcond:14, [type: 2]
|
|||
(5) resetting the second zone
|
||||
After resetting a zone:
|
||||
start: 0x80000, len 0x80000, cap 0x80000, wptr 0x80000, zcond:1, [type: 2]
|
||||
|
||||
|
||||
(6) append write
|
||||
start: 0x0, len 0x80000, cap 0x80000, wptr 0x0, zcond:1, [type: 2]
|
||||
After zap done, the append sector is 0x0
|
||||
After appending the first zone firstly:
|
||||
start: 0x0, len 0x80000, cap 0x80000, wptr 0x18, zcond:2, [type: 2]
|
||||
After zap done, the append sector is 0x18
|
||||
After appending the first zone secondly:
|
||||
start: 0x0, len 0x80000, cap 0x80000, wptr 0x30, zcond:2, [type: 2]
|
||||
After zap done, the append sector is 0x80000
|
||||
After appending the second zone firstly:
|
||||
start: 0x80000, len 0x80000, cap 0x80000, wptr 0x80018, zcond:2, [type: 2]
|
||||
After zap done, the append sector is 0x80018
|
||||
After appending the second zone secondly:
|
||||
start: 0x80000, len 0x80000, cap 0x80000, wptr 0x80030, zcond:2, [type: 2]
|
||||
*** done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue