From nobody Fri Apr 19 05:17:51 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=1560276528; cv=none; d=zoho.com; s=zohoarc; b=hVkHKsvxkAemj42BxET1zHLZOpa5jcYeauzlqT2u1pCvZIZv+Z3TG+b45ZmgjbATwf2N3qk+K5ga0HvZalgTxnj4QqJu8O41CLv6hf3OCZmaQdZ6piwz5PqNOz8P/4zPuXq0m0iSq1KEExFnO877HyjXeWrw4NG31J591IhcgTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276528; 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=wgFQcB/kRj4+VGSOhqJ+rIQEs8RuhQmP5G9MD92Szsg=; b=oBMDuBOxRXIw25aMHuLwpt443tl8pn6Uo6BGRV0BSLgoOgEbAp4oEBffjiCTplRNfrVAdkp09jbuAJoEmram7bIl6A/U4Ajk1g7HZupbCwxhgkraAb22M88qZ9y1yMtggwkyFjEj4zKBljAe5Sio94hYd65gz11KaLQLCzVqAtg= 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 156027652827861.98077064949257; Tue, 11 Jun 2019 11:08:48 -0700 (PDT) Received: from localhost ([::1]:33570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1halCP-0002dK-6y for importer@patchew.org; Tue, 11 Jun 2019 14:08:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42283) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6K-00067t-LM for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6G-0005Qd-Q8 for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:26 -0400 Received: from relay.sw.ru ([185.231.240.75]:34312) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6C-0005Iu-Bh; Tue, 11 Jun 2019 14:02:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal65-0002AB-Bc; Tue, 11 Jun 2019 21:02:13 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:05 +0300 Message-Id: <1560276131-683243-2-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 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, berrange@redhat.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 or they may be listed in the Valgrind checked file ./.valgrindrc or ~/.valgrindrc like --memcheck:leak-check=3Dno --memcheck:track-origins=3Dyes After including the Valgrind into the QEMU processes wrappers in the common.rc script, the benchmark output for the tests 039 061 137 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 +--- tests/qemu-iotests/common.rc | 65 ++++++++++++++++++++++++++++++++--------= ---- 4 files changed, 56 insertions(+), 57 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 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 Fri Apr 19 05:17:51 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=1560276533; cv=none; d=zoho.com; s=zohoarc; b=iUHalDqw1b99a5PMcLiFxQUEQJRt3qL1NucuvqO2Op6k0y2KPyMs2FuneelUnLHSneXC3RYCriD3biP0r8CK7PxxiU1A/2Y88nn1Afhsi6ko0yUlb9O7bFlr7r9YWhIrRrPA4oEl1PgpkaovLn9SzKO8Adt7mgm/DGgkWgytfAk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276533; 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=TPcnCLtdUxwTXlEk+zqc0+lYQSoN06XbpaqsAll9hgGgDE9Eh9SYvk/XL7htUCsW/SObjcjXwOaVHKjIF75Ig1pHWvWdhUffwt9KXAq8NcatcmPAcW1X47Pd7IivIGpkJK6CUF+9DrZHb2GAtgO6Ib4pochoIHpnfacYCwQeiw4= 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 1560276533692867.1975220153405; Tue, 11 Jun 2019 11:08:53 -0700 (PDT) Received: from localhost ([::1]:33568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1halCO-0002bb-9C for importer@patchew.org; Tue, 11 Jun 2019 14:08:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42285) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6K-00067x-Lv for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6I-0005Sl-Pc for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:28 -0400 Received: from relay.sw.ru ([185.231.240.75]:34292) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6C-0005Iv-I7; Tue, 11 Jun 2019 14:02:22 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal65-0002AB-Gb; Tue, 11 Jun 2019 21:02:13 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:06 +0300 Message-Id: <1560276131-683243-3-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 2/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, berrange@redhat.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 Fri Apr 19 05:17:51 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=1560276350; cv=none; d=zoho.com; s=zohoarc; b=RGcZFiulppS8HpnG2THsAupnMmdD7AdqD0iIdAAcsi2LHzX+LifsgWvwkGnJegjS+wVxTE+RoelVBJwx/abXld4E/FaBObkLfyB/Gbtg3wFTerhzNeeVkl9D5SDBDib7nBq5CcAEJSF1M1qFGAYs83wIFYmn1AJmZeIOrM7JSMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276350; 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=l8O2AbWyHToyKlyD04CN0dBDbzXAXAJKNfgleLtTq4BCjBpTRXEH1wbBx2Ek2taW7RA9Fx303bVnSj1cYQArl77cqBK3fe9NJuYkjT0q8KyvyKdHvFNjTBz1KcEDg25zBMxS6ehXk1tqbTDyC6e7wDHRvviCADbaB/y95ksLIZY= 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 156027635025957.29449662861589; Tue, 11 Jun 2019 11:05:50 -0700 (PDT) Received: from localhost ([::1]:33550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal9W-00084E-Ak for importer@patchew.org; Tue, 11 Jun 2019 14:05:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42281) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6K-00067p-Ln for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6G-0005QA-Ih for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:26 -0400 Received: from relay.sw.ru ([185.231.240.75]:34302) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6C-0005It-BV; Tue, 11 Jun 2019 14:02:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal65-0002AB-Qs; Tue, 11 Jun 2019 21:02:14 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:07 +0300 Message-Id: <1560276131-683243-4-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 3/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, berrange@redhat.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 Fri Apr 19 05:17:51 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=1560276704; cv=none; d=zoho.com; s=zohoarc; b=Hn6tVINWgwrOJ+xhjxUydaHeh49xRElSrzNX2H10wh3a61+AMuEFbC4ET2YnXGIAulIIaoFm16VU8f0FfWz/MdgnBUjya18RtRtNLnx6q7CJrIrNV2IzV31Jtc+SzMErFegOCCqT0Yi6ByIFgyY61ZXPDLgXJ3Pb0GeKU1DPTKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276704; 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=P3ab8Y5KywbXVN0L7m2tsTfb43CO/YfUyE3bYj5MNqNYktdumnDgPV/xM27w4HJJKlCjLyJlDl8ejR2n4OpMBReBEoXCnTwwTs6Gfxl/8+VjUc/K2ThcNSW2WF0vk02BQoLi7bNYpEXT+RPgKUAMqFhTLRQ6UvKVSpQ/4lV+8ps= 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 1560276704802347.2619586252605; Tue, 11 Jun 2019 11:11:44 -0700 (PDT) Received: from localhost ([::1]:33598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1halFA-00058B-LB for importer@patchew.org; Tue, 11 Jun 2019 14:11:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42282) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6K-00067r-Ln for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6G-0005QY-Pv for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:26 -0400 Received: from relay.sw.ru ([185.231.240.75]:34300) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6C-0005Is-Bn; Tue, 11 Jun 2019 14:02:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal66-0002AB-9d; Tue, 11 Jun 2019 21:02:14 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:08 +0300 Message-Id: <1560276131-683243-5-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 4/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, berrange@redhat.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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- 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 Fri Apr 19 05:17:51 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=1560276532; cv=none; d=zoho.com; s=zohoarc; b=CjODNfHJDDo5cKvlByYO7Nx4RBo9FQj153Djf40t9UORkDqS7AiQxLJ34LVJu9nIYWDd1RWePosiIUF4u2OXBv1wf/VhOnr/WlKc1VeV+6WkM8un4qTRwLPFf47atGJNUg8hPYFx26C3v7Fsy17AvFoZjGrXhUOxsO3tYMDkI9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276532; 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=oRPOefMQo1oczdbHczzwiwzs4rNYa0kKg1v0T4O5pfaB1a9dH24dCUDEguDag2QYnVsgvgC3IiCpZMZehlLLUi8miz0o7UxuNQLyiMWzLwHlXr2Rtpx79OARPsJRd7UYX6Zsvmah1kSfkU9bNpjEg0LC6VagrNom2k/ioix+yVk= 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 1560276532723384.6151387023647; Tue, 11 Jun 2019 11:08:52 -0700 (PDT) Received: from localhost ([::1]:33572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1halCT-0002nE-QL for importer@patchew.org; Tue, 11 Jun 2019 14:08:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42326) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6M-0006A4-Jz for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6K-0005V9-JW for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from relay.sw.ru ([185.231.240.75]:34290) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6E-0005Ir-DX; Tue, 11 Jun 2019 14:02:24 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal66-0002AB-M3; Tue, 11 Jun 2019 21:02:14 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:09 +0300 Message-Id: <1560276131-683243-6-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 5/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, berrange@redhat.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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- 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 Fri Apr 19 05:17:51 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=1560276347; cv=none; d=zoho.com; s=zohoarc; b=B9fLa+x+F+ubrWLeU4QhS04EhEaaocdzGAtk7lmdZDPkOX9Glzeyc23k5KN/PKt2V/asfJHs6bTBZPKGYHih/tsq19HzUXpMeLxP94lrOGx7fy00boQ9NPwc6RWPxNRYySsPGVl0Ae8a/v2g5nsaXxcDg2xGeZJIRF6iDO//sN4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276347; 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=Xec/UDrptKdAKpi953jvrQ99dwqAL459MaJLZKav+nKAaFZ1ZaSS208eKO6XKH65jBr5oD4f/Gvgnm+zX4fCoMB32zCPFi1lLsXgyM63XEbS10BoLpwF0IUBECL3Xwto5xDX8Qk16xRhQ3s/4sVYz3GdIcwnDmjJwS3b+mioxiM= 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 1560276347210496.2504878253984; Tue, 11 Jun 2019 11:05:47 -0700 (PDT) Received: from localhost ([::1]:33552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal9W-00084W-9j for importer@patchew.org; Tue, 11 Jun 2019 14:05:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42286) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6K-00067y-M9 for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6I-0005S7-DD for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:28 -0400 Received: from relay.sw.ru ([185.231.240.75]:34314) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6C-0005Iy-IA; Tue, 11 Jun 2019 14:02:22 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal66-0002AB-T8; Tue, 11 Jun 2019 21:02:15 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:10 +0300 Message-Id: <1560276131-683243-7-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 6/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, berrange@redhat.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 From nobody Fri Apr 19 05:17:51 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=1560276766; cv=none; d=zoho.com; s=zohoarc; b=jKvus5AX2rqqLlM5rRRHiRl8i39SIYyQEEHWWS7+5Aau3pptNhHC6i20h7GVsFBBobOb4BpmJPM86P3y5XGsw9mbNzcdi+cWBn6cHXUt4DdHL0L5QyD2Kf8UGw2HwY0xk0YZEO3L2ot6NbS0/wtxCFD3B3aq/qBDe7Ui5WjgFL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560276766; 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=q7VsaCxv7V/e9fVRpxE1gh+RfSpNzNDeNlL4ULyAxbE=; b=P0cnxf1qcweKW/u5en2q61kdZQ+DSz4fsG8CiZKIVnNYCsvZ7TZMG+YtiClZBuqoCf9ErB2pHf8te5wWU1awogo9CmjdcSp2xARUBmOYnQrLa8kSyumBpHoOcfmH7MfE5jxPFvTK2V6Uc5c/ae5vqLRjb2yiimJD1LkL181hqJ4= 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 1560276766784937.920078098398; Tue, 11 Jun 2019 11:12:46 -0700 (PDT) Received: from localhost ([::1]:33606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1halGH-0006Pb-Rq for importer@patchew.org; Tue, 11 Jun 2019 14:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42284) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hal6K-00067w-N9 for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hal6I-0005Sg-PU for qemu-devel@nongnu.org; Tue, 11 Jun 2019 14:02:28 -0400 Received: from relay.sw.ru ([185.231.240.75]:34320) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hal6C-0005Ix-HY; Tue, 11 Jun 2019 14:02:22 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hal67-0002AB-6k; Tue, 11 Jun 2019 21:02:15 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 11 Jun 2019 21:02:11 +0300 Message-Id: <1560276131-683243-8-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560276131-683243-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1560276131-683243-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 v2 7/7] iotests: new file to suppress Valgrind errors 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, berrange@redhat.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 reports about an uninitialised memory usage when the initialization is actually not needed. For example, the buffer 'buf' instantiated on a stack of the function guess_disk_lchs(). Let's use the Valgrind technology to suppress the unwanted reports by adding the Valgrind specific format file valgrind.supp to the QEMU project. The file content is extendable for future needs. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.rc | 5 ++++- tests/qemu-iotests/valgrind.supp | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/qemu-iotests/valgrind.supp diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 3caaca4..9b74890 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -17,6 +17,8 @@ # along with this program. If not, see . # =20 +readonly VALGRIND_SUPPRESS_ERRORS=3D./valgrind.supp + SED=3D for sed in sed gsed; do ($sed --version | grep 'GNU sed') > /dev/null 2>&1 @@ -65,7 +67,8 @@ _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 "$@" + exec valgrind --log-file=3D"${VALGRIND_LOGFILE}" --error-exitcode= =3D99 \ + --suppressions=3D"${VALGRIND_SUPPRESS_ERRORS}" "$@" else exec "$@" fi diff --git a/tests/qemu-iotests/valgrind.supp b/tests/qemu-iotests/valgrind= .supp new file mode 100644 index 0000000..78215b6 --- /dev/null +++ b/tests/qemu-iotests/valgrind.supp @@ -0,0 +1,31 @@ +# +# Valgrind errors suppression file for QEMU iotests +# +# Copyright (c) 2019 Virtuozzo International GmbH +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +{ + hw/block/hd-geometry.c + Memcheck:Cond + fun:guess_disk_lchs + fun:hd_geometry_guess + fun:blkconf_geometry + ... + fun:device_set_realized + fun:property_set_bool + fun:object_property_set + fun:object_property_set_qobject + fun:object_property_set_bool +} --=20 1.8.3.1