From nobody Sun May 12 21:48:57 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=1561730101; cv=none; d=zoho.com; s=zohoarc; b=XfKMN/eo5rJJP44YYY5U5yHlTCkO6PaeNJ1tbflimjG1ePrB5uoDD4wvwKOjkNbcCPL4ha48vvbaDfqvEo0QRxBEUxxVnMcXWurnVQL0tgjaFbse33+OOuuzxm8sKHMX1QQwdugrRkt8tZz7cGL3Lyt5aLgMMyM+8MRnEM7EyUU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561730101; 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=oVurEBkvzG7gCXyS9FoOTzfBnmNyVXgti6oL83W1aFc=; b=LrlqLg0vYLqVqogb8HQE+GTp3BKuhy0bB/4iQElwjMsHdODfHv1N+5Mckvy7aQZ+UaMgU0gF13Ay0o0+nZrgHgcJuHSHmN8OKn6ZnY3tOmcUyiEVIRRqY8H2qhZu1AObvQVl77QEIKdzNGJ5pjBFamghRIUo+9EAtaZTPZbCay0= 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 1561730101591534.3818136011619; Fri, 28 Jun 2019 06:55:01 -0700 (PDT) Received: from localhost ([::1]:60160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrL4-0000zz-MC for importer@patchew.org; Fri, 28 Jun 2019 09:54:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59638) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCo-0002RA-Kp for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004lD-JY for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:22 -0400 Received: from relay.sw.ru ([185.231.240.75]:41294) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004i3-9s; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCi-0008NT-6Q; Fri, 28 Jun 2019 16:46:16 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:08 +0300 Message-Id: <1561729574-530879-2-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 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, 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 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 | 69 ++++++++++++++++++++++++++++++++--------= ---- 4 files changed, 59 insertions(+), 58 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 5502c3d..6e461a1 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,36 +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() { - "$QEMU_NBD_PROG" --pid-file=3D"${QEMU_TEST_DIR}/qemu-nbd.pid" \ - $QEMU_NBD_OPTIONS "$@" + local VALGRIND_LOGFILE=3D"${TEST_DIR}"/$$.valgrind + ( + _qemu_proc_wrapper "${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 "$@" + _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 Sun May 12 21:48:57 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=1561731295; cv=none; d=zoho.com; s=zohoarc; b=ZhfySCPNf9lMaMvO822vF9SVg66aZ6gTblr9c3Cjrq3VZYgUxReVf/kLn1AAm9Om5kDSekvnVytt19Ao6SJLNFrpPwi/yWE+lE2gZVlFmzHZAK5zZhWubi3LdpmK0k/qE9ujBXEdxskSn6YwNMS+BEYBpdsp5ZBbChcCMJHc/4E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561731295; 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=yJLqCbh73y1FselFOZglvahw3DiaHNjFLDby8lYpkN4=; b=OdLxDJVzuri/JNin0B08K8+TaP4gDufpOU3mVoMAR1UCaICM4bmSv5uUfYDerHC1nzhX5HsbPx6SPL6DKuWYHKcD+H0SYCMGHtfl70+RUBou5zO0P4EzFACIgpdy1KH4AeEqKg6ZpLZTNB3n6HEttEw2/+V9OTDexEDTT6Q4nXE= 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 1561731295895339.61976918385096; Fri, 28 Jun 2019 07:14:55 -0700 (PDT) Received: from localhost ([::1]:60438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgreL-0001Vr-TR for importer@patchew.org; Fri, 28 Jun 2019 10:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59621) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCo-0002QG-1k for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004lI-Jx for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:21 -0400 Received: from relay.sw.ru ([185.231.240.75]:41266) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004hz-9t; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCi-0008NT-BS; Fri, 28 Jun 2019 16:46:16 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:09 +0300 Message-Id: <1561729574-530879-3-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 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, mreitz@redhat.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 in the multi-threaded process. The bug has been reported to the Valgrind maintainers. Let's exclude such test cases from running under the Valgrind because checking for the memory issues is covered by other test cases. 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 Sun May 12 21:48:57 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=1561733801; cv=none; d=zoho.com; s=zohoarc; b=B4yzeyEK/GVM7xH/qasUOkBHSiCUZji5MTvKXWsv2bApMckOPaBimiVa3uVUEabGkVBYYAhj6GJPpUWNk4BVaapeiA5Ac626jNFibYmSL5HikLz3QuabgLucBZ2krRcWq5ZFsFtdN9JDO7zOUKysx5gH7+sbcL7DBR+uS6BNHvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561733801; 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=RdRlulOvDz1hZRrWHY/l37vNGR0wa7osLxl5OTlYpoo=; b=RXN4yxqK6wOfdeddLJrwU/VS5Ki5OfU/HX5EbvRl0b7+mCpYpChV5Unf6uWxAz/gAl1ySr6blL6MNyzmLjMWvU0tBfUZzG3NqIs6czazMIfWucaGZOQs5JfSYwycHab3BE+HGQjp9k3JHG6K8u0baTB9No+oRHsRBa5lIjzKyJg= 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 1561733801222487.670792235754; Fri, 28 Jun 2019 07:56:41 -0700 (PDT) Received: from localhost ([::1]:32808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgsIh-0004YJ-Aj for importer@patchew.org; Fri, 28 Jun 2019 10:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59615) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCn-0002Q5-Vr for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004lb-Li for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:21 -0400 Received: from relay.sw.ru ([185.231.240.75]:41288) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004i7-B9; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCi-0008NT-Gc; Fri, 28 Jun 2019 16:46:16 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:10 +0300 Message-Id: <1561729574-530879-4-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 3/7] 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 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. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 6e461a1..1089050 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -428,6 +428,13 @@ _notrun() exit } =20 +# bail out, setting up .casenotrun file +# +_casenotrun() +{ + echo " [case not run] $*" >>"$OUTPUT_DIR/$seq.casenotrun" +} + # just plain bail out # _fail() --=20 1.8.3.1 From nobody Sun May 12 21:48:57 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=1561730962; cv=none; d=zoho.com; s=zohoarc; b=Dj98q2tbRe8N/ayscLtX1gX5gfI3FV8BAlnPAPlo+zN4yWxzdQINSgJZDq6FcbmUV7q8k67C2Q3B5gqK0irXRk934BOk8n4hdVtYC7mAEjPMAIZcNsHJqVg7eDhUrM9cmd39OcdL1QdVFQvc2CisbTncgC0vBErcR6h0e46yBr0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561730962; 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=ow1S3Lf7BRCRkuRmEhson6i1hGuKRDzaFrvg0tK6Fzo=; b=EVQya4D3svAKY/bNg2teVBZ5Tjd0VBhMJVz/2iL09btxdtsx1fxG+qZrOFG0lHJgsX7KjUYk+RoiPzrwftY77oXyxKmS2m5EPD1msnyzNOjNDM6CqpvfywqOgl7Ci6CQXkDc12M2xpY0wbVeV5Lmb7cT+iFGQLRD0jNrEGeQCBk= 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 1561730962231312.2150946583956; Fri, 28 Jun 2019 07:09:22 -0700 (PDT) Received: from localhost ([::1]:60384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrYx-0004PG-DO for importer@patchew.org; Fri, 28 Jun 2019 10:09:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59605) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCn-0002Pp-Kr for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004l2-J5 for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:21 -0400 Received: from relay.sw.ru ([185.231.240.75]:41280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004i5-9i; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCi-0008NT-M3; Fri, 28 Jun 2019 16:46:16 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:11 +0300 Message-Id: <1561729574-530879-5-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 4/7] 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 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 --- tests/qemu-iotests/051 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 200660f..2465e48 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}" =3D=3D "y" ]; then + _casenotrun "Valgrind needs a valid TMPDIR for itself" +fi +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 Sun May 12 21:48:57 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=1561729866; cv=none; d=zoho.com; s=zohoarc; b=NWmzZiL1dqA0acNOSVendsDZ+2uu9PHp2Qpy2aoKommOFEjY7CJBW9Z5gMxgB3LvomnwhNi+XImNLUWvhihS9mCtnajrUy7tObosQIvcmSF3xaIE+M1dJyxsP2MJ+16CIpmVun93Tk6TSH0pRNNFzg40MeSI3EvA+sjVftslBT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561729866; 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=SpDJm31QtjJ92WyDKdIkLYB1995IFg3XEtxWmC1u5Es=; b=d6lDFF1m5f34IGL/XcINJxmJjmHsB0ydquPdR5I5v+IJyFAukOet2IMGAbf4ncMxQLLrFitMwgKNwvNv60nuUHuHthS8sA+qESsWb6WaRaW69qOMJvQohYEscPkCmYVedBmUuIb5lZxkgJcnAHHERb3URI8SwlT2jiRa7kF+BkQ= 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 1561729866522696.5395015072538; Fri, 28 Jun 2019 06:51:06 -0700 (PDT) Received: from localhost ([::1]:60120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrHK-0005a4-M5 for importer@patchew.org; Fri, 28 Jun 2019 09:51:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59618) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCo-0002QA-0n for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004l8-Jk for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:21 -0400 Received: from relay.sw.ru ([185.231.240.75]:41276) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004i2-9u; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCi-0008NT-Rh; Fri, 28 Jun 2019 16:46:16 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:12 +0300 Message-Id: <1561729574-530879-6-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 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, 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..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 Sun May 12 21:48:57 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=1561733399; cv=none; d=zoho.com; s=zohoarc; b=SU/8nUK7BIdWgQj15D96DP71BJdIa8msoQYL1NeVt8AvhvinxoYwQy/qY7WLXuXr0mSljUoHhvv6hi1eQnr1DNMq3FbtYQi9vaqNPZLqx0ZZ5mCcSdW0QnSNFQFv+yjC0QP5il+PEf0/4hwsxHOTrx+nJ7qVd9uJeCFC/2h70yE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561733399; 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=19eP9SJEHhc93VxA6aVnMEWE5ys85rX/qZvXL5rFPlc=; b=jm3EpvFvgH3rlQsAFbaTj7hoCAGkiQro69KtbasYgzccKLBQIr3OSRQ53j/nBZi0N8kH1JibCqFhRpCwGys08JMO2Z+Chs+lXaWWnpYwhH+mbcqqckiNTsn0tT2Fud8oYRnfOsX4DT6MWSO9EUh38p6kyjzjHLeyrUyby0i2SK4= 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 1561733399307564.0802218234534; Fri, 28 Jun 2019 07:49:59 -0700 (PDT) Received: from localhost ([::1]:32774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgsBu-0000QW-92 for importer@patchew.org; Fri, 28 Jun 2019 10:49:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59611) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCn-0002Q0-Sw for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004lW-L1 for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:21 -0400 Received: from relay.sw.ru ([185.231.240.75]:41278) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004i1-Au; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCj-0008NT-1L; Fri, 28 Jun 2019 16:46:17 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:13 +0300 Message-Id: <1561729574-530879-7-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 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, 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 in 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..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 From nobody Sun May 12 21:48:57 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=1561732059; cv=none; d=zoho.com; s=zohoarc; b=e+wSUSeKRzXNkZrQo2hZr3+Gj7YuEbAu6yH2SL6rL6hcwQthrFkObDp2/wDdvqgI8MZfCJoyZFDRqe7wKgxNwkSl2jtPvy40A63jpHYlJIzdl4krxW2GRHpRYOV4h9+GGu6+QU5xdiRBSesyuS6xvIvWazrXX8lmzfug5HFQL5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561732059; 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=fr1gGzfGjajbgl1DoKVlimLVUIORfwcNRSSFetnoj5E=; b=IhOTLKQYXsd9OdicOHtHOdN/vYBEgZrlJUdkhFPCZMNEy+pTIUDJMcvHBGYVu9kJGZVo7Fj9l9x3QXLZmM9IZABQ9udjd+GPgSVWU0WRR3HdmEIdO7stGOaFurLulPNB0L0JXRv2zqikpns67Q5GSHNVqe9v+aj5d1UoIC4qBtY= 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 1561732059087521.5037641817377; Fri, 28 Jun 2019 07:27:39 -0700 (PDT) Received: from localhost ([::1]:60648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrqe-0003gM-Qg for importer@patchew.org; Fri, 28 Jun 2019 10:27:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59718) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrCs-0002V3-0S for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgrCm-0004lk-PX for qemu-devel@nongnu.org; Fri, 28 Jun 2019 09:46:25 -0400 Received: from relay.sw.ru ([185.231.240.75]:41292) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgrCm-0004i4-BA; Fri, 28 Jun 2019 09:46:20 -0400 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hgrCj-0008NT-6l; Fri, 28 Jun 2019 16:46:17 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Fri, 28 Jun 2019 16:46:14 +0300 Message-Id: <1561729574-530879-8-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1561729574-530879-1-git-send-email-andrey.shinkevich@virtuozzo.com> References: <1561729574-530879-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 v3 7/7] iotests: Set read-zeroes on in null block driver for 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 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 the uninitialised buffer 'buf' instantiated on the stack of the function guess_disk_lchs(). It is revealed in the tests 051, 186, 227 and 240. Pass 'read-zeroes=3Don' to the null block driver in the mentioned tests to make them deterministic. The output of the tests above now includes the parameter 'read-zeroes'. So, the benchmark output files are being changed too. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/051 | 10 +-- tests/qemu-iotests/051.pc.out | 10 +-- tests/qemu-iotests/186 | 20 +++--- tests/qemu-iotests/186.out | 152 +++++++++++++++++++++-----------------= ---- tests/qemu-iotests/227 | 4 +- tests/qemu-iotests/227.out | 4 +- tests/qemu-iotests/240 | 8 +-- 7 files changed, 104 insertions(+), 104 deletions(-) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 2465e48..f8141ca 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -251,11 +251,11 @@ echo # Cannot use the test image because cache=3Dnone might not work on the hos= t FS # Use cdrom so that we won't get errors about missing media =20 -run_qemu -drive driver=3Dnull-co,cache=3Dnone -run_qemu -drive driver=3Dnull-co,cache=3Ddirectsync -run_qemu -drive driver=3Dnull-co,cache=3Dwriteback -run_qemu -drive driver=3Dnull-co,cache=3Dwritethrough -run_qemu -drive driver=3Dnull-co,cache=3Dunsafe +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dnone +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Ddirectsync +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwriteback +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwritethrough +run_qemu -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dunsafe run_qemu -drive driver=3Dnull-co,cache=3Dinvalid_value =20 # Can't test direct=3Don here because O_DIRECT might not be supported on t= his FS diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 2d811c1..000557c 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -245,23 +245,23 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 =3D=3D=3D Cache modes =3D=3D=3D =20 -Testing: -drive driver=3Dnull-co,cache=3Dnone +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dnone QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Ddirectsync +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Ddirectsync QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Dwriteback +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwriteback QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Dwritethrough +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dwritethrough QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive driver=3Dnull-co,cache=3Dunsafe +Testing: -drive driver=3Dnull-co,read-zeroes=3Don,cache=3Dunsafe QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 7e7d45b..5f6b18c 100755 --- a/tests/qemu-iotests/186 +++ b/tests/qemu-iotests/186 @@ -86,8 +86,8 @@ echo "=3D=3D=3D -blockdev/-device=3D =3D=3D=3D" echo =20 for dev in $fixed $removable; do - check_info_block -blockdev driver=3Dnull-co,node-name=3Dnull -device $= dev,drive=3Dnull - check_info_block -blockdev driver=3Dnull-co,node-name=3Dnull -device $= dev,drive=3Dnull,id=3Dqdev_id + check_info_block -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name= =3Dnull -device $dev,drive=3Dnull + check_info_block -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name= =3Dnull -device $dev,drive=3Dnull,id=3Dqdev_id done =20 echo @@ -97,7 +97,7 @@ echo # This creates two BlockBackends that will show up in 'info block'! # A monitor-owned one from -drive, and anonymous one from -device for dev in $fixed $removable; do - check_info_block -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -d= evice $dev,drive=3Dnull,id=3Dqdev_id + check_info_block -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,no= de-name=3Dnull -device $dev,drive=3Dnull,id=3Dqdev_id done =20 echo @@ -105,8 +105,8 @@ echo "=3D=3D=3D -drive if=3Dnone/-device=3D (w= ith medium) =3D=3D=3D" echo =20 for dev in $fixed $removable; do - check_info_block -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -d= evice $dev,drive=3Dnone0 - check_info_block -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -d= evice $dev,drive=3Dnone0,id=3Dqdev_id + check_info_block -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,no= de-name=3Dnull -device $dev,drive=3Dnone0 + check_info_block -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,no= de-name=3Dnull -device $dev,drive=3Dnone0,id=3Dqdev_id done =20 echo @@ -125,15 +125,15 @@ echo "=3D=3D=3D -drive if=3D... =3D=3D=3D" echo =20 check_info_block -drive if=3Dfloppy -check_info_block -drive if=3Dfloppy,driver=3Dnull-co +check_info_block -drive if=3Dfloppy,driver=3Dnull-co,read-zeroes=3Don =20 -check_info_block -drive if=3Dide,driver=3Dnull-co +check_info_block -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don check_info_block -drive if=3Dide,media=3Dcdrom -check_info_block -drive if=3Dide,driver=3Dnull-co,media=3Dcdrom +check_info_block -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don,media= =3Dcdrom =20 -check_info_block -drive if=3Dvirtio,driver=3Dnull-co +check_info_block -drive if=3Dvirtio,driver=3Dnull-co,read-zeroes=3Don =20 -check_info_block -drive if=3Dpflash,driver=3Dnull-co,size=3D1M +check_info_block -drive if=3Dpflash,driver=3Dnull-co,read-zeroes=3Don,size= =3D1M =20 # success, all done echo "*** done" diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out index 716b01a..5b35040 100644 --- a/tests/qemu-iotests/186.out +++ b/tests/qemu-iotests/186.out @@ -54,103 +54,103 @@ qdev_id: [not inserted] =20 =3D=3D=3D -blockdev/-device=3D =3D=3D=3D =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-hd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-hd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-hd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-hd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-hd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-hd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device virtio-blk-pc= i,drive=3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice virtio-blk-pci,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device virtio-blk-pc= i,drive=3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice virtio-blk-pci,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device floppy,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice floppy,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device floppy,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice floppy,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-cd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-cd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device ide-cd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice ide-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-cd,drive= =3Dnull +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-cd,drive=3Dnull QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -blockdev driver=3Dnull-co,node-name=3Dnull -device scsi-cd,drive= =3Dnull,id=3Dqdev_id +Testing: -blockdev driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnull -dev= ice scsi-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -null: null-co:// (null-co) +null: json:{"read-zeroes": true, "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback @@ -159,76 +159,76 @@ null: null-co:// (null-co) =20 =3D=3D=3D -drive if=3Dnone/-device=3D =3D=3D=3D =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-hd= ,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-h= d,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-hd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device virtio= -blk-pci,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device virtio-blk-pci,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device floppy= ,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device floppy,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-cd= ,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-c= d,drive=3Dnull,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-cd,drive=3Dnull,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Removable device: not locked, tray closed Cache mode: writeback =20 -null: null-co:// (null-co) +null: json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback @@ -237,103 +237,103 @@ null: null-co:// (null-co) =20 =3D=3D=3D -drive if=3Dnone/-device=3D (with medium) =3D=3D=3D =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-hd= ,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-hd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-hd= ,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-hd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-h= d,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-hd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-h= d,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-hd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device virtio= -blk-pci,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device virtio-blk-pci,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device virtio= -blk-pci,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device virtio-blk-pci,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device floppy= ,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device floppy,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device floppy= ,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device floppy,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-cd= ,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-cd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device ide-cd= ,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device ide-cd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-c= d,drive=3Dnone0 +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-cd,drive=3Dnone0 QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dnone,driver=3Dnull-co,node-name=3Dnull -device scsi-c= d,drive=3Dnone0,id=3Dqdev_id +Testing: -drive if=3Dnone,driver=3Dnull-co,read-zeroes=3Don,node-name=3Dnu= ll -device scsi-cd,drive=3Dnone0,id=3Dqdev_id QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -none0 (null): null-co:// (null-co) +none0 (null): json:{"read-zeroes": "on", "driver": "null-co"} (null-co) Attached to: qdev_id Removable device: not locked, tray closed Cache mode: writeback @@ -408,19 +408,19 @@ floppy0: [not inserted] Removable device: not locked, tray closed (qemu) quit =20 -Testing: -drive if=3Dfloppy,driver=3Dnull-co +Testing: -drive if=3Dfloppy,driver=3Dnull-co,read-zeroes=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -floppy0 (NODE_NAME): null-co:// (null-co) +floppy0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (null= -co) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dide,driver=3Dnull-co +Testing: -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -ide0-hd0 (NODE_NAME): null-co:// (null-co) +ide0-hd0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (nul= l-co) Attached to: PATH Cache mode: writeback (qemu) quit @@ -433,27 +433,27 @@ ide0-cd0: [not inserted] Removable device: not locked, tray closed (qemu) quit =20 -Testing: -drive if=3Dide,driver=3Dnull-co,media=3Dcdrom +Testing: -drive if=3Dide,driver=3Dnull-co,read-zeroes=3Don,media=3Dcdrom QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only) +ide0-cd0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (nul= l-co, read-only) Attached to: PATH Removable device: not locked, tray closed Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dvirtio,driver=3Dnull-co +Testing: -drive if=3Dvirtio,driver=3Dnull-co,read-zeroes=3Don QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -virtio0 (NODE_NAME): null-co:// (null-co) +virtio0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co"} (null= -co) Attached to: PATH Cache mode: writeback (qemu) quit =20 -Testing: -drive if=3Dpflash,driver=3Dnull-co,size=3D1M +Testing: -drive if=3Dpflash,driver=3Dnull-co,read-zeroes=3Don,size=3D1M QEMU X.Y.Z monitor - type 'help' for more information (qemu) info block -pflash0 (NODE_NAME): json:{"driver": "null-co", "size": "1M"} (null-co) +pflash0 (NODE_NAME): json:{"read-zeroes": "on", "driver": "null-co", "size= ": "1M"} (null-co) Attached to: PATH Cache mode: writeback (qemu) quit diff --git a/tests/qemu-iotests/227 b/tests/qemu-iotests/227 index bdd727a..637d7c3 100755 --- a/tests/qemu-iotests/227 +++ b/tests/qemu-iotests/227 @@ -57,7 +57,7 @@ echo echo '=3D=3D=3D blockstats with -drive if=3Dvirtio =3D=3D=3D' echo =20 -run_qemu -drive driver=3Dnull-co,if=3Dvirtio <