On 23.02.2026 11:14, Edwin Török wrote:
> Otherwise messages from the next test will end up on the same line as an
> error message from a previous test.
> (calling `fail` is not fatal).

Will they? Glancing quickly over the uses of fail(), I see most if not all
of them using a newline. Same for verify(). Imo either all use sites have
newlines, or all use sites lose them in favor of adding them centrally ...

> --- a/tools/tests/common/tests.h
> +++ b/tools/tests/common/tests.h
> @@ -6,12 +6,12 @@ extern unsigned int nr_failures;
>  #define fail(fmt, ...)                          \
>  ({                                              \
>      nr_failures++;                              \
> -    (void)printf(fmt, ##__VA_ARGS__);           \
> +    (void)printf(fmt"\n", ##__VA_ARGS__);           \
>  })
>  
>  #define verify(exp, fmt, args...) \
>  while (!(exp)) { \
> -    printf(fmt, ## args); \
> +    printf(fmt"\n", ## args); \
>      exit(EX_SOFTWARE); \
>  }

... here.

As a style nit - please have a blank between fmt and the string literal.

Jan

Reply via email to