kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Feiner <pfeiner@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: drjones@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests v7 5/5] scripts: automatically pretty print stacks
Date: Thu, 31 Mar 2016 16:33:17 -0700	[thread overview]
Message-ID: <20160331233317.GA31870@google.com> (raw)
In-Reply-To: <56FA635A.5000307@redhat.com>

On Tue, Mar 29, 2016 at 01:13:30PM +0200, Paolo Bonzini wrote:
> 
> 
> On 23/03/2016 00:35, Peter Feiner wrote:
> > +if [ "$PRETTY_PRINT_STACKS" = "yes" ]; then
> > +	log_redir="> >(./scripts/pretty_print_stacks.py \$kernel >> test.log)"
> 
> Isn't this the same as "| ./scripts/pretty_print_stack.py \$kernel >>
> test.log"?

Not the same. Consider scripts/runtime.bash's usage:

	cmdline="...$RUNTIME_arch_run $kernel -smp $smp $opts"

With your alternative, the command-line arguments after $RUNTIME_arch_run
are be passed to pretty_print_stacks.py instead of Qemu.

> If so, perhaps
> 
> if [ "$PRETTY_PRINT_STACKS" = "yes" ]; then
>   stack_filter="./scripts/pretty_print_stack.py \$kernel"
> else
>   stack_filter=cat
> 
> RUNTIME_arch_run="./$TEST_DIR/run | $stack_filter >> test.log"
> 
> ... would be a bit easier to read.

Yes, it's super ugly, but it works!

Peter

  reply	other threads:[~2016-03-31 23:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 23:35 [PATCH kvm-unit-tests v7 0/5] Debugging aids Peter Feiner
2016-03-22 23:35 ` [PATCH kvm-unit-tests v7 1/5] lib: backtrace printing Peter Feiner
2016-03-22 23:35 ` [PATCH kvm-unit-tests v7 2/5] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-22 23:35 ` [PATCH kvm-unit-tests v7 3/5] lib: dump stack on failed assert() Peter Feiner
2016-03-22 23:35 ` [PATCH kvm-unit-tests v7 4/5] scripts: pretty print stack traces Peter Feiner
2016-03-22 23:35 ` [PATCH kvm-unit-tests v7 5/5] scripts: automatically pretty print stacks Peter Feiner
2016-03-29 11:13   ` Paolo Bonzini
2016-03-31 23:33     ` Peter Feiner [this message]
2016-04-01  8:38       ` Paolo Bonzini
2016-03-29 11:13 ` [PATCH kvm-unit-tests v7 0/5] Debugging aids Paolo Bonzini
2016-04-06 11:28 ` Paolo Bonzini

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=20160331233317.GA31870@google.com \
    --to=pfeiner@google.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 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).