[PATCH 2/2] test: log: test message continuation

Sean Anderson seanga2 at gmail.com
Sat Oct 10 23:47:26 CEST 2020


On 10/10/20 5:28 PM, Tom Rini wrote:
> On Thu, Sep 17, 2020 at 02:19:02PM +0200, Heinrich Schuchardt wrote:
> 
>> Provide a unit test checking that a continuation message will use the same
>> log level and log category as the previous message.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
> [snip]
>> +	log(LOGC_CONT, LOGL_CONT, "cc%d\n", 2);
> 
> These new values aren't defined, or I missed some other series.  Thanks!
> 

They should be defined in the first patch

On 9/17/20 8:19 AM, Heinrich Schuchardt wrote:
> diff --git a/include/log.h b/include/log.h
> index 2859ce1f2e..567cd32d34 100644
> --- a/include/log.h
> +++ b/include/log.h
> @@ -35,6 +35,7 @@ enum log_level_t {
> 
>  	LOGL_FIRST = LOGL_EMERG,
>  	LOGL_MAX = LOGL_DEBUG_IO,
> +	LOGL_CONT = -1,		/* Use same log level as in previous call */
>  };
> 
>  /**
> @@ -60,6 +61,7 @@ enum log_category_t {
> 
>  	LOGC_COUNT,	/* Number of log categories */
>  	LOGC_END,	/* Sentinel value for a list of log categories */
> +	LOGC_CONT = -1,	/* Use same category as in previous call */
>  };
> 
>  /* Helper to cast a uclass ID to a log category */
> --
> 2.28.0
> 


More information about the U-Boot mailing list