From nobody Mon May 20 13:24:59 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=1560105844; cv=none; d=zoho.com; s=zohoarc; b=oECTmyUyP3CdzBZoArnzylHL2JuvCqfCecFkV99ruZcJZKVr6I8BhYYA2Ia4nAQf5ZBFEGjfejwZ6vFx81zNOfgUeOxePYTFNuQ7/QF4MhfMw0XgXC5dRiaknfUs2KlyadQ9QexrhXAgV/LeYJF1cobL/do3GEqCMLg7PBT9Iiw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560105844; 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=+yIVsDCdoARw36k8UUGxA/OPbSdkiflAT2x4GWsR4x4=; b=iTCAVM/4DxWnRniLGNlPiyJ4Yy8mn2Z0XeBL4bZMsLr0rCUj8yPPQtgOIEnjJeUGe24ju0g7sed4b6TJ0TUJGSMgibEb77xveemBPSnMzXzwmqve1xkIHg39ZYn+SSguc4jOagc348Jv5xLYU3Fp//E0udq7CXnPNa/FUTkXRZA= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560105844071911.9825873644861; Sun, 9 Jun 2019 11:44:04 -0700 (PDT) Received: from localhost ([::1]:37464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2nK-0002Uv-R5 for importer@patchew.org; Sun, 09 Jun 2019 14:43:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49282) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fc-0004Rq-My for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fb-00065O-3j for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:56 -0400 Received: from relay.sw.ru ([185.231.240.75]:47580) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062X-QP; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fV-00087U-Mn; Sun, 09 Jun 2019 21:35:49 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:42 +0300 Message-Id: <1560105348-459129-2-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 1/7] 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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 -qcow2 -valgrind Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.rc | 65 ++++++++++++++++++++++++++++++++--------= ---- 1 file changed, 48 insertions(+), 17 deletions(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 93f8738..3caaca4 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -60,19 +60,52 @@ if ! . ./common.config exit 1 fi =20 +_qemu_proc_wrapper() +{ + 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 "$@" + _qemu_proc_wrapper "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTION= S "$@" ) + 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 + ( + _qemu_proc_wrapper "${VALGRIND_LOGFILE}" "$QEMU_IMG_PROG" $QEMU_IM= G_OPTIONS "$@" + ) + RETVAL=3D$? + _qemu_proc_valgrind_log "${VALGRIND_LOGFILE}" $RETVAL + return $RETVAL } =20 _qemu_io_wrapper() @@ -85,38 +118,36 @@ _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 + _qemu_proc_wrapper "${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() { + local VALGRIND_LOGFILE=3D"${TEST_DIR}"/$$.valgrind ( echo $BASHPID > "${QEMU_TEST_DIR}/qemu-nbd.pid" - exec "$QEMU_NBD_PROG" $QEMU_NBD_OPTIONS "$@" + _qemu_proc_wrapper "${VALGRIND_LOGFILE}" "$QEMU_NBD_PROG" $QEMU_NB= D_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 "$@" + _qemu_proc_wrapper "${VALGRIND_LOGFILE}" "$QEMU_VXHS_PROG" $QEMU_V= XHS_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 Mon May 20 13:24:59 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=1560105514; cv=none; d=zoho.com; s=zohoarc; b=GiB5OrVOWIXCD5KaBGCnNj0jk3Ljt4ys0tERv9wn9yqhTJ1zm6kYgg52rNlv58qmZ1bQ3fNi2oiSE8V+wa6di2OWGr1gkt60NVF7hia52PkWbi6bZGpuxgwsfkzLPJ+xRnpnvptFdwgVvhljhT6eqqyqNQ02/lEnXHLZ2q4+Gj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560105514; 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=odKW9EJtF/Dn5kc+eZMIA/9A8JFGQZuBli4qkO8iQOo=; b=OjZUqZqf89+xi6Wisb6tf0ownappRqD3cKEN/3LlJf9MJv1YxP2aIPcgBVGPplffqy8YjrY6UFQ8ifws/mLFWGMapXs5cEzz5aaTjKmaDk1aL/BQMKHtv0l5YrqCaiciW6b6diawTw86fpiALqNsI0PEsJaSBCpZje//NijcUpY= 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 1560105513859100.45625286240386; Sun, 9 Jun 2019 11:38:33 -0700 (PDT) Received: from localhost ([::1]:37424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2i4-0005uz-M5 for importer@patchew.org; Sun, 09 Jun 2019 14:38:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49295) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fd-0004Ru-2v for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fa-00064R-MO for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:56 -0400 Received: from relay.sw.ru ([185.231.240.75]:47584) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062Y-D3; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fW-00087U-1J; Sun, 09 Jun 2019 21:35:50 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:43 +0300 Message-Id: <1560105348-459129-3-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 2/7] iotests: amendment for benchmark output of 039 061 137 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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" After including the Valgrind into the QEMU processes wrappers in the common.rc script, the output for the tests 039 061 137 has been changed and is to be amended. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/039.out | 30 +++++------------------------- tests/qemu-iotests/061.out | 12 ++---------- tests/qemu-iotests/137.out | 6 +----- 3 files changed, 8 insertions(+), 40 deletions(-) diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out index 724d7b2..972c6c0 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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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..8cb57eb 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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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..7fed5e6 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 ( _qemu_proc_wrapper "${VALGRIND_LOGF= ILE}" "$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 --=20 1.8.3.1 From nobody Mon May 20 13:24:59 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=1560106029; cv=none; d=zoho.com; s=zohoarc; b=HqakVqjZ4ZNkd02ACYosOiODmqO4Wj64NM8uN6wjEtopCU2WHm8/hzaB1BNA96FT5e7cg1Me58boe8b4g0qtDt5WjZn0Mw7c9894Znwpy+IpVVW7Nj/kYQqW+jvoY6WFP9KCHGLyJfxb+DttJOg1eUcv5j4UTBnIKfhJuC4c4pI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560106029; 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=I3JDppJo3yZKkB8pLXTUWeyvUHnxtvsn1QFwBLirpG8=; b=QPwgL6EwaEYkABvWGNgMLqbYFqx803YdVeQ3i2WQP/5qe0DYoi64qR7SvD9z47i5uxZHnTG2AZeMmiFKxfQ/KvAzAspPgspBwfuo3FpcT78z3jlRpAG7P/Nq43n0F3wywQYDpqsZns2JVY2mi1v934+OeNKHs0xiUwFedYcPn5M= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 156010602955921.807465176457526; Sun, 9 Jun 2019 11:47:09 -0700 (PDT) Received: from localhost ([::1]:37492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2qJ-0004qx-FM for importer@patchew.org; Sun, 09 Jun 2019 14:46:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49283) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fc-0004Rr-No for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fa-00064L-MY for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:56 -0400 Received: from relay.sw.ru ([185.231.240.75]:47568) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062V-D2; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fW-00087U-BY; Sun, 09 Jun 2019 21:35:50 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:44 +0300 Message-Id: <1560105348-459129-4-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 3/7] 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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 when QEMU raises the signal SIGKILL. Lets exclude such test cases from running under the Valgrind because there is no sense to check memory issues that way. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/039 | 5 +++++ tests/qemu-iotests/061 | 2 ++ tests/qemu-iotests/137 | 1 + 3 files changed, 8 insertions(+) diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 0d4e963..95115e2 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 +VALGRIND_QEMU=3D"" \ $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 +VALGRIND_QEMU=3D"" \ $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 +VALGRIND_QEMU=3D"" \ $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 +VALGRIND_QEMU=3D"" \ $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 +VALGRIND_QEMU=3D"" \ $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..5d0724c 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 +VALGRIND_QEMU=3D"" \ $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 +VALGRIND_QEMU=3D"" \ $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..a442fc8 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 +VALGRIND_QEMU=3D"" \ $QEMU_IO \ -c "reopen -o lazy-refcounts=3Don,overlap-check=3Dblubb" \ -c "write -P 0x5a 0 512" \ --=20 1.8.3.1 From nobody Mon May 20 13:24:59 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=1560105723; cv=none; d=zoho.com; s=zohoarc; b=RNmkhztTy2agEiMYaV0bDL8dWFTDdY3X6vRW6U64f5aH1WEDqJYBTY/rfrbj5NTr35ntC/ZQSMx9jMRdulzyzJAq3WsKpAP+cTtjagUOqSYarTZmUWb21pte4zOIILblAB0Y8vQ7z+mB02PPcpV53cAbw85WKJL46J82BngpwTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560105723; 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=n9lU6m+6QcENQBvrED3vuXl8gH8xHeQJzTn3pOkwqLc=; b=AKaZQUQcnFJOPvLgPVrcdgI55+IdpKhMhk078XV8dIpenXgd6CMTrGPR8JdrkZ1FH5MtIK+oB7IIcQFH0SQgD5vEmCJJcws3n4tIgGSOayjscjGS3dgtxvphlxrGcMOxOFfP6aSEBIToBHFI4ekeZzDMcy4TUE5WM7O3FmFJJGw= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560105723358754.9202769846695; Sun, 9 Jun 2019 11:42:03 -0700 (PDT) Received: from localhost ([::1]:37446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2lL-0000c8-G3 for importer@patchew.org; Sun, 09 Jun 2019 14:41:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49266) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fc-0004Rm-8f for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fa-00064t-Tb for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:56 -0400 Received: from relay.sw.ru ([185.231.240.75]:47574) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062U-Jj; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fW-00087U-Qh; Sun, 09 Jun 2019 21:35:51 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:45 +0300 Message-Id: <1560105348-459129-5-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 4/7] iotests: Valgrind fails to work 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/051 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 200660f..ccc5bc2 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -377,6 +377,7 @@ printf %b "qemu-io $device_id \"write -P 0x33 0 4k\"\nc= ommit $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 +VALGRIND_QEMU=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 Mon May 20 13:24:59 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=1560105844; cv=none; d=zoho.com; s=zohoarc; b=Wrfgc1ftQcwsV119HocidJUCmbzzSMmMSsWRvNqoCn9jXHh3iGkACHPc3rFy1tnN8dzsyAxiN0U8zvnzqBvLOLzPM9qsKWoKxWnpRmM4NxZ3qIBSBV4TVeRSGnNcvHUkx9mZZ4dsL/IqEd0OUhboyfmiowvzIUdaYo5GEddb+ew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560105844; 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=wbJCeCW1VoxuROohFyjzhv4Ar5wPTHd++i3EAeGtcbY=; b=YPdogmcWdTa12A2dzK1evDmgjL+uqR9ipImZe2gullMp3SupcvpAHd6HeY5PV8vGoapGdiUb9dXr+t5K+TgwCHzO/p8hY6tjn3moVdJEAFAw+w+KOOrOSj3Y3dsT41poVtbTmZerOMKBjj+dAX6rrrM6waTeWGMw46L9HgzTH+Q= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560105844113764.4945669458731; Sun, 9 Jun 2019 11:44:04 -0700 (PDT) Received: from localhost ([::1]:37466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2nL-0002Wn-MZ for importer@patchew.org; Sun, 09 Jun 2019 14:43:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49276) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fc-0004Rp-EF for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fa-00064H-Lx for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:56 -0400 Received: from relay.sw.ru ([185.231.240.75]:47590) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062W-Cu; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fX-00087U-AD; Sun, 09 Jun 2019 21:35:51 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:46 +0300 Message-Id: <1560105348-459129-6-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 5/7] 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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 --- 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..2fd4405 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=3D4 +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..71feab8 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=3D1 +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..11ea037 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=3D4 +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 Mon May 20 13:24:59 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=1560105724; cv=none; d=zoho.com; s=zohoarc; b=KfpBYopehsxHG9EjBaqJR0DyeqgkImbrzgp85m0oUXvqWrd1pN0m4pGjIcfYsvRpbP36js9J3O7kaqrxOeOoC44YGra0iFsboYjx0lgSMl2hxH8nyaN/PN98f/9iCC1QyD00mMUsc8RP4e7ILopuGWl9gkeRBobSQJRafi/W9Qg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560105724; 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=Ut7F/k7mt/ir+ah1r9l/rmE2z9lPE9BdsfmF7wJWkpU=; b=JHsUooUzVOAAYvLiArBoNG4vXU/7BAVQ8NKmJQlmCpA1bJcDSCaJA/mpf54o4DdqFqaBnaMdLYHshzorp03emq8AnvLrVao2/renExglPDYEZjFHcqEDsbrlSrjvAcx0r3zgCwJhFknQbu2Ywmu9BNSD6s+Ck7y2tAySCskKp2Q= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 156010572410684.36885298997026; Sun, 9 Jun 2019 11:42:04 -0700 (PDT) Received: from localhost ([::1]:37448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2lN-0000el-6E for importer@patchew.org; Sun, 09 Jun 2019 14:41:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49268) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fc-0004Rn-9L for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fa-00064m-TT for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:56 -0400 Received: from relay.sw.ru ([185.231.240.75]:47592) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062r-J6; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fX-00087U-Qr; Sun, 09 Jun 2019 21:35:52 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:47 +0300 Message-Id: <1560105348-459129-7-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 6/7] 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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 int the test 247. Signed-off-by: Andrey Shinkevich --- 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..1036a17 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 5 +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 From nobody Mon May 20 13:24:59 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=1560105504; cv=none; d=zoho.com; s=zohoarc; b=AsU/c2WbwnU8yxXD/hwwhR9F9KyCVTImtUq3X5tj6ebDJRDbPm4I2bvvZd3J08ZynM54cHZTRiardBLTzHwJrzjPqpSDZWH7kMGTG53ISfY1uTl/cwU/wXOI2mxRgWiZK1LFlwKqLbvGA2OyIJp60hfy8AMZh7QH4ABcuy7giFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560105504; 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=+QTYj7Y2FVA1PbqAUPi0vVUr4KJ/fIdrqKpJ4mdMrQc=; b=dis7QpWaXMIuBnd3xkWHiaZFJJNTw95LohTxew7OXOEFsWAetw74i/PyREVmni3oER+lcR81+0ll4/M+6lbio5DT+FFKSNvCmh0f8TPDHSXlaSpeOAMTJ724fBaQT/PrydpR0YawjpAyLsRLDrDZll6JjIJDDpCrYQsOp77tYsU= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560105504501334.7227110185214; Sun, 9 Jun 2019 11:38:24 -0700 (PDT) Received: from localhost ([::1]:37420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2hn-0005oy-WF for importer@patchew.org; Sun, 09 Jun 2019 14:38:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49258) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha2fb-0004Rl-Vu for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha2fa-000649-LL for qemu-devel@nongnu.org; Sun, 09 Jun 2019 14:35:55 -0400 Received: from relay.sw.ru ([185.231.240.75]:47598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha2fa-00062t-DV; Sun, 09 Jun 2019 14:35:54 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1ha2fY-00087U-3W; Sun, 09 Jun 2019 21:35:52 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Sun, 9 Jun 2019 21:35:48 +0300 Message-Id: <1560105348-459129-8-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560105348-459129-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560105348-459129-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 7/7] iotests: amend QEMU NBD process synchronization 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, rkagan@virtuozzo.com, andrey.shinkevich@virtuozzo.com, den@openvz.org 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" Processes are dying harder under the Valgring. It results in counting the dying process as a newborn one. Make it sure that old NBD job get finished before starting a new one. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.nbd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/common.nbd b/tests/qemu-iotests/common.nbd index 25fc9ff..e3dcc60 100644 --- a/tests/qemu-iotests/common.nbd +++ b/tests/qemu-iotests/common.nbd @@ -22,6 +22,7 @@ nbd_unix_socket=3D"${TEST_DIR}/qemu-nbd.sock" nbd_tcp_addr=3D"127.0.0.1" nbd_pid_file=3D"${TEST_DIR}/qemu-nbd.pid" +nbd_job_pid=3D"" =20 nbd_server_stop() { @@ -33,6 +34,9 @@ nbd_server_stop() kill "$NBD_PID" fi fi + if [ -n "$nbd_job_pid" ] && kill -s 0 "$nbd_job_pid" 2>/dev/null; then + wait "$nbd_job_pid" + fi rm -f "$nbd_unix_socket" } =20 @@ -61,6 +65,7 @@ nbd_server_start_unix_socket() { nbd_server_stop $QEMU_NBD -v -t -k "$nbd_unix_socket" "$@" & + nbd_job_pid=3D$! nbd_server_wait_for_unix_socket $! } =20 @@ -105,5 +110,6 @@ nbd_server_start_tcp_socket() { nbd_server_stop $QEMU_NBD -v -t -b $nbd_tcp_addr -p $nbd_tcp_port "$@" & + nbd_job_pid=3D$! nbd_server_wait_for_tcp_socket $! } --=20 1.8.3.1