Module Name: src Committed By: rillig Date: Mon Aug 31 18:57:41 UTC 2020
Modified Files: src/usr.bin/make: test-variants.sh Log Message: make(1): extend the documentation for the test variants To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.2 src/usr.bin/make/test-variants.sh:1.3 --- src/usr.bin/make/test-variants.sh:1.2 Mon Aug 31 17:25:29 2020 +++ src/usr.bin/make/test-variants.sh Mon Aug 31 18:57:41 2020 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: test-variants.sh,v 1.2 2020/08/31 17:25:29 rillig Exp $ +# $NetBSD: test-variants.sh,v 1.3 2020/08/31 18:57:41 rillig Exp $ # # Build several variants of make and run the tests on them. # @@ -72,7 +72,9 @@ testcase USER_CPPFLAGS="-DDEBUG_META_MOD testcase USER_CPPFLAGS="-DDEBUG_REALPATH_CACHE" -testcase USER_CPPFLAGS="-DDEBUG_SRC" +# Produces lots of debugging output. +# +#testcase USER_CPPFLAGS="-DDEBUG_SRC" #testcase USER_CPPFLAGS="-UGMAKEEXPORT" @@ -82,6 +84,8 @@ testcase USER_CPPFLAGS="-DDEBUG_SRC" # #define MAXPATHLEN PATH_MAX #testcase USER_CPPFLAGS="-DMAXPATHLEN=20" +# In this variant, the unit tests that use the :C modifier obviously fail. +# testcase USER_CPPFLAGS="-DNO_REGEX" # NetBSD 8.0 x86_64 says: @@ -104,6 +108,12 @@ testcase USER_CFLAGS="-O3" testcase USER_CFLAGS="-O0 -ggdb" +# The make source code is _intended_ to be compatible with C90. +# It uses some C99 features though. +# To really port it to C90, it would have to be in a C90 environment +# in which the system headers don't aggressively depend on C99. +# +# NetBSD 8.0 x86_64: # /usr/include/sys/cdefs.h:618:22: error: ISO C90 does not support 'long long' [-Werror=long-long] # /usr/include/sys/endian.h:205:1: error: use of C99 long long integer constant [-Werror=long-long] # /usr/include/pthread_types.h:128:3: error: ISO C90 doesn't support unnamed structs/unions [-Werror=pedantic] @@ -112,6 +122,7 @@ testcase USER_CFLAGS="-O0 -ggdb" # var.c:1574:15: error: ISO C90 does not support the 'z' gnu_printf length modifier [-Werror=format=] # var.c:137:33: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros] # parse.c:2473:22: error: format '%p' expects argument of type 'void *', but argument 7 has type 'char * (*)(void *, size_t *) {aka char * (*)(void *, long unsigned int *)}' [-Werror=format=] +# #testcase USER_CFLAGS="-std=c90 -ansi -pedantic" USER_CPPFLAGS="-Dinline=" # Ensure that every inline function is declared as MAKE_ATTR_UNUSED. @@ -144,4 +155,19 @@ testcase USER_CPPFLAGS="-DNDEBUG" # #testcase USE_COVERAGE="yes" USER_CFLAGS="-O0 -ggdb" +testcase USE_FORT="yes" + +# This test is the result of reading through the GCC "Warning Options" +# documentation, noting down everything that sounded interesting. +# +testcase USE_GCC10=yes GCC10BASE=$HOME/pkg/gcc10 USER_CFLAGS="\ +-Wmisleading-indentation -Wmissing-attributes -Wmissing-braces \ +-Wextra -Wnonnull -Wnonnull-compare -Wnull-dereference -Wimplicit \ +-Wimplicit-fallthrough=4 -Wignored-qualifiers -Wunused \ +-Wunused-but-set-variable -Wunused-parameter -Wduplicated-branches \ +-Wduplicated-cond -Wunused-macros -Wcast-function-type -Wconversion \ +-Wenum-compare -Wmissing-field-initializers -Wredundant-decls \ +-Wno-error=conversion -Wno-error=sign-conversion -Wno-error=unused-macros \ +-Wno-error=unused-parameter -Wno-error=duplicated-branches" + test "$failed" = "no"