From nobody Fri May 10 17:22:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1567588708; cv=none; d=zoho.com; s=zohoarc; b=BsBx2PCiPRaDFW4zYhoX7v9SEw23gPyW9LJ3nLFEzj71AA6od2CfumT9Hrsc21u4fF98lfxyk9Ul9lwtm7QxBPSFIBUInjy8NCEv3nRL13CPByA0AbQFQ4yRIgdoLscqCNXh8IEiMph/S6FlOIXfeHT94MqMioukY/DpznQY+UM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567588708; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pg5qzACtuiIjE0O0dEzx1giELX1wCWIgfDV9ILprCkU=; b=Uq7ngA7VE8sYCWWno12xTOeDSO/mDIxwRGSTiOfghvJyJl7aQZ+9RJWFqVp54+i0iZF8Y2uobjYdDO/yIdJuIAYjKG6YQE93PuSDitBTwADGWQndMz6Ko6a0isAjDx15eKhVLKiw1fR2RYMMQ5WQgirt6u5pC5XkXiiiT8EPMD4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567588708142702.4812998340539; Wed, 4 Sep 2019 02:18:28 -0700 (PDT) Received: from localhost ([::1]:54926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RQn-0001FS-Fd for importer@patchew.org; Wed, 04 Sep 2019 05:18:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40691) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RKH-0003yy-Id for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5RKF-0004mh-BD for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:41 -0400 Received: from relay.sw.ru ([185.231.240.75]:47462) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5RKE-0004ku-Ud; Wed, 04 Sep 2019 05:11:39 -0400 Received: from [172.16.25.136] (helo=dhcp-172-16-25-136.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i5RKB-000708-E7; Wed, 04 Sep 2019 12:11:35 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 4 Sep 2019 12:11:19 +0300 Message-Id: <1567588284-975381-2-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v8 1/6] iotests: allow Valgrind checking all QEMU processes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=3D"--leak-check=3Dyes" ./check -valgrind or they may be listed in the Valgrind checked file ./.valgrindrc or ~/.valgrindrc like --memcheck:leak-check=3Dno --memcheck:track-origins=3Dyes To exclude a specific process from running under the Valgrind, the corresponding environment variable VALGRIND_QEMU_ is to be set to the empty string: $ VALGRIND_QEMU_IO=3D ./check -valgrind When QEMU-IO process is being killed, the shell report refers to the text of the command in _qemu_io_wrapper(), which was modified with this patch. So, the benchmark output for the tests 039, 061 and 137 is to be changed also. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/039.out | 30 +++------------ tests/qemu-iotests/061.out | 12 +----- tests/qemu-iotests/137.out | 6 +-- tests/qemu-iotests/common.rc | 88 +++++++++++++++++++++++++++++++++++-----= ---- 4 files changed, 78 insertions(+), 58 deletions(-) diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out index 724d7b2..2e356d5 100644 --- a/tests/qemu-iotests/039.out +++ b/tests/qemu-iotests/039.out @@ -11,11 +11,7 @@ No errors were found on the image. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) incompatible_features 0x1 ERROR cluster 5 refcount=3D0 reference=3D1 ERROR OFLAG_COPIED data cluster: l2_entry=3D8000000000050000 refcount=3D0 @@ -50,11 +46,7 @@ read 512/512 bytes at offset 0 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) incompatible_features 0x1 ERROR cluster 5 refcount=3D0 reference=3D1 Rebuilding refcount structure @@ -68,11 +60,7 @@ incompatible_features 0x0 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) incompatible_features 0x0 No errors were found on the image. =20 @@ -91,11 +79,7 @@ No errors were found on the image. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) incompatible_features 0x1 ERROR cluster 5 refcount=3D0 reference=3D1 ERROR OFLAG_COPIED data cluster: l2_entry=3D8000000000050000 refcount=3D0 @@ -105,11 +89,7 @@ Data may be corrupted, or further writes to the image m= ay corrupt it. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D134217728 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) incompatible_features 0x0 No errors were found on the image. *** done diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out index 1aa7d37..d6a7c2a 100644 --- a/tests/qemu-iotests/061.out +++ b/tests/qemu-iotests/061.out @@ -118,11 +118,7 @@ No errors were found on the image. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 wrote 131072/131072 bytes at offset 0 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) magic 0x514649fb version 3 backing_file_offset 0x0 @@ -280,11 +276,7 @@ No errors were found on the image. Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 wrote 131072/131072 bytes at offset 0 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) magic 0x514649fb version 3 backing_file_offset 0x0 diff --git a/tests/qemu-iotests/137.out b/tests/qemu-iotests/137.out index 22d59df..1c6569e 100644 --- a/tests/qemu-iotests/137.out +++ b/tests/qemu-iotests/137.out @@ -35,11 +35,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D6710= 8864 qemu-io: Unsupported value 'blubb' for qcow2 option 'overlap-check'. Allow= ed are any of the following: none, constant, cached, all wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -./common.rc: Killed ( if [ "${VALGRIND_QEMU}" =3D=3D "y" = ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode=3D99= "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"; -fi ) +./common.rc: Killed ( VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO= }" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@"= ) incompatible_features 0x0 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D67108864 wrote 65536/65536 bytes at offset 0 diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 5502c3d..48f4bc0 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -60,19 +60,68 @@ if ! . ./common.config exit 1 fi =20 +# Set the variables to the empty string to turn Valgrind off +# for specific processes, e.g. +# $ VALGRIND_QEMU_IO=3D ./check -qcow2 -valgrind 015 + +: ${VALGRIND_QEMU_VM=3D$VALGRIND_QEMU} +: ${VALGRIND_QEMU_IMG=3D$VALGRIND_QEMU} +: ${VALGRIND_QEMU_IO=3D$VALGRIND_QEMU} +: ${VALGRIND_QEMU_NBD=3D$VALGRIND_QEMU} +: ${VALGRIND_QEMU_VXHS=3D$VALGRIND_QEMU} + +# The Valgrind own parameters may be set with +# its environment variable VALGRIND_OPTS, e.g. +# $ VALGRIND_OPTS=3D"--leak-check=3Dyes" ./check -qcow2 -valgrind 015 + +_qemu_proc_exec() +{ + local VALGRIND_LOGFILE=3D"$1" + shift + if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode= =3D99 "$@" + else + exec "$@" + fi +} + +_qemu_proc_valgrind_log() +{ + local VALGRIND_LOGFILE=3D"$1" + local RETVAL=3D"$2" + if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + if [ $RETVAL =3D=3D 99 ]; then + cat "${VALGRIND_LOGFILE}" + fi + rm -f "${VALGRIND_LOGFILE}" + fi +} + _qemu_wrapper() { + local VALGRIND_LOGFILE=3D"${TEST_DIR}"/$$.valgrind ( if [ -n "${QEMU_NEED_PID}" ]; then echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid" fi - exec "$QEMU_PROG" $QEMU_OPTIONS "$@" + VALGRIND_QEMU=3D"${VALGRIND_QEMU_VM}" _qemu_proc_exec "${VALGRIND_= LOGFILE}" \ + "$QEMU_PROG" $QEMU_OPTIONS "$@" ) + RETVAL=3D$? + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL } =20 _qemu_img_wrapper() { - (exec "$QEMU_IMG_PROG" $QEMU_IMG_OPTIONS "$@") + local VALGRIND_LOGFILE=3D"${TEST_DIR}"/$$.valgrind + ( + VALGRIND_QEMU=3D"${VALGRIND_QEMU_IMG}" _qemu_proc_exec "${VALGRIND= _LOGFILE}" \ + "$QEMU_IMG_PROG" $QEMU_IMG_OPTIONS "$@" + ) + RETVAL=3D$? + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL } =20 _qemu_io_wrapper() @@ -85,36 +134,39 @@ _qemu_io_wrapper() QEMU_IO_ARGS=3D"--object secret,id=3Dkeysec0,data=3D$IMGKEYSEC= RET $QEMU_IO_ARGS" fi fi - local RETVAL ( - if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then - exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitc= ode=3D99 "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" - else - exec "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" - fi + VALGRIND_QEMU=3D"${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_= LOGFILE}" \ + "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" ) RETVAL=3D$? - if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then - if [ $RETVAL =3D=3D 99 ]; then - cat "${VALGRIND_LOGFILE}" - fi - rm -f "${VALGRIND_LOGFILE}" - fi - (exit $RETVAL) + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL } =20 _qemu_nbd_wrapper() { - "$QEMU_NBD_PROG" --pid-file=3D"${QEMU_TEST_DIR}/qemu-nbd.pid" \ - $QEMU_NBD_OPTIONS "$@" + local VALGRIND_LOGFILE=3D"${TEST_DIR}"/$$.valgrind + ( + VALGRIND_QEMU=3D"${VALGRIND_QEMU_NBD}" _qemu_proc_exec "${VALGRIND= _LOGFILE}" \ + "$QEMU_NBD_PROG" --pid-file=3D"${QEMU_TEST_DIR}/qemu-nbd.pid" \ + $QEMU_NBD_OPTIONS "$@" + ) + RETVAL=3D$? + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL } =20 _qemu_vxhs_wrapper() { + local VALGRIND_LOGFILE=3D"${TEST_DIR}"/$$.valgrind ( echo $BASHPID > "${TEST_DIR}/qemu-vxhs.pid" - exec "$QEMU_VXHS_PROG" $QEMU_VXHS_OPTIONS "$@" + VALGRIND_QEMU=3D"${VALGRIND_QEMU_VXHS}" _qemu_proc_exec "${VALGRIN= D_LOGFILE}" \ + "$QEMU_VXHS_PROG" $QEMU_VXHS_OPTIONS "$@" ) + RETVAL=3D$? + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL } =20 export QEMU=3D_qemu_wrapper --=20 1.8.3.1 From nobody Fri May 10 17:22:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1567588898; cv=none; d=zoho.com; s=zohoarc; b=Jfd/60CWmrLCjKXogQOhiY8oocPQRMh+g8NSa0+aY5qOgdpXodknCHcRHYTBVOyoOUGU2OLqQMdDi5ANj5lZe4XJk2pqboZFzRj48xG7Vzvrdb+1OvrKrzX78pIk1kHKjbus6EMF/SlCnDdJCsqAY8DEz/E0k2VC9W/K0wRXocg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567588898; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=M3m8EOqzAscZ66N6vePK/aDCsb+YahnuJu3OA98JOmU=; b=Km/ydjO5JBoejr4yma3rcVVKV8/9JyuAnQRv94TXeT59u8winYadnFFys3+hVyucRJ3Acxfy21DEMrRWm5i2PSlnyd4J5XnDzt1IaubAtmZuwCsaM8wzz/Cwa1a2NAz3nVaU5ig+AtfbVY1IxNuEdspDZbG9Au4EPv4NxTh2uYw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567588898607679.2562160156306; Wed, 4 Sep 2019 02:21:38 -0700 (PDT) Received: from localhost ([::1]:55024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RTt-0006Bz-HF for importer@patchew.org; Wed, 04 Sep 2019 05:21:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40686) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RKH-0003xy-8K for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5RKF-0004n7-Cd for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:41 -0400 Received: from relay.sw.ru ([185.231.240.75]:47458) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5RKF-0004kz-0q; Wed, 04 Sep 2019 05:11:39 -0400 Received: from [172.16.25.136] (helo=dhcp-172-16-25-136.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i5RKB-000708-HE; Wed, 04 Sep 2019 12:11:35 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 4 Sep 2019 12:11:20 +0300 Message-Id: <1567588284-975381-3-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v8 2/6] iotests: exclude killed processes from running under Valgrind X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=3D409141 Let's exclude such test cases from running under the Valgrind until a new version with the bug fix is released because checking for the memory issues is covered by other test cases. Suggested-by: John Snow Signed-off-by: Andrey Shinkevich Reviewed-by: John Snow --- tests/qemu-iotests/039 | 5 +++++ tests/qemu-iotests/061 | 2 ++ tests/qemu-iotests/137 | 1 + tests/qemu-iotests/common.rc | 12 ++++++++++-- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 0d4e963..99f39a2 100755 --- a/tests/qemu-iotests/039 +++ b/tests/qemu-iotests/039 @@ -65,6 +65,7 @@ echo "=3D=3D Creating a dirty image file =3D=3D" IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Don" _make_test_img $size =20 +_NO_VALGRIND \ $QEMU_IO -c "write -P 0x5a 0 512" \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ | _filter_qemu_io @@ -100,6 +101,7 @@ echo "=3D=3D Opening a dirty image read/write should re= pair it =3D=3D" IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Don" _make_test_img $size =20 +_NO_VALGRIND \ $QEMU_IO -c "write -P 0x5a 0 512" \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ | _filter_qemu_io @@ -118,6 +120,7 @@ echo "=3D=3D Creating an image file with lazy_refcounts= =3Doff =3D=3D" IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Doff" _make_test_img $size =20 +_NO_VALGRIND \ $QEMU_IO -c "write -P 0x5a 0 512" \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ | _filter_qemu_io @@ -151,6 +154,7 @@ echo "=3D=3D Changing lazy_refcounts setting at runtime= =3D=3D" IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Doff" _make_test_img $size =20 +_NO_VALGRIND \ $QEMU_IO -c "reopen -o lazy-refcounts=3Don" \ -c "write -P 0x5a 0 512" \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ @@ -163,6 +167,7 @@ _check_test_img IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Don" _make_test_img $size =20 +_NO_VALGRIND \ $QEMU_IO -c "reopen -o lazy-refcounts=3Doff" \ -c "write -P 0x5a 0 512" \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061 index d7dbd7e..4eac5b8 100755 --- a/tests/qemu-iotests/061 +++ b/tests/qemu-iotests/061 @@ -73,6 +73,7 @@ echo echo "=3D=3D=3D Testing dirty version downgrade =3D=3D=3D" echo IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Don" _make_test_img 64M +_NO_VALGRIND \ $QEMU_IO -c "write -P 0x2a 0 128k" -c flush \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 | _filter_qemu_io $PYTHON qcow2.py "$TEST_IMG" dump-header @@ -107,6 +108,7 @@ echo echo "=3D=3D=3D Testing dirty lazy_refcounts=3Doff =3D=3D=3D" echo IMGOPTS=3D"compat=3D1.1,lazy_refcounts=3Don" _make_test_img 64M +_NO_VALGRIND \ $QEMU_IO -c "write -P 0x2a 0 128k" -c flush \ -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 | _filter_qemu_io $PYTHON qcow2.py "$TEST_IMG" dump-header diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index 0c3d2a1..089821d 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -130,6 +130,7 @@ echo =20 # Whether lazy-refcounts was actually enabled can easily be tested: Check = if # the dirty bit is set after a crash +_NO_VALGRIND \ $QEMU_IO \ -c "reopen -o lazy-refcounts=3Don,overlap-check=3Dblubb" \ -c "write -P 0x5a 0 512" \ diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 48f4bc0..e4f8fcc 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -78,7 +78,7 @@ _qemu_proc_exec() { local VALGRIND_LOGFILE=3D"$1" shift - if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + if [[ "${VALGRIND_QEMU}" =3D=3D "y" && "${NO_VALGRIND}" !=3D "y" ]]; t= hen exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode= =3D99 "$@" else exec "$@" @@ -89,7 +89,7 @@ _qemu_proc_valgrind_log() { local VALGRIND_LOGFILE=3D"$1" local RETVAL=3D"$2" - if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + if [[ "${VALGRIND_QEMU}" =3D=3D "y" && "${NO_VALGRIND}" !=3D "y" ]]; t= hen if [ $RETVAL =3D=3D 99 ]; then cat "${VALGRIND_LOGFILE}" fi @@ -169,6 +169,14 @@ _qemu_vxhs_wrapper() return $RETVAL } =20 +# Valgrind bug #409141 https://bugs.kde.org/show_bug.cgi?id=3D409141 +# Until valgrind 3.16+ is ubiquitous, we must work around a hang in +# valgrind when issuing sigkill. Disable valgrind for this invocation. +_NO_VALGRIND() +{ + NO_VALGRIND=3D"y" "$@" +} + export QEMU=3D_qemu_wrapper export QEMU_IMG=3D_qemu_img_wrapper export QEMU_IO=3D_qemu_io_wrapper --=20 1.8.3.1 From nobody Fri May 10 17:22:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1567588480; cv=none; d=zoho.com; s=zohoarc; b=fRJH9g+L605nPAwF7sByElcjUuCFdsntVvyU0zGmzLjuGvnlpbyPZu/qYRl0W9q1Pv6/5dctxTqVNu8ULx9Yn0/dONvxD+QVVwlVwGxT741ZOtqWIhTeleU5eUJW2KPRd8cZJPS/DnyBD09OPhIDCDd0+jKu/nopVBLVXCxkCAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567588480; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=4QqCrkIf1429j2aFE6eBkfslxvSCjQ81z4c70Px+S4g=; b=n8RUdub9a0dDMGfB0CJubjpVhZu44oyPp68kiA5SYCk8Mjviakb5DkAYCRmdtTh1fXsT1lM4Ds5bT6I2DELZlhG+dk64f7o88sZ8/704QbrTmV5I+oRpe7oH4Za/O491HA9E8skmyVwr5KTpQ5JXCk+YU/x1f3+ThvzvMDEfDBQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567588480691825.4623498861358; Wed, 4 Sep 2019 02:14:40 -0700 (PDT) Received: from localhost ([::1]:54878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RN3-0005wr-OT for importer@patchew.org; Wed, 04 Sep 2019 05:14:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40671) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RKH-0003wW-3X for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5RKF-0004mr-As for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:40 -0400 Received: from relay.sw.ru ([185.231.240.75]:47472) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5RKE-0004kv-Ug; Wed, 04 Sep 2019 05:11:39 -0400 Received: from [172.16.25.136] (helo=dhcp-172-16-25-136.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i5RKB-000708-Q0; Wed, 04 Sep 2019 12:11:35 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 4 Sep 2019 12:11:21 +0300 Message-Id: <1567588284-975381-4-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v8 3/6] iotests: Add casenotrun report to bash tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: John Snow Reviewed-by: Cleber Rosa --- tests/qemu-iotests/common.rc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index e4f8fcc..00a16ee 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -455,6 +455,15 @@ _notrun() exit } =20 +# bail out, setting up .casenotrun file +# The function _casenotrun() is used as a notifier. It is the +# caller's responsibility to make skipped a particular test. +# +_casenotrun() +{ + echo " [case not run] $*" >>"$OUTPUT_DIR/$seq.casenotrun" +} + # just plain bail out # _fail() --=20 1.8.3.1 From nobody Fri May 10 17:22:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1567588709; cv=none; d=zoho.com; s=zohoarc; b=V7V7xk6lesIxXk2HIrv9GgmsKzmplAt2iWLF7RCDRLVV58a6ezqlkLkVdHyGMZrhmAAUZuhGx1W+vlJ7kPJ3e8yaC7djtpQX5dB3Yv335SfSZ6FHuo7M31zHQ1JWxj0T3OfspGbW92vz1GCKd7NBIBHISQ2ngP/DSBsyesFjhz0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567588709; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=iGI1XFgXZRwevm6nobLnYLtKF9H49ZQH46re+5eHQdw=; b=XGh6FyV/In/mOWTJORgTGyhtQQsFY+nedlUzwtOAUq0aaRBmLrAsFjhI0nW5msDg+Tgp6s3T58pwX8wlgfdMJ4VN+M6eEsH51eKzbGpp04H7yYPevaddTgs6DDrch7n9TIzteWFDAP1jU7DCesoixWjRYXLpLrd9/EsRvygt3YE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567588709419761.9173592813305; Wed, 4 Sep 2019 02:18:29 -0700 (PDT) Received: from localhost ([::1]:54928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RQp-0001Je-DE for importer@patchew.org; Wed, 04 Sep 2019 05:18:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40675) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RKH-0003x0-5b for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5RKF-0004n2-BV for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:40 -0400 Received: from relay.sw.ru ([185.231.240.75]:47460) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5RKE-0004kt-Ue; Wed, 04 Sep 2019 05:11:39 -0400 Received: from [172.16.25.136] (helo=dhcp-172-16-25-136.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i5RKC-000708-5Y; Wed, 04 Sep 2019 12:11:36 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 4 Sep 2019 12:11:22 +0300 Message-Id: <1567588284-975381-5-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v8 4/6] iotests: Valgrind fails with nonexistent directory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index ce942a5..53bcdbc 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -377,6 +377,10 @@ printf %b "qemu-io $device_id \"write -P 0x33 0 4k\"\n= commit $device_id\n" | $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io =20 # Using snapshot=3Don with a non-existent TMPDIR +if [ "${VALGRIND_QEMU_VM}" =3D=3D "y" ]; then + _casenotrun "Valgrind needs a valid TMPDIR for itself" +fi +VALGRIND_QEMU_VM=3D \ TMPDIR=3D/nonexistent run_qemu -drive driver=3Dnull-co,snapshot=3Don =20 # Using snapshot=3Don together with read-only=3Don --=20 1.8.3.1 From nobody Fri May 10 17:22:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1567588707; cv=none; d=zoho.com; s=zohoarc; b=gAFbC9l1Ldysxu0/JBY543/UlJOlRuK/pgEDbd4me9BqOwr2iGXdOeD9mLTrMpXvOOHOAftnBRT/igzg8Dvs5R6VJQB0k4TinuqReYF0ES9qxOtvrP0g7LXr4oil22n0M0eTsg1oSuIqsUqVeSUCudIRUNN/2pnLpPMcswoKtYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567588707; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZZMyaOU3XujzBxjazaVXKyXW+5NVqeFlahEbB0j5X3I=; b=UVCs3sFRyUTEj+sl8tnq3mnhbjYaEUJedommbWL0LZMdZcL5cCrxfBJdo7fYfLX5Pw0mcBtOfa7sY83tzugpUJ80BOR3oh2+zq9l2TEvWm+Wvv0hk/pDJrCiDPM9WWXUANSOj8b2QnJIaER8PVAxGyB4+l2kZBvoCfmm+QygP88= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567588707610107.26746355924638; Wed, 4 Sep 2019 02:18:27 -0700 (PDT) Received: from localhost ([::1]:54924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RQk-0001EY-C4 for importer@patchew.org; Wed, 04 Sep 2019 05:18:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40677) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RKH-0003xF-5J for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5RKF-0004nC-Df for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:40 -0400 Received: from relay.sw.ru ([185.231.240.75]:47474) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5RKF-0004kx-0o; Wed, 04 Sep 2019 05:11:39 -0400 Received: from [172.16.25.136] (helo=dhcp-172-16-25-136.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i5RKC-000708-CI; Wed, 04 Sep 2019 12:11:36 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 4 Sep 2019 12:11:23 +0300 Message-Id: <1567588284-975381-6-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v8 5/6] iotests: extended timeout under Valgrind X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- tests/qemu-iotests/028 | 6 +++++- tests/qemu-iotests/183 | 9 ++++++++- tests/qemu-iotests/192 | 6 +++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index 01f4959..71301ec 100755 --- a/tests/qemu-iotests/028 +++ b/tests/qemu-iotests/028 @@ -110,7 +110,11 @@ echo qemu_comm_method=3D"monitor" _launch_qemu -drive file=3D"${TEST_IMG}",cache=3D${CACHEMODE},id=3Ddisk h=3D$QEMU_HANDLE -QEMU_COMM_TIMEOUT=3D1 +if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + QEMU_COMM_TIMEOUT=3D7 +else + QEMU_COMM_TIMEOUT=3D1 +fi =20 # Silence output since it contains the disk image path and QEMU's readline # character echoing makes it very hard to filter the output. Plus, there diff --git a/tests/qemu-iotests/183 b/tests/qemu-iotests/183 index fbe5a99..04fb344 100755 --- a/tests/qemu-iotests/183 +++ b/tests/qemu-iotests/183 @@ -94,8 +94,15 @@ if echo "$reply" | grep "compiled without old-style" > /= dev/null; then _notrun "migrate -b support not compiled in" fi =20 -QEMU_COMM_TIMEOUT=3D0.1 qemu_cmd_repeat=3D50 silent=3Dyes \ +timeout_comm=3D$QEMU_COMM_TIMEOUT +if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + QEMU_COMM_TIMEOUT=3D4 +else + QEMU_COMM_TIMEOUT=3D0.1 +fi +qemu_cmd_repeat=3D50 silent=3Dyes \ _send_qemu_cmd $src "{ 'execute': 'query-migrate' }" '"status": "compl= eted"' +QEMU_COMM_TIMEOUT=3D$timeout_comm _send_qemu_cmd $src "{ 'execute': 'query-status' }" "return" =20 echo diff --git a/tests/qemu-iotests/192 b/tests/qemu-iotests/192 index 6193257..0344322 100755 --- a/tests/qemu-iotests/192 +++ b/tests/qemu-iotests/192 @@ -60,7 +60,11 @@ fi qemu_comm_method=3D"monitor" _launch_qemu -drive $DRIVE_ARG -incoming defer h=3D$QEMU_HANDLE -QEMU_COMM_TIMEOUT=3D1 +if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + QEMU_COMM_TIMEOUT=3D7 +else + QEMU_COMM_TIMEOUT=3D1 +fi =20 _send_qemu_cmd $h "nbd_server_start unix:$TEST_DIR/nbd" "(qemu)" _send_qemu_cmd $h "nbd_server_add -w drive0" "(qemu)" --=20 1.8.3.1 From nobody Fri May 10 17:22:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1567588480; cv=none; d=zoho.com; s=zohoarc; b=RY9LD4TIJApHb8in85Rcga+HHACxiR/pIxXcZnryxahiO2qPBT60r+pvHzG2Iai85So0K9BohFOHinETsisKPwQbNZ/CgbSmrbW9KCfnRcOkcE1jvg8kbzCfQuorK/tiz0WjbQyuvDJTaEVjGYT1Anby9nF+WpeC1S6QVFpnsvM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567588480; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xrwd20h95mu1o6+0w+5BFA4G43dzd3luRyH/mmGRYI8=; b=VXSw4PY8JhT3UDuQyyiNg06AZ48LAYAlT85RW+pTigCr0U2IqUjb0CrQo0hrpop1nTdNzSAJdnfc37Rs27JhA30kWKldsRM7lIXI/4gAFWQhf/MP18cfsSAQpsF82mF71y5xab+smQHmikXXu9fzjncWYGu+6e5s6P2sxZz1VUw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156758848055467.25064228093595; Wed, 4 Sep 2019 02:14:40 -0700 (PDT) Received: from localhost ([::1]:54876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RN5-0005wZ-D0 for importer@patchew.org; Wed, 04 Sep 2019 05:14:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5RKH-0003wo-3g for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5RKF-0004ms-BB for qemu-devel@nongnu.org; Wed, 04 Sep 2019 05:11:40 -0400 Received: from relay.sw.ru ([185.231.240.75]:47468) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5RKE-0004ky-Uj; Wed, 04 Sep 2019 05:11:39 -0400 Received: from [172.16.25.136] (helo=dhcp-172-16-25-136.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i5RKC-000708-IO; Wed, 04 Sep 2019 12:11:36 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Wed, 4 Sep 2019 12:11:24 +0300 Message-Id: <1567588284-975381-7-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1567588284-975381-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v8 6/6] iotests: extend sleeping time under Valgrind X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 deletion(-) diff --git a/tests/qemu-iotests/247 b/tests/qemu-iotests/247 index 546a794..c853b73 100755 --- a/tests/qemu-iotests/247 +++ b/tests/qemu-iotests/247 @@ -57,7 +57,11 @@ TEST_IMG=3D"$TEST_IMG.4" _make_test_img $size {"execute":"block-commit", "arguments":{"device":"format-4", "top-node": "format-2", "base-node":"fo= rmat-0", "job-id":"job0"}} EOF -sleep 1 +if [ "${VALGRIND_QEMU}" =3D=3D "y" ]; then + sleep 10 +else + sleep 1 +fi echo '{"execute":"quit"}' ) | $QEMU -qmp stdio -nographic -nodefaults \ -blockdev file,node-name=3Dfile-0,filename=3D$TEST_IMG.0,auto-read-onl= y=3Don \ --=20 1.8.3.1