On 01/06/2011 01:23 PM, Diego Elio Pettenò wrote:
This avoids throwing the tests off if LD_LIBRARY_PATH or LD_PRELOAD
or
other variables are set.
Signed-off-by: Diego Elio Pettenò <flameeyes(a)gmail.com>
---
tests/commandhelper.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tests/commandhelper.c b/tests/commandhelper.c
index f400e8d..398f002 100644
--- a/tests/commandhelper.c
+++ b/tests/commandhelper.c
@@ -81,7 +81,10 @@ int main(int argc, char **argv) {
qsort(newenv, n, sizeof(newenv[0]), envsort);
for (i = 0 ; i < n ; i++) {
- fprintf(log, "ENV:%s\n", newenv[i]);
+ /* Ignore the variables used to instruct the loader into
+ * behaving differently, as they could throw the tests off. */
+ if ( strncmp(newenv[i], "LD_", 3) != 0 )
This will fail 'make syntax-check'; you should use STRPREFIX from
"internal.h" instead. But other than that, ACK, so I'll push the
amended patch shortly.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org