diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-06-28 16:55:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-07-17 16:48:32 +0200 |
commit | 2f24e8fb8d684f576f3dcced820860d70652a7f9 (patch) | |
tree | 3b643eee61034d6b1b1e9bee5617f1adc976009b /tests/qemu-iotests/common.rc | |
parent | 3f4349dc8b9494315f8331b2ea4e8d1f83fb801d (diff) |
qemu-iotests: Valgrind support
check -valgrind wraps all qemu-io calls with valgrind. This makes it a
bit easier to debug problems that occur somewhere deep in a test case.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common.rc')
-rw-r--r-- | tests/qemu-iotests/common.rc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index e535874e4c..5e3a524bc8 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -53,6 +53,16 @@ else TEST_IMG=$IMGPROTO:$TEST_DIR/t.$IMGFMT fi +function valgrind_qemu_io() +{ + valgrind --log-file=/tmp/$$.valgrind --error-exitcode=99 $REAL_QEMU_IO "$@" + if [ $? != 0 ]; then + cat /tmp/$$.valgrind + fi + rm -f /tmp/$$.valgrind +} + + _optstr_add() { if [ -n "$1" ]; then |