[PATCH] Format test results closer to what DejaGnu does

Maxim Kuvyrkov maxim.kuvyrkov@linaro.org
Mon Jun 19 17:55:15 GMT 2023


> On Jun 19, 2023, at 17:59, Florian Weimer <fweimer@redhat.com> wrote:
> 
> * Maxim Kuvyrkov:
> 
>>> On Jun 5, 2023, at 17:35, Florian Weimer <fweimer@redhat.com> wrote:
>>> 
>>> * Maxim Kuvyrkov via Libc-alpha:
>>> 
>>>> +# Print test summary for tests in $1 .sum file;
>>>> +# $2 is optional test identifier.
>>>> +# Fail if there are unexpected failures in the test results.
>>>> define summarize-tests
>>>> +@echo " === glibc failures ==="
>>>> +@grep -E '^[A-Z]+:' $(objpfx)$1 | grep -E -v '^(PASS|XFAIL):' || true
>>>> +@echo " === Summary of results$2 ==="
>>>> +@sed -e '/:.*/!d' -e 's/:.*//' < $(objpfx)$1 | sort | uniq -c
>>>> +@! grep -E '^[A-Z]+:' $(objpfx)$1 | grep -E -q -v '^(X?PASS|XFAIL|UNSUPPORTED):'
>>>> endef
>>> 
>>> Doesn't this print “=== glibc failures ===” unconditionally even if
>>> there are no failures?  Is this really what DejaGnu does?
>> 
>> Hi Florian,
>> 
>> Good point.  Note that the above output doesn't reach .sum files, the output is only printed out to stdout.
>> 
>> I could either drop "=== glibc failures ===" line entirely, or print out "no unexpected failures", e.g.:
>> @echo " === glibc failures ==="
>> @grep -E '^[A-Z]+:' $(objpfx)$1 | grep -E -v '^(PASS|XFAIL):' || echo "no unexpected failures"
>> 
>> WDYT?
> 
> I looked at the gcc-testresults mailing list, and there appear no
> === … failures === lines at all?  What was the motivation for adding it
> in the first place?

The only motivation is that it looks like a nice header for the following FAILs.  What's your preference for the line -- drop it entirely or print out:

=== glibc failures ===
no unexpected failures

?
--
Maxim Kuvyrkov
https://www.linaro.org



More information about the Libc-alpha mailing list