Bug 432672 - vg_regtest: test-specific environment variables not reset between tests
Summary: vg_regtest: test-specific environment variables not reset between tests
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-09 00:57 UTC by Aaron Merey
Modified: 2021-02-11 17:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
envvar_fix.diff (722 bytes, patch)
2021-02-09 00:57 UTC, Aaron Merey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Merey 2021-02-09 00:57:49 UTC
Created attachment 135526 [details]
envvar_fix.diff

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() (see attachment).
Comment 1 Mark Wielaard 2021-02-11 17:42:13 UTC
Thanks for finding this. Your fix looks correct to me. Pushed as:

commit 208f2d96069574e7a75cb3f8e53adb216e4795b9
Author: Mark Wielaard <mark@klomp.org>
Date:   Thu Feb 11 18:29:52 2021 +0100

    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 <amerey@redhat.com>
    
    https://bugs.kde.org/show_bug.cgi?id=432672