Re: [PATCH] [V2] oprofile-tests update error handling around ocount calls

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 04/28/2017 12:18 PM, Will Schmidt wrote:
> Update the expect script to handle (and return with an error
> message)  when ocount returns an
>  "Unable to obtain cpu_type" error message/string.
> 
> Subsequently turns this confusing output:
>   ERROR: tcl error sourcing ./oprofile-ocount/ocount-run.exp.
>   ERROR: invalid bareword "to"
>   in expression "to * 2";
> into this easier to understand blurb:
>   ERROR: Ocount failed to obtain a valid cpu_type.
> 
> While in the neighborhood, also did a few cosmetic touch-ups.
> 
> Tested on ppc64/ppc64le/x86_64.
> 
> Signed-off-by:  Will Schmidt <[email protected]>

Hi Will,

The patch looks good with the exception that the following hunk didn't apply from the saved email.  The oprofile-ocount.exp has a tabs in the line being modified and the surrounding context, but the patch has it as spaces.  I am not sure where the corruption of the patch occurred. Maybe your email client is converting tabs to spaces in the body of the email.  Note that the previous version of the patch did have tabs and applied cleanly.  I corrected whitespace and applied the patch.  It should be in the upstream oprofile-testsuite now.  Thanks,

-Will Cohen
> 
> diff --git a/testsuite/oprofile-ocount/ocount-run.exp b/testsuite/oprofile-ocoun
> index 047e0ff..a0abcea 100644
> --- a/testsuite/oprofile-ocount/ocount-run.exp
> +++ b/testsuite/oprofile-ocount/ocount-run.exp
> @@ -90,7 +90,7 @@ proc do_test_ocount_scaling {workload_exec} {
>             # Version 1.0 and beyond  time interval is in units of milliseconds
>             set run_time_interval1 [expr $interval1 * 1000]
>             set run_time_interval2 [expr $interval2 * 1000]
> -       set run_time_interval4 [expr $interval4 * 1000]
> +           set run_time_interval4 [expr $interval4 * 1000]
>         }
>      }
>  

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.