qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v2] target-i386: Print warning when mixing [+-]foo and foo=(on|off)
Date: Mon, 24 Oct 2016 15:35:23 +0200	[thread overview]
Message-ID: <20161024153523.41085107@nial.brq.redhat.com> (raw)
In-Reply-To: <20161024131424.GQ5057@thinpad.lan.raisama.net>

On Mon, 24 Oct 2016 11:14:24 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Mon, Oct 24, 2016 at 01:36:16PM +0200, Igor Mammedov wrote:
> [...]
> > > +#ifdef CONFIG_HAS_GLIB_SUBPROCESS_TESTS
> > > +static void test_plus_minus(void)
> > > +{
> > > +    g_test_trap_subprocess("/x86/cpuid/parsing-plus-minus/subprocess", 0, 0);
> > > +    g_test_trap_assert_passed();
> > > +    g_test_trap_assert_stderr("*Ambiguous CPU model string. "
> > > +                              "Don't mix both \"-mce\" and \"mce=on\"*");
> > > +    g_test_trap_assert_stderr("*Ambiguous CPU model string. "
> > > +                              "Don't mix both \"+cx8\" and \"cx8=off\"*");
> > > +    g_test_trap_assert_stdout("");
> > > +}
> > > +#endif  
> > Are there any reason to keep both subprocess and inprocess variants?  
> 
> Because g_test_trap_subprocess() needs it. It takes a test path
> as argument and runs another test case in a subprocess. Tests
> containing "subprocess" as a path component are skipped by
> default (so test_plus_minus_subprocess() is only run in a
> subprocess).
Ah I see, you are using subprocess to trap warnings on stderr

> >   
> > > +
> > >  int main(int argc, char **argv)
> > >  {
> > >      g_test_init(&argc, &argv, NULL);
> > >  
> > > -    qtest_add_func("x86/cpuid/parsing-plus-minus", test_plus_minus);
> > > +    g_test_add_func("/x86/cpuid/parsing-plus-minus/subprocess",
> > > +                    test_plus_minus_subprocess);
> > > +#ifdef CONFIG_HAS_GLIB_SUBPROCESS_TESTS
> > > +    g_test_add_func("/x86/cpuid/parsing-plus-minus", test_plus_minus);
> > > +#endif
> > >  
> > >      /* Original level values for CPU models: */
> > >      add_cpuid_test("x86/cpuid/phenom/level",  
> >   
> 

  reply	other threads:[~2016-10-24 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 19:41 [Qemu-devel] [PATCH v2] target-i386: Print warning when mixing [+-]foo and foo=(on|off) Eduardo Habkost
2016-10-24 11:36 ` Igor Mammedov
2016-10-24 13:14   ` Eduardo Habkost
2016-10-24 13:35     ` Igor Mammedov [this message]
2016-10-24 13:36 ` Igor Mammedov
  -- strict thread matches above, loose matches on Subject: below --
2016-10-24 19:53 Eduardo Habkost
2016-10-25 17:14 ` Igor Mammedov

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=20161024153523.41085107@nial.brq.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).