All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, Laurent Vivier <lvivier@redhat.com>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Corey Minyard <minyard@acm.org>
Subject: Re: [Qemu-devel] [PATCH] tests: Remove (mostly) useless architecture checks
Date: Fri, 1 Mar 2019 12:57:19 -0500	[thread overview]
Message-ID: <74a6796e-1242-69dd-a74d-74525955f100@redhat.com> (raw)
In-Reply-To: <1551456970-463-1-git-send-email-thuth@redhat.com>



On 3/1/19 11:16 AM, Thomas Huth wrote:
> These checks at the beginning of some of the tests are mostly useless:
> We only run the tests on x86 anyway, and g_test_message() does not
> print anything unless you call g_test_init() first.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/fdc-test.c      | 7 -------
>  tests/ide-test.c      | 7 -------
>  tests/ipmi-bt-test.c  | 7 -------
>  tests/ipmi-kcs-test.c | 7 -------
>  4 files changed, 28 deletions(-)
> 
> diff --git a/tests/fdc-test.c b/tests/fdc-test.c
> index 88f1abf..31cd329 100644
> --- a/tests/fdc-test.c
> +++ b/tests/fdc-test.c
> @@ -548,16 +548,9 @@ static void fuzz_registers(void)
>  
>  int main(int argc, char **argv)
>  {
> -    const char *arch = qtest_get_arch();
>      int fd;
>      int ret;
>  
> -    /* Check architecture */
> -    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
> -        g_test_message("Skipping test for non-x86\n");
> -        return 0;
> -    }
> -
>      /* Create a temporary raw image */
>      fd = mkstemp(test_image);
>      g_assert(fd >= 0);
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index f0280e6..300d64e 100644
> --- a/tests/ide-test.c
> +++ b/tests/ide-test.c
> @@ -1009,16 +1009,9 @@ static void test_cdrom_dma(void)
>  
>  int main(int argc, char **argv)
>  {
> -    const char *arch = qtest_get_arch();
>      int fd;
>      int ret;
>  
> -    /* Check architecture */
> -    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
> -        g_test_message("Skipping test for non-x86\n");
> -        return 0;
> -    }
> -
>      /* Create temporary blkdebug instructions */
>      fd = mkstemp(debug_path);
>      g_assert(fd >= 0);
> diff --git a/tests/ipmi-bt-test.c b/tests/ipmi-bt-test.c
> index f4a81b5..fc4c83b 100644
> --- a/tests/ipmi-bt-test.c
> +++ b/tests/ipmi-bt-test.c
> @@ -400,15 +400,8 @@ static void open_socket(void)
>  
>  int main(int argc, char **argv)
>  {
> -    const char *arch = qtest_get_arch();
>      int ret;
>  
> -    /* Check architecture */
> -    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
> -        g_test_message("Skipping test for non-x86\n");
> -        return 0;
> -    }
> -
>      open_socket();
>  
>      /* Run the tests */
> diff --git a/tests/ipmi-kcs-test.c b/tests/ipmi-kcs-test.c
> index 178ffc1..a2354c1 100644
> --- a/tests/ipmi-kcs-test.c
> +++ b/tests/ipmi-kcs-test.c
> @@ -263,16 +263,9 @@ static void test_enable_irq(void)
>  
>  int main(int argc, char **argv)
>  {
> -    const char *arch = qtest_get_arch();
>      char *cmdline;
>      int ret;
>  
> -    /* Check architecture */
> -    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
> -        g_test_message("Skipping test for non-x86\n");
> -        return 0;
> -    }
> -
>      /* Run the tests */
>      g_test_init(&argc, &argv, NULL);
>  
> 

Hm, if you insist. I have no strong feelings... Do we plan to split
tests out by architecture eventually? Clearly x86 only tests don't
really need to each individually check the arch, but I'm not sure what
the vision is.

Either way, since I have no horse in the race:

Acked-by: John Snow <jsnow@redhat.com>

  reply	other threads:[~2019-03-01 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 16:16 [Qemu-devel] [PATCH] tests: Remove (mostly) useless architecture checks Thomas Huth
2019-03-01 17:57 ` John Snow [this message]
2019-03-01 18:39   ` Corey Minyard
2019-03-03 14:15   ` Thomas Huth
2019-03-04 18:13     ` John Snow
2019-03-06  9:12 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier

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=74a6796e-1242-69dd-a74d-74525955f100@redhat.com \
    --to=jsnow@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=minyard@acm.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.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.