From: Mark Wielaard Date: Thu, 11 Feb 2021 17:29:52 +0000 (+0100) Subject: vg_regtest: test-specific environment variables not reset between tests X-Git-Tag: VALGRIND_3_17_0~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=208f2d96069574e7a75cb3f8e53adb216e4795b9;p=thirdparty%2Fvalgrind.git vg_regtest: test-specific environment variables not reset between tests Test-specific environment variables set in .vgtest files are not reset between tests. This can result in tests running with environment variables intended for a previously run test. This can be easily fixed by clearing the @env and @envB arrays in tests/vg_regtest:read_vgtest_file() Original patch by Aaron Merey https://bugs.kde.org/show_bug.cgi?id=432672 --- diff --git a/NEWS b/NEWS index cd372235f2..3e0f5a0bd3 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,7 @@ n-i-bz helgrind: If hg_cli__realloc fails, return NULL. diagnostics 430354 ppc stxsibx and stxsihx instructions write too much data 430485 expr_is_guardable doesn't handle Iex_Qop +432672 vg_regtest: test-specific environment variables not reset between tests Release 3.16.1 (?? June 2020) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in index 5803b86f59..c7cc60124b 100755 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -300,9 +300,9 @@ sub read_vgtest_file($) my ($f) = @_; # Defaults. - ($vgopts, $prog, $args) = ("", undef, ""); + ($vgopts, $prog, $args, @env) = ("", undef, "", ()); ($stdout_filter, $stderr_filter) = (undef, undef); - ($progB, $argsB, $stdinB) = (undef, "", undef); + ($progB, $argsB, $stdinB, @envB) = (undef, "", undef, ()); ($stdoutB_filter, $stderrB_filter) = (undef, undef); ($prereq, $post, $cleanup) = (undef, undef, undef); ($stdout_filter_args, $stderr_filter_args) = (undef, undef);