From 6e89caf118d4091356ff79a7a3e9d5439c231cd1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 14 Feb 2014 13:42:44 +0000 Subject: Split up rules for tests that compare output with baselines. 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 . 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.) Tested x86_64. * elf/Makefile ($(objpfx)order.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)order-cmp.out. ($(objpfx)order-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out, $(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out, $(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and $(objpfx)tst-array5-static-cmp.out. ($(objpfx)tst-array1.out): Remove rule. ($(objpfx)tst-array1-cmp.out): New rule. ($(objpfx)tst-array1-static.out): Remove rule. ($(objpfx)tst-array1-static-cmp.out): New rule. ($(objpfx)tst-array2.out): Remove rule. ($(objpfx)tst-array2-cmp.out): New rule. ($(objpfx)tst-array3.out): Remove rule. ($(objpfx)tst-array3-cmp.out): New rule. ($(objpfx)tst-array4.out): Remove rule. ($(objpfx)tst-array4-cmp.out): New rule. ($(objpfx)tst-array5.out): Remove rule. ($(objpfx)tst-array5-cmp.out): New rule. ($(objpfx)tst-array5-static.out): Remove rule. ($(objpfx)tst-array5-static-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)order2-cmp.out. ($(objpfx)order2.out): Remove rule. ($(objpfx)order2-cmp.out): New rule. ($(objpfx)tst-initorder.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-initorder-cmp.out. ($(objpfx)tst-initorder-cmp.out): New rule. ($(objpfx)tst-initorder2.out): Remove rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-initorder2-cmp.out. ($(objpfx)tst-initorder2-cmp.out): New rule. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-unused-dep-cmp.out. ($(objpfx)tst-unused-dep-cmp.out): Do not run cmp. ($(objpfx)tst-unused-dep-cmp.out): New rule. * stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-setvbuf1-cmp.out. ($(objpfx)tst-setvbuf1.out): Do not run cmp. ($(objpfx)tst-setvbuf1-cmp.out): New rule. * string/Makefile [$(run-built-tests) = yes] (tests): Depend $(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out. ($(objpfx)tst-svc.out): Remove rule. ($(objpfx)tst-svc-cmp.out): New rule. nptl: * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp. [$(run-built-tests) = yes] (tests): Depend on $(objpfx)tst-cleanup0-cmp.out. ($(objpfx)tst-cleanup0-cmp.out): New rule. --- ChangeLog | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 03b03e4..c2c5c3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +2014-02-14 Joseph Myers + + * elf/Makefile ($(objpfx)order.out): Remove rule. + [$(run-built-tests) = yes] (tests): Depend on + $(objpfx)order-cmp.out. + ($(objpfx)order-cmp.out): New rule. + [$(run-built-tests) = yes] (tests): Depend on + $(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out, + $(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out, + $(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and + $(objpfx)tst-array5-static-cmp.out. + ($(objpfx)tst-array1.out): Remove rule. + ($(objpfx)tst-array1-cmp.out): New rule. + ($(objpfx)tst-array1-static.out): Remove rule. + ($(objpfx)tst-array1-static-cmp.out): New rule. + ($(objpfx)tst-array2.out): Remove rule. + ($(objpfx)tst-array2-cmp.out): New rule. + ($(objpfx)tst-array3.out): Remove rule. + ($(objpfx)tst-array3-cmp.out): New rule. + ($(objpfx)tst-array4.out): Remove rule. + ($(objpfx)tst-array4-cmp.out): New rule. + ($(objpfx)tst-array5.out): Remove rule. + ($(objpfx)tst-array5-cmp.out): New rule. + ($(objpfx)tst-array5-static.out): Remove rule. + ($(objpfx)tst-array5-static-cmp.out): New rule. + [$(run-built-tests) = yes] (tests): Depend on + $(objpfx)order2-cmp.out. + ($(objpfx)order2.out): Remove rule. + ($(objpfx)order2-cmp.out): New rule. + ($(objpfx)tst-initorder.out): Remove rule. + [$(run-built-tests) = yes] (tests): Depend on + $(objpfx)tst-initorder-cmp.out. + ($(objpfx)tst-initorder-cmp.out): New rule. + ($(objpfx)tst-initorder2.out): Remove rule. + [$(run-built-tests) = yes] (tests): Depend on + $(objpfx)tst-initorder2-cmp.out. + ($(objpfx)tst-initorder2-cmp.out): New rule. + [$(run-built-tests) = yes] (tests): Depend on + $(objpfx)tst-unused-dep-cmp.out. + ($(objpfx)tst-unused-dep-cmp.out): Do not run cmp. + ($(objpfx)tst-unused-dep-cmp.out): New rule. + * stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend + on $(objpfx)tst-setvbuf1-cmp.out. + ($(objpfx)tst-setvbuf1.out): Do not run cmp. + ($(objpfx)tst-setvbuf1-cmp.out): New rule. + * string/Makefile [$(run-built-tests) = yes] (tests): Depend + $(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out. + ($(objpfx)tst-svc.out): Remove rule. + ($(objpfx)tst-svc-cmp.out): New rule. + 2014-02-13 Joseph Myers * bits/mman.h [__USE_MISC]: Remove redundant conditionals. -- cgit v1.1