Module Name: src Committed By: rillig Date: Thu Dec 9 20:47:33 UTC 2021
Modified Files: src/usr.bin/make: test-variants.sh src/usr.bin/make/unit-tests: Makefile opt-file.mk Log Message: make: add back support for jemalloc 100 The ports sun2 and vax default to jemalloc 100, as opposed to the rest of the ports, which use jemalloc 510. Some developers choose to use jemalloc 100, so let them run the tests with memory debugging as well. Suggested by mrg on source-changes-d. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/test-variants.sh cvs rdiff -u -r1.286 -r1.287 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/opt-file.mk 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.13 src/usr.bin/make/test-variants.sh:1.14 --- src/usr.bin/make/test-variants.sh:1.13 Sun Dec 5 14:57:36 2021 +++ src/usr.bin/make/test-variants.sh Thu Dec 9 20:47:33 2021 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: test-variants.sh,v 1.13 2021/12/05 14:57:36 rillig Exp $ +# $NetBSD: test-variants.sh,v 1.14 2021/12/09 20:47:33 rillig Exp $ # # Build several variants of make and run the tests on them. # @@ -30,9 +30,13 @@ testcase() { && env -i PATH="$PATH" USETOOLS="no" "$@" \ sh -ce "make -ks -j6 dependall" \ && size *.o make \ - && env -i PATH="$PATH" USETOOLS="no" MALLOC_CONF="junk:true" \ - _MKMSG_TEST=":" "$@" \ - sh -ce "make -s test" \ + && env -i \ + PATH="$PATH" \ + USETOOLS="no" \ + MALLOC_OPTIONS="JA" \ + MALLOC_CONF="junk:true" \ + _MKMSG_TEST=":" "$@" \ + sh -ce "make -s test" \ || fail } Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.286 src/usr.bin/make/unit-tests/Makefile:1.287 --- src/usr.bin/make/unit-tests/Makefile:1.286 Sun Dec 5 15:20:13 2021 +++ src/usr.bin/make/unit-tests/Makefile Thu Dec 9 20:47:33 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.286 2021/12/05 15:20:13 rillig Exp $ +# $NetBSD: Makefile,v 1.287 2021/12/09 20:47:33 rillig Exp $ # # Unit tests for make(1) # @@ -652,7 +652,8 @@ TMPDIR:= /tmp/uid${.MAKE.UID} x!= echo; mkdir -p ${TMPDIR} .endif -MAKE_TEST_ENV?= MALLOC_CONF="junk:true" # for jemalloc +MAKE_TEST_ENV= MALLOC_OPTIONS="JA" # for jemalloc 100 +MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510 MAKE_TEST_ENV+= TMPDIR=${TMPDIR} .if ${.MAKE.OS} == "NetBSD" Index: src/usr.bin/make/unit-tests/opt-file.mk diff -u src/usr.bin/make/unit-tests/opt-file.mk:1.13 src/usr.bin/make/unit-tests/opt-file.mk:1.14 --- src/usr.bin/make/unit-tests/opt-file.mk:1.13 Sun Dec 5 14:57:36 2021 +++ src/usr.bin/make/unit-tests/opt-file.mk Thu Dec 9 20:47:33 2021 @@ -1,6 +1,7 @@ -# $NetBSD: opt-file.mk,v 1.13 2021/12/05 14:57:36 rillig Exp $ +# $NetBSD: opt-file.mk,v 1.14 2021/12/09 20:47:33 rillig Exp $ # -# Tests for the -f command line option. +# Tests for the -f command line option, which adds a makefile to the list of +# files that are parsed. # TODO: Implementation @@ -10,7 +11,8 @@ all: file-ending-in-backslash-mmap all: line-with-trailing-whitespace all: file-containing-null-byte -# Passing '-' as the filename reads from stdin. This is unusual but possible. +# When the filename is '-', the input comes from stdin. This is unusual but +# possible. # # In the unlikely case where a file ends in a backslash instead of a newline, # that backslash is trimmed. See ParseGetLine. @@ -19,7 +21,9 @@ all: file-containing-null-byte # outside of the file buffer. # # printf '%s' 'VAR=value\' \ -# | MALLOC_CONF="junk:true" make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \ +# | MALLOC_OPTIONS="JA" \ +# MALLOC_CONF="junk:true" \ +# make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \ # | less # # The debug output shows how make happily uses freshly allocated memory (the