{"thread":{"id":"50840","subject":"[PATCH] test-lib: whitelist GIT_TR2_* in the environment","startedAt":"2019-03-30T07:51:32Z","lastAt":"2019-04-10T13:56:25Z","messageCount":2,"participants":["Ævar Arnfjörð Bjarmason","Jeff Hostetler"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"372762","messageId":"20190330075119.13156-1-avarab@gmail.com","threadId":"50840","inReplyTo":null,"subject":"[PATCH] test-lib: whitelist GIT_TR2_* in the environment","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-03-30T07:51:19Z","receivedAt":"2019-03-30T07:51:32Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Add GIT_TR2_* to the whitelist of environment variables that we don't\nclear when running the test suite.\n\nThis allows us to use the test suite to produce trace2 test data,\nwhich is handy to e.g. write consumers that collate the trace data\nitself.\n\nOne caveat here is that we produce trace output for not *just* the\ntests, but also e.g. from this line in test-lib.sh:\n\n    # It appears that people try to run tests without building...\n    \"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X\" >/dev/null\n    [...]\n\nI consider this not just OK but a feature. Let's log *all* the git\ncommands we're going to execute, not just those within\ntest_expect_*().\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/test-lib.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 562c57e685..f6318c54c9 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -379,6 +379,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $(\"$PERL_PATH\" -e '\n \tmy @env = keys %ENV;\n \tmy $ok = join(\"|\", qw(\n \t\tTRACE\n+\t\tTR2_\n \t\tDEBUG\n \t\tTEST\n \t\t.*_TEST\n-- \n2.21.0.392.gf8f6787159e\n\n"},{"id":"373581","messageId":"37d2e724-8abe-962a-54f9-46cf67f2a3ce@jeffhostetler.com","threadId":"50840","inReplyTo":"20190330075119.13156-1-avarab@gmail.com","subject":"Re: [PATCH] test-lib: whitelist GIT_TR2_* in the environment","fromName":"Jeff Hostetler","fromEmail":"git@jeffhostetler.com","sentAt":"2019-04-10T13:56:19Z","receivedAt":"2019-04-10T13:56:25Z","isPatch":true,"sender":{"key":"git@jeffhostetler.com","avatar":null},"body":"\n\nOn 3/30/2019 3:51 AM, Ævar Arnfjörð Bjarmason wrote:\n> Add GIT_TR2_* to the whitelist of environment variables that we don't\n> clear when running the test suite.\n> \n> This allows us to use the test suite to produce trace2 test data,\n> which is handy to e.g. write consumers that collate the trace data\n> itself.\n> \n> One caveat here is that we produce trace output for not *just* the\n> tests, but also e.g. from this line in test-lib.sh:\n> \n>      # It appears that people try to run tests without building...\n>      \"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X\" >/dev/null\n>      [...]\n> \n> I consider this not just OK but a feature. Let's log *all* the git\n> commands we're going to execute, not just those within\n> test_expect_*().\n> \n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>   t/test-lib.sh | 1 +\n>   1 file changed, 1 insertion(+)\n> \n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 562c57e685..f6318c54c9 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -379,6 +379,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $(\"$PERL_PATH\" -e '\n>   \tmy @env = keys %ENV;\n>   \tmy $ok = join(\"|\", qw(\n>   \t\tTRACE\n> +\t\tTR2_\n>   \t\tDEBUG\n>   \t\tTEST\n>   \t\t.*_TEST\n> \n\nI could go either way on this one.  It would be nice to have\ntelemetry for all of the commands run by the suite (and especially\nfor perf tests) for our developer analysis purposes.  But if your\nsettings have you route that data to a DB, your DBA might not be\nhappy with you....\n\nJeff\n"}]}