mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
iotests: Set read-zeroes on in null block driver for Valgrind
The Valgrind tool reports about the uninitialised buffer 'buf' instantiated on the stack of the function guess_disk_lchs(). Pass 'read-zeroes=on' to the null block driver to make it deterministic. The output of the tests 051, 186 and 227 now includes the parameter 'read-zeroes'. So, the benchmark output files are being changed too. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
0274f45bde
commit
a6862418fe
10 changed files with 111 additions and 109 deletions
|
@ -86,8 +86,8 @@ echo "=== -blockdev/-device=<node-name> ==="
|
|||
echo
|
||||
|
||||
for dev in $fixed $removable; do
|
||||
check_info_block -blockdev driver=null-co,node-name=null -device $dev,drive=null
|
||||
check_info_block -blockdev driver=null-co,node-name=null -device $dev,drive=null,id=qdev_id
|
||||
check_info_block -blockdev driver=null-co,read-zeroes=on,node-name=null -device $dev,drive=null
|
||||
check_info_block -blockdev driver=null-co,read-zeroes=on,node-name=null -device $dev,drive=null,id=qdev_id
|
||||
done
|
||||
|
||||
echo
|
||||
|
@ -97,7 +97,7 @@ echo
|
|||
# This creates two BlockBackends that will show up in 'info block'!
|
||||
# A monitor-owned one from -drive, and anonymous one from -device
|
||||
for dev in $fixed $removable; do
|
||||
check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=null,id=qdev_id
|
||||
check_info_block -drive if=none,driver=null-co,read-zeroes=on,node-name=null -device $dev,drive=null,id=qdev_id
|
||||
done
|
||||
|
||||
echo
|
||||
|
@ -105,8 +105,8 @@ echo "=== -drive if=none/-device=<bb-name> (with medium) ==="
|
|||
echo
|
||||
|
||||
for dev in $fixed $removable; do
|
||||
check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=none0
|
||||
check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=none0,id=qdev_id
|
||||
check_info_block -drive if=none,driver=null-co,read-zeroes=on,node-name=null -device $dev,drive=none0
|
||||
check_info_block -drive if=none,driver=null-co,read-zeroes=on,node-name=null -device $dev,drive=none0,id=qdev_id
|
||||
done
|
||||
|
||||
echo
|
||||
|
@ -125,15 +125,15 @@ echo "=== -drive if=... ==="
|
|||
echo
|
||||
|
||||
check_info_block -drive if=floppy
|
||||
check_info_block -drive if=floppy,driver=null-co
|
||||
check_info_block -drive if=floppy,driver=null-co,read-zeroes=on
|
||||
|
||||
check_info_block -drive if=ide,driver=null-co
|
||||
check_info_block -drive if=ide,driver=null-co,read-zeroes=on
|
||||
check_info_block -drive if=ide,media=cdrom
|
||||
check_info_block -drive if=ide,driver=null-co,media=cdrom
|
||||
check_info_block -drive if=ide,driver=null-co,read-zeroes=on,media=cdrom
|
||||
|
||||
check_info_block -drive if=virtio,driver=null-co
|
||||
check_info_block -drive if=virtio,driver=null-co,read-zeroes=on
|
||||
|
||||
check_info_block -drive if=pflash,driver=null-co,size=1M
|
||||
check_info_block -drive if=pflash,driver=null-co,read-zeroes=on,size=1M
|
||||
|
||||
# success, all done
|
||||
echo "*** done"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue