[PATCH] tst-backtrace4: expand output even on failures

Ondřej Bílka neleai@seznam.cz
Thu Jan 2 19:47:00 GMT 2014


On Mon, Dec 30, 2013 at 05:50:16AM -0500, Mike Frysinger wrote:
> When debugging failures in this test, it's helpful to see as much output
> as possible.  So rather than returning immediately, let the code run as
> far as it can.  We still mark failures as soon as they happen.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  debug/tst-backtrace4.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/debug/tst-backtrace4.c b/debug/tst-backtrace4.c
> index 9c0c2a2..deed636 100644
> --- a/debug/tst-backtrace4.c
> +++ b/debug/tst-backtrace4.c
> @@ -49,12 +49,16 @@ handle_signal (int signum)
>  
>    /* Get the backtrace addresses.  */
>    n = backtrace (addresses, sizeof (addresses) / sizeof (addresses[0]));
> -  printf ("Obtained backtrace with %d functions\n", n);
> -  /*  Check that there are at least six functions.  */
> +  printf ("Obtained backtrace with %d functions (but wanted at least %d)\n",
> +	  n, NUM_FUNCTIONS);
> +  /* Check that there are at least six functions.  */
>    if (n < NUM_FUNCTIONS)
>      {
A minor nit, should not comment reflect code with:

/* Check that there are at least NUM_FUNCTIONS functions.  */

Otherwise ok after freeze.



More information about the Libc-alpha mailing list