Bug 19017 - build failure in make subdirs=string tests=test-bcopy check
Summary: build failure in make subdirs=string tests=test-bcopy check
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: build (show other bugs)
Version: 2.22
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-28 23:24 UTC by Martin Sebor
Modified: 2015-10-01 12:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Sebor 2015-09-28 23:24:16 UTC
Attempting to build and/or run a subset of tests fails in some directories.  For example, invoking make as shown below to build and run just the test-bcopy test fails with the subsequent error.  This is because the Makefile in those directories contains the following lines:

tests-special += $(objpfx)tst-svc-cmp.out
$(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out

Adding the .out file to the tests-special variable then unconditionally attempts the create it but because the file depends on tst-svc.out which cannot be derived from the value of the tests variable the recipe fails.

$ nice make subdirs=string tests=test-bcopy check
...
make[2]: *** No rule to make target `/build/glibc-trunk/power8/string/tst-svc.out', needed by `/build/glibc-trunk/power8/string/tst-svc-cmp.out'.  Stop.
make[2]: Leaving directory `/src/glibc-trunk/string'
make[1]: *** [string/tests] Error 2
make[1]: Leaving directory `/src/glibc-trunk'
make: *** [check] Error 2
make: Leaving directory `/build/glibc-trunk/power8'
Comment 1 jsm-csl@polyomino.org.uk 2015-09-28 23:35:37 UTC
It's not obvious that "make tests=whatever" is expected to work, as 
opposed to the tests variable being strictly internal to the makefiles.  
My inclination would be to support "make subdir/some-test.out" to run a 
particular test (whether one from tests or tests-special), much like you 
can do "make subdir/tests" now.