qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] iotests: disable core dumps in test 061
Date: Wed, 23 Sep 2015 19:17:10 +0200	[thread overview]
Message-ID: <5602DE96.5070108@redhat.com> (raw)
In-Reply-To: <1443024701-32184-1-git-send-email-berto@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 2919 bytes --]

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.
> 
> We cannot guarantee that core dumps can be enabled in all cases, so we
> should disable them completely and update the test output accordingly.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  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

> 
> 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
>  
> +# Disable core dumps or they'll mess up the test output
> +ulimit -c 0
> +
>  echo
>  echo "=== Testing version downgrade with zero expansion ==="
>  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=IMGFMT size=67108864
>  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_IO_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=IMGFMT size=67108864
>  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_IO_PROG" $QEMU_IO_OPTIONS "$@" )
> +./common.config: Aborted                 ( exec "$QEMU_IO_PROG" $QEMU_IO_OPTIONS "$@" )
>  magic                     0x514649fb
>  version                   3
>  backing_file_offset       0x0
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-09-23 17:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 16:11 [Qemu-devel] [PATCH] iotests: disable core dumps in test 061 Alberto Garcia
2015-09-23 17:17 ` Max Reitz [this message]
2015-09-24  6:45   ` Markus Armbruster
2015-09-24 10:07     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5602DE96.5070108@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).