[libvirt] [PATCH] commandtest: avoid printing loader-control variables from commandhelper
Eric Blake
eblake at redhat.com
Thu Jan 6 21:14:56 UTC 2011
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 at 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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110106/1e32aff7/attachment-0001.sig>
More information about the libvir-list
mailing list