linux-debuggers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Petr Tesařík" <petr@tesarici.cz>
To: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: linux-debuggers@vger.kernel.org
Subject: Re: [PATCH libkdumpfile] tests: skip tests which apply to disabled compression
Date: Mon, 22 Jan 2024 07:21:14 +0100	[thread overview]
Message-ID: <20240122072114.56792cbb@meshulam.tesarici.cz> (raw)
In-Reply-To: <20240119195224.3000110-1-stephen.s.brennan@oracle.com>

Hi Stephen,

On Fri, 19 Jan 2024 11:52:24 -0800
Stephen Brennan <stephen.s.brennan@oracle.com> wrote:

> If configured --without-libzstd, for example, the diskdump-basic-zstd
> test will return an ERROR code, causing "make check" to fail. Even using
> XFAIL_TESTS will not resolve the error, because the return code is
> ERROR, not FAIL.

Yes, this has been on my agenda, but with a low priority, because people
who run "make check" usually also configure all available features.

Thanks for taking care of this. The patch looks good to me.

You've earned extra points for patching an m4 macro!

Petr T

> Instead, conditionally include the tests based on whether we are
> compiling with each compression format. This way, we don't test
> unsupported features.
> 
> Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
> ---
>  m4/compression.m4 |  1 +
>  tests/Makefile.am | 17 +++++++++++++----
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/m4/compression.m4 b/m4/compression.m4
> index 6755ef1..8cb7ce2 100644
> --- a/m4/compression.m4
> +++ b/m4/compression.m4
> @@ -32,4 +32,5 @@ AC_SUBST([$2][_REQUIRES])
>  AC_SUBST([$2][_CFLAGS])
>  AC_SUBST([$2][_LIBS])
>  AC_SUBST([$2][_PC_LIBS])
> +AM_CONDITIONAL(HAVE_$2, test "x$have_$1" = xyes)
>  ])
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 0c03b20..8ac90b3 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -196,10 +196,6 @@ test_scripts = \
>  	diskdump-empty-s390x \
>  	diskdump-empty-x86_64 \
>  	diskdump-basic-raw \
> -	diskdump-basic-zlib \
> -	diskdump-basic-lzo \
> -	diskdump-basic-snappy \
> -	diskdump-basic-zstd \
>  	diskdump-flat-raw \
>  	diskdump-multiread \
>  	diskdump-excluded \
> @@ -331,6 +327,19 @@ test_scripts = \
>  	xlat-xen-x86_64-4.6-bigmem \
>  	zero-size
>  
> +if HAVE_ZSTD
> +test_scripts += diskdump-basic-zstd
> +endif
> +if HAVE_ZLIB
> +test_scripts += diskdump-basic-zlib
> +endif
> +if HAVE_LZO
> +test_scripts += diskdump-basic-lzo
> +endif
> +if HAVE_SNAPPY
> +test_scripts += diskdump-basic-snappy
> +endif
> +
>  dist_check_DATA = \
>  	addrmap-single-begin.expect \
>  	addrmap-single-middle.expect \


      reply	other threads:[~2024-01-22  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 19:52 [PATCH libkdumpfile] tests: skip tests which apply to disabled compression Stephen Brennan
2024-01-22  6:21 ` Petr Tesařík [this message]

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=20240122072114.56792cbb@meshulam.tesarici.cz \
    --to=petr@tesarici.cz \
    --cc=linux-debuggers@vger.kernel.org \
    --cc=stephen.s.brennan@oracle.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).