Module Name: src Committed By: rillig Date: Sun Sep 27 13:18:30 UTC 2020
Modified Files: src/usr.bin/make/unit-tests: Makefile export.mk Log Message: make(1): run tests with jemalloc debugging enabled This protects against very simple memory allocation bugs such as migrating Lst_ForEachUntil to Lst_ForEach without remembering that Lst_ForEachUntil can handle the situation where the current list node is removed from the list, but Lst_ForEach cannot. This happens in Make_ExpandUse, for example. To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/export.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/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.152 src/usr.bin/make/unit-tests/Makefile:1.153 --- src/usr.bin/make/unit-tests/Makefile:1.152 Fri Sep 25 23:24:49 2020 +++ src/usr.bin/make/unit-tests/Makefile Sun Sep 27 13:18:30 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.152 2020/09/25 23:24:49 rillig Exp $ +# $NetBSD: Makefile,v 1.153 2020/09/27 13:18:30 rillig Exp $ # # Unit tests for make(1) # @@ -447,6 +447,8 @@ LC_ALL= C LANG= C .export LANG LC_ALL +MAKE_TEST_ENV?= MALLOC_OPTIONS="JA" # for jemalloc + # Each test is run in a sub-make, to keep the tests for interfering with # each other, and because they use different environment variables and # command line options. @@ -455,7 +457,7 @@ LANG= C @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX} @set -eu; \ cd ${.OBJDIR}; \ - env -i PATH="$$PATH" ${ENV.${.PREFIX:T}} \ + env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \ ${TEST_MAKE} \ -r -C ${.CURDIR} -f ${.IMPSRC} \ ${FLAGS.${.PREFIX:T}:U-k} \ Index: src/usr.bin/make/unit-tests/export.mk diff -u src/usr.bin/make/unit-tests/export.mk:1.5 src/usr.bin/make/unit-tests/export.mk:1.6 --- src/usr.bin/make/unit-tests/export.mk:1.5 Sat Aug 8 13:00:07 2020 +++ src/usr.bin/make/unit-tests/export.mk Sun Sep 27 13:18:30 2020 @@ -1,4 +1,4 @@ -# $Id: export.mk,v 1.5 2020/08/08 13:00:07 rillig Exp $ +# $Id: export.mk,v 1.6 2020/09/27 13:18:30 rillig Exp $ UT_TEST=export UT_FOO=foo${BAR} @@ -37,7 +37,7 @@ BAR=bar is ${UT_FU} .MAKE.EXPORTED+= UT_ZOO UT_TEST -FILTER_CMD?= egrep -v '^(MAKEFLAGS|PATH|PWD|SHLVL|_)=' +FILTER_CMD?= egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_)=' all: @env | ${FILTER_CMD} | sort