[PATCH] allow-failures.txt: Handle test names containing . and +
Carlos O'Donell
carlos@redhat.com
Thu Nov 5 13:54:22 GMT 2026
On 11/5/26 6:18 AM, Florian Weimer wrote:
> The quoting of listed tests for regular expression matching did not
> work because the `…` sub-shell construct removes one layer of \ in
> nested '…' strings. The $(…) construct performs more parsing and
> therefore preserves \ within '…'. This ensures that sed receives the
> expected \\& character sequences (literal \ followed by the match),
> and not \& (literal &).
>
> Fixes commit 5c28a3cf9f05481290509a27506d08734d1e7587 ("Makefile: add
> allow-list for failures").
LGTM.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 63da458a5a..f8fe8ecb85 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -778,7 +778,7 @@ define summarize-tests
> case "$$line" in \
> FAIL:*) \
> name=$${line#FAIL: }; \
> - escaped_name=`printf '%s' "$$name" | sed 's/[.+]/\\&/g'`; \
> + escaped_name=$$(printf '%s' "$$name" | sed 's/[.+]/\\&/g'); \
OK. Confirmed manually that this incorrectly escapes tests with ++ in the name as literal &.
> if grep -Eq -- "^$${escaped_name}[[:space:]]*#" \
> $(..)allowed-failures.txt; then \
> echo "Ignoring allowed FAIL: $${name}"; \
>
> base-commit: 6049d099387b29dfd03b2d4b01209f6776e32374
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list