All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
	david@redhat.com, cohuck@redhat.com, nrb@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH 2/5] s390x: css: Skip if we're not run by qemu
Date: Mon, 17 Jan 2022 08:01:39 +0100	[thread overview]
Message-ID: <80006dc9-039c-d729-f84c-af964314442f@redhat.com> (raw)
In-Reply-To: <20220114100245.8643-3-frankja@linux.ibm.com>

On 14/01/2022 11.02, Janosch Frank wrote:
> There's no guarantee that we even find a device at the address we're
> testing for if we're not running under QEMU.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>   s390x/css.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/s390x/css.c b/s390x/css.c
> index 881206ba..c24119b4 100644
> --- a/s390x/css.c
> +++ b/s390x/css.c
> @@ -15,6 +15,7 @@
>   #include <interrupt.h>
>   #include <asm/arch_def.h>
>   #include <alloc_page.h>
> +#include <vm.h>
>   
>   #include <malloc_io.h>
>   #include <css.h>
> @@ -350,6 +351,12 @@ int main(int argc, char *argv[])
>   {
>   	int i;
>   
> +	/* There's no guarantee where our devices are without qemu */
> +	if (!vm_is_kvm() && !vm_is_tcg()) {
> +		report_skip("Not running under QEMU");
> +		goto done;
> +	}

You've added the check before the report_prefix_push() ...

>   	report_prefix_push("Channel Subsystem");
>   	enable_io_isc(0x80 >> IO_SCH_ISC);
>   	for (i = 0; tests[i].name; i++) {
> @@ -357,7 +364,8 @@ int main(int argc, char *argv[])
>   		tests[i].func();
>   		report_prefix_pop();
>   	}
> -	report_prefix_pop();
>   
> +done:
> +	report_prefix_pop();

... but in case of the goto you now do the pop without the push. I think you 
have to drop the second hunk.

  Thomas


>   	return report_summary();
>   }


  parent reply	other threads:[~2022-01-17  7:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 10:02 [kvm-unit-tests PATCH 0/5] s390x: Allocation and hosting environment detection fixes Janosch Frank
2022-01-14 10:02 ` [kvm-unit-tests PATCH 1/5] lib: s390x: vm: Add kvm and lpar vm queries Janosch Frank
2022-01-14 11:18   ` Claudio Imbrenda
2022-01-14 12:28     ` Janosch Frank
2022-01-14 12:55       ` Claudio Imbrenda
2022-01-14 13:27   ` Nico Boehr
2022-01-14 13:35     ` Janosch Frank
2022-01-14 13:43       ` Nico Boehr
2022-01-14 10:02 ` [kvm-unit-tests PATCH 2/5] s390x: css: Skip if we're not run by qemu Janosch Frank
2022-01-14 10:41   ` Claudio Imbrenda
2022-01-17  7:01   ` Thomas Huth [this message]
2022-01-14 10:02 ` [kvm-unit-tests PATCH 3/5] s390x: diag308: Only test subcode 2 under QEMU Janosch Frank
2022-01-14 10:39   ` Claudio Imbrenda
2022-01-17  7:04   ` Thomas Huth
2022-01-17  9:39     ` Janosch Frank
2022-01-14 10:02 ` [kvm-unit-tests PATCH 4/5] s390x: smp: Allocate memory in DMA31 space Janosch Frank
2022-01-14 11:18   ` Claudio Imbrenda
2022-01-14 12:50   ` Nico Boehr
2022-01-14 12:57     ` Claudio Imbrenda
2022-01-14 13:07       ` Janosch Frank
2022-01-14 13:01     ` Claudio Imbrenda
2022-01-14 13:13       ` Janosch Frank
2022-01-14 13:16         ` Claudio Imbrenda
2022-01-14 13:18           ` Janosch Frank
2022-01-14 13:19         ` Claudio Imbrenda
2022-01-14 10:02 ` [kvm-unit-tests PATCH 5/5] s390x: firq: Fix sclp buffer allocation Janosch Frank
2022-01-14 11:19   ` Claudio Imbrenda
2022-01-14 11:19 ` [kvm-unit-tests PATCH 0/5] s390x: Allocation and hosting environment detection fixes Claudio Imbrenda
2022-01-14 12:23   ` Janosch Frank

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=80006dc9-039c-d729-f84c-af964314442f@redhat.com \
    --to=thuth@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.