Module Name: src Committed By: rillig Date: Sat Jan 29 10:44:40 UTC 2022
Modified Files: src/usr.bin/make: test-variants.sh Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/test-variants.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/test-variants.sh diff -u src/usr.bin/make/test-variants.sh:1.14 src/usr.bin/make/test-variants.sh:1.15 --- src/usr.bin/make/test-variants.sh:1.14 Thu Dec 9 20:47:33 2021 +++ src/usr.bin/make/test-variants.sh Sat Jan 29 10:44:40 2022 @@ -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_CPP # 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"