diff options
author | Jim Meyering <meyering@redhat.com> | 2009-12-10 08:17:02 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-12-10 16:50:05 +0100 |
commit | 06e9880c8e3a0d985cd1a36f1ddc160d1adfb8e2 (patch) | |
tree | 9ccde853825f93b610a0abadb13727da91111d2e /tests | |
parent | bb4cb10e89607437154d84b47b9f93869a9484b7 (diff) | |
download | coreutils-06e9880c8e3a0d985cd1a36f1ddc160d1adfb8e2.tar.xz |
tests: avoid spurious failure when run via valgrind
* tests/misc/printenv: Ignore LD_PRELOAD differences.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/printenv | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/misc/printenv b/tests/misc/printenv index c2bd2e424..a56e9c76d 100755 --- a/tests/misc/printenv +++ b/tests/misc/printenv @@ -25,10 +25,11 @@ fi # Without arguments, printenv behaves like env. Some shells provide -# printenv as a builtin, so we must test via absolute name. +# printenv as a builtin, so we must invoke it via "env". # But beware of $_, set by many shells to the last command run. -env | grep -v '^_' > exp || framework_failure -env -- printenv | grep -v '^_' > out || fail=1 +# Also, filter out LD_PRELOAD, which is set when running under valgrind. +env | grep -Ev '^(_|LD_LIBRARY=)' > exp || framework_failure +env -- printenv | grep -Ev '^(_|LD_LIBRARY=)' > out || fail=1 compare exp out || fail=1 # POSIX is clear that environ may, but need not be, sorted. |