From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [kvm-unit-tests 5/5] scripts: pretty print stack traces Date: Thu, 3 Mar 2016 13:57:37 +0100 Message-ID: <56D834C1.9000802@redhat.com> References: <1456867658-10937-1-git-send-email-pfeiner@google.com> <1456867658-10937-6-git-send-email-pfeiner@google.com> <56D60AFD.3040607@redhat.com> <20160303093247.GC1515@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Peter Feiner , kvm@vger.kernel.org To: Andrew Jones Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38067 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752233AbcCCM5q (ORCPT ); Thu, 3 Mar 2016 07:57:46 -0500 In-Reply-To: <20160303093247.GC1515@localhost.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/03/2016 10:35, Andrew Jones wrote: > wrt to enabling/disabling it though, how about we create a new configure > command line option instead. One that defaults to on, if the architecture > supports pretty-printing, but can be switched off. Which architectures don't? But I like a --enable/disable-pretty-print-stacks option. > It should be possible, just another "temp_file", I think. But then we > expect the standalone test to be executed somewhere with pyhon (likely) > and addr2line (not as likely). Also, without the source available, then > it probably isn't all the useful to the user executing the test, and > anybody they send the results to can copy+paste the backtrace line > directly into addr2line themselves. > > Long story short, I vote we don't add it to mkstandalone. I agree. Something like diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh index c7e78f8..d6607b8 100755 --- a/scripts/mkstandalone.sh +++ b/scripts/mkstandalone.sh @@ -41,6 +41,10 @@ generate_test () echo "#!/bin/bash" echo "export STANDALONE=yes" echo "export HOST=\$(uname -m | sed -e s/i.86/i386/ | sed -e 's/arm.*/arm/')" + + # do not require addr2line on the test machine + echo "export PRETTY_PRINT_STACKS=no" + config_export ARCH config_export ARCH_NAME config_export PROCESSOR if we go with your suggestion of configurable pretty printing. > Now, one addition that may make sense, wrt mkstandalone, is that we output > what HEAD was when mkstandalone was used to build the tests. That would be > useful just by itself to know what code is running, and extra useful when > using addr2line. That makes sense. Can you send a patch (Drew)? Paolo