diff options
| author | rillig <rillig@NetBSD.org> | 2022-01-29 10:44:40 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2022-01-29 10:44:40 +0000 |
| commit | 9edd5fd176720fbcda5b6bfd85be6542d64a4228 (patch) | |
| tree | fabbef5eec31ac457d546498fbdc446ce085adfe /usr.bin/make | |
| parent | f583dc298f046e55d64d98d84e4d391424dca9be (diff) | |
tests/make: clean up variants that are tested
Since main.c 1.373 from 2020-10-18, make does not use iovec anymore, so
remove that test variant.
Document the details of why generating the test coverage took so long on
NetBSD < 10.
Add another test variant with optimization for binary size (-Os), since
with that option, GCC 10 does not perform the same data flow analysis as
with -O2, in particular it gets confused about whether local variables
are correctly initialized across function calls.
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/test-variants.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/make/test-variants.sh b/usr.bin/make/test-variants.sh index 939a61526d1..ab86db0ddfa 100644 --- a/usr.bin/make/test-variants.sh +++ b/usr.bin/make/test-variants.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: test-variants.sh,v 1.14 2021/12/09 20:47:33 rillig Exp $ +# $NetBSD: test-variants.sh,v 1.15 2022/01/29 10:44:40 rillig Exp $ # # Build several variants of make and run the tests on them. # @@ -108,6 +108,10 @@ testcase USER_CPPFLAGS="-DNO_REGEX" # testcase USER_CFLAGS="-O3" +# When optimizing for small code size, GCC gets confused by the initialization +# status of local variables in some cases. +testcase USER_CFLAGS="-Os" + testcase USER_CFLAGS="-O0 -ggdb" # The make source code is _intended_ to be compatible with C90. @@ -142,9 +146,6 @@ testcase USER_CFLAGS="-std=c90" USER_CPPFLAGS="-Dinline= -DUSE_C99_BOOLEAN" # Is expected to fail with "<stdbool.h> is included in pre-C99 mode". testcase USER_CFLAGS="-ansi" USER_CPPFLAGS="-Dinline=" -# config.h does not allow overriding these features -#testcase USER_CPPFLAGS="-UUSE_IOVEC" - # Ensure that there are only side-effect-free conditions in the assert # macro, or at least none that affect the outcome of the tests. # @@ -156,18 +157,17 @@ testcase USER_CPPFLAGS="-DNDEBUG" # -x and -v flags from echoing the commands from profile files. testcase USER_CPPFLAGS="-UMAKE_NATIVE -DHAVE_STRERROR -DHAVE_SETENV -DHAVE_VSNPRINTF" -# Running the code coverage using gcov takes a long time. Most of this -# time is spent in gcov_read_unsigned because gcov_open sets the .gcda -# file to unbuffered, which means that every single byte needs its own -# system call to be read. +# Running the code coverage using gcov took a long time on NetBSD < 10, due to +# https://gnats.netbsd.org/55808. # # Combining USE_COVERAGE with USE_GCC10 or HAVE_LLVM does not work since # these fail to link with the coverage library. # -# Turning the optimization off is required because of: +# Turning the optimization off is required because gcov does not work on the +# source code level but on the intermediate code after optimization: # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96622 # -#testcase USE_COVERAGE="yes" USER_CFLAGS="-O0 -ggdb" +testcase USE_COVERAGE="yes" USER_CFLAGS="-O0 -ggdb" testcase USE_FORT="yes" |
