Split up rules for tests that compare output with baselines
Brooks Moses
bmoses@google.com
Fri Feb 14 00:42:00 GMT 2014
On 02/12/2014 04:28 PM, Joseph S. Myers wrote:
> This patch splits makefile rules that generate a file then run cmp to
> check the contents of that file into separate rules to generate and
> compare the file. This simplifies making those tests generate PASS /
> FAIL results, by removing the need to insert && between commands in
> the test so that a $(evaluate-test) call is reached. It also avoids
> the oddity of the .out file being an intermediate file rather than the
> final result generated, as noted for some of these tests in
> <https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.
>
> In many cases, the rule to run the program was no longer needed
> because the default rules for running test programs on the host to
> generate a .out file sufficed. (I'm not asserting the commands run
> after this patch are *exactly* the same as before, simply that the
> rules did nothing special that appeared deliberate or relevant to
> anything about what the tests were testing. In cases where the rules
> redirected stderr as well as stdout, I left the existing rule's
> redirection in place to avoid changing what gets compared with the
> expected results.)
>
> It's clear there is a lot in common between the various -cmp.out rules
> and it might be possible in future to refactor them into more generic
> support for the case of comparing test output against a baseline.
> (Some baselines are *.exp, some *.expect, some directly embedded in
> the makefiles, and nptl/tst-cleanupx0.expect appears unused.) I
> propose to leave this as a possible future cleanup on the wiki todo
> list rather than implementing it as part of the present series of
> cleanups.
>
> Tested x86_64.
This all looks correct to me.
- Brooks
More information about the Libc-alpha
mailing list