On Tue, Feb 13, 2024 at 07:44:15AM -0800, Jakub Kicinski wrote: > [...] > +/** > + * XFAIL() > + * > + * @statement: statement to run after reporting XFAIL > + * @fmt: format string > + * @...: optional arguments > + * > + * .. code-block:: c > + * > + * XFAIL(statement, fmt, ...); > + * > + * This forces a "pass" after reporting why something is expected to fail, > + * and runs "statement", which is usually "return" or "goto skip". > + */ > +#define XFAIL(statement, fmt, ...) do { \ > + snprintf(_metadata->results->reason, \ > + sizeof(_metadata->results->reason), fmt, ##__VA_ARGS__); \ > + if (TH_LOG_ENABLED) { \ > + fprintf(TH_LOG_STREAM, "# XFAIL %s\n", \ Oh! I just noticed this while testing changes to use XFAIL, there is an alignment issue: one too many spaces after "XFAIL" above, which leads to misaligned output. fprintf(TH_LOG_STREAM, "# XFAIL %s\n", \ fprintf(TH_LOG_STREAM, "# SKIP %s\n", \ Compare the position of "%s" above... -- Kees Cook