about summary refs log tree commit diff
path: root/elf/dl-environ.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-11-20 03:54:53 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-11-20 03:54:53 +0000
commit9a62a9397d0a25643922d8d053f04ee895100d9a (patch)
treea2ef130de165030760fc7948ede78f878014c98a /elf/dl-environ.c
parentb15b1a959040fe8cdfbc51092a7b72032f6c9b86 (diff)
downloadglibc-9a62a9397d0a25643922d8d053f04ee895100d9a.tar.gz
glibc-9a62a9397d0a25643922d8d053f04ee895100d9a.tar.xz
glibc-9a62a9397d0a25643922d8d053f04ee895100d9a.zip
Use unique identifiers in conformtest.
This patch makes tests in conformtest use unique identifiers, in
preparation for trying to cover more tests in a single compilation to
speed up these tests as suggested in
<https://sourceware.org/ml/libc-alpha/2018-11/msg00229.html>.

Tests are assigned a number, used in generating identifiers; where a
single call to a run method does multiple compilations (sharing that
number), identifiers are changed as needed to avoid duplication
between those compilations, so they can be combined in future.

Large numbers of positional arguments to format strings make the code
harder to follow, and using the test numbers serves to increase the
number of arguments to such format strings, so the code is generally
changed to use %(name)s where all the arguments come from attributes
of the test object and so vars(self) is sufficient to provide all
those names for the format string.  Cases where some arguments aren't
attributes of self still use positional format arguments.

Tested for x86_64, and with build-many-glibcs.py.

	* conform/conformtest.py (ElementTest.run): Use unique identifiers
	in tests.  Use names for format arguments.
	(ConstantTest.run): Likewise.
	(SymbolTest.run): Likewise.
	(TypeTest.run): Likewise.
	(TagTest.run): Likewise.
	(FunctionTest.run): Likewise.
	(VariableTest.run): Likewise.
	(MacroFunctionTest.run): Likewise.
	(MacroStrTest.run): Likewise.
	(HeaderTests.__init__): Set self.num_tests.
	(HeaderTests.handle_test_line): Set test.num.  Increment
	self.num_tests.
Diffstat (limited to 'elf/dl-environ.c')
0 files changed, 0 insertions, 0 deletions