From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZenfR-0008D8-PP for qemu-devel@nongnu.org; Wed, 23 Sep 2015 13:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZenfO-0003VY-DE for qemu-devel@nongnu.org; Wed, 23 Sep 2015 13:17:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZenfO-0003Ur-68 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 13:17:14 -0400 References: <1443024701-32184-1-git-send-email-berto@igalia.com> From: Max Reitz Message-ID: <5602DE96.5070108@redhat.com> Date: Wed, 23 Sep 2015 19:17:10 +0200 MIME-Version: 1.0 In-Reply-To: <1443024701-32184-1-git-send-email-berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FsXmqrmcGJlb81kmrkLs689keRiq6He3R" Subject: Re: [Qemu-devel] [PATCH] iotests: disable core dumps in test 061 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FsXmqrmcGJlb81kmrkLs689keRiq6He3R Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 23.09.2015 18:11, Alberto Garcia wrote: > Commit 934659c460 disabled the supression of segmentation faults in > bash tests. The new output of test 061, however, assumes that a core > dump will be produced if a program aborts. This is not necessarily the > case because core dumps can be disabled using ulimit. >=20 > We cannot guarantee that core dumps can be enabled in all cases, so we > should disable them completely and update the test output accordingly. >=20 > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/061 | 3 +++ > tests/qemu-iotests/061.out | 4 ++-- > 2 files changed, 5 insertions(+), 2 deletions(-) As noted in the commit message for 3f394472c5bca59de5cab9baafdff1984b0213a3, ulimit -c 0 does not work for everyone (for instance, for me it fails, probably because I'm using systemd's coredumpctl). Generally speaking, it'll only prevent a core dump from being created if your /proc/sys/kernel/core_pattern points to a file, but it won't if it points to a program for gathering the dump. What we really want is to use "sigraise $(kill -l KILL)" instead of "abort", because SIGKILL never creates a core dump, but will have basically the same effect of crashing qemu-io. Max >=20 > diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061 > index 1df887a..7d8415b 100755 > --- a/tests/qemu-iotests/061 > +++ b/tests/qemu-iotests/061 > @@ -43,6 +43,9 @@ _supported_fmt qcow2 > _supported_proto file > _supported_os Linux > =20 > +# Disable core dumps or they'll mess up the test output > +ulimit -c 0 > + > echo > echo "=3D=3D=3D Testing version downgrade with zero expansion =3D=3D=3D= " > echo > diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out > index a683f46..0499138 100644 > --- a/tests/qemu-iotests/061.out > +++ b/tests/qemu-iotests/061.out > @@ -57,7 +57,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.config: Aborted (core dumped) ( exec "$QEMU_I= O_PROG" $QEMU_IO_OPTIONS "$@" ) > +./common.config: Aborted ( exec "$QEMU_IO_PROG" $QEMU_= IO_OPTIONS "$@" ) > magic 0x514649fb > version 3 > backing_file_offset 0x0 > @@ -215,7 +215,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.config: Aborted (core dumped) ( exec "$QEMU_I= O_PROG" $QEMU_IO_OPTIONS "$@" ) > +./common.config: Aborted ( exec "$QEMU_IO_PROG" $QEMU_= IO_OPTIONS "$@" ) > magic 0x514649fb > version 3 > backing_file_offset 0x0 >=20 --FsXmqrmcGJlb81kmrkLs689keRiq6He3R Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWAt6WAAoJEDuxQgLoOKytVyEH/iJbBmbWD0s4/apQJrlmoHsJ nuT3ZRCr9wJjdb/vqPD08v46rEzeml4KpRX0/W00jHo5fySEn7jZbfBoG1GkxZ1F YKPpNAiO0NPVkvWPNwVn5sMcfYQd7+7c8WnWvBUC6Rjjmf6A2o7xdaoyCVlwPREx AYAkw2CXtMyTkv1m/9Gt5d5RDeQAsK5RTGngbXEvTOUUL1awpkOsYHIGWi0bwHWY aZnDkO2XCcInvIb4opKDrAr5TZsgkp16PLkijeB8Ztc5cglR9NDKff4bW8EVfSTy Pjd93LL93InA5T8U/qO8hspnw011r+VPicq7W3K6Vzy/NbPXxg8j69mZZBLFacE= =Ybl3 -----END PGP SIGNATURE----- --FsXmqrmcGJlb81kmrkLs689keRiq6He3R--