[Qemu-block] [PATCH v7 1/6] iotests: allow Valgrind checking all QEMU processes

2019-09-01 Thread Andrey Shinkevich
With the '-valgrind' option, let all the QEMU processes be run under the Valgrind tool. The Valgrind own parameters may be set with its environment variable VALGRIND_OPTS, e.g. $ VALGRIND_OPTS="--leak-check=yes" ./check -valgrind or they may be listed in the Valgrind checked file ./.valgrindrc or

[Qemu-block] [PATCH v7 5/6] iotests: extended timeout under Valgrind

2019-09-01 Thread Andrey Shinkevich
As the iotests run longer under the Valgrind, the QEMU_COMM_TIMEOUT is to be increased in the test cases 028, 183 and 192 when running under the Valgrind. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow ---

[Qemu-block] [PATCH v7 4/6] iotests: Valgrind fails with nonexistent directory

2019-09-01 Thread Andrey Shinkevich
The Valgrind uses the exported variable TMPDIR and fails if the directory does not exist. Let us exclude such a test case from being run under the Valgrind and notify the user of it. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich Reviewed-by: John Snow --- tests/qemu-iotests/051 |

[Qemu-block] [PATCH v7 6/6] iotests: extend sleeping time under Valgrind

2019-09-01 Thread Andrey Shinkevich
To synchronize the time when QEMU is running longer under the Valgrind, increase the sleeping time in the test 247. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- tests/qemu-iotests/247 | 6 +- 1 file changed, 5 insertions(+), 1

[Qemu-block] [PATCH v7 3/6] iotests: Add casenotrun report to bash tests

2019-09-01 Thread Andrey Shinkevich
The new function _casenotrun() is to be invoked if a test case cannot be run for some reason. The user will be notified by a message passed to the function. It is the caller's responsibility to make skipped a particular test. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich

[Qemu-block] [PATCH v7 2/6] iotests: exclude killed processes from running under Valgrind

2019-09-01 Thread Andrey Shinkevich
The Valgrind tool fails to manage its termination in multi-threaded processes when they raise the signal SIGKILL. The bug has been reported to the Valgrind maintainers and was registered as the bug #409141: https://bugs.kde.org/show_bug.cgi?id=409141 Let's exclude such test cases from running

[Qemu-block] [PATCH v7 0/6] Allow Valgrind checking all QEMU processes

2019-09-01 Thread Andrey Shinkevich
In the current implementation of the QEMU bash iotests, only qemu-io processes may be run under the Valgrind with the switch '-valgrind'. Let's allow the common.rc bash script running all other QEMU processes, such as qemu-kvm, qemu-img, qemu-ndb and qemu-vxhs, under the Valgrind. v7: 01: The