[Libguestfs] [nbdkit PATCH v4 2/4] tests: Add coverage of new nbdkit_set_dlopen_prefix
Eric Blake
eblake at redhat.com
Mon Feb 17 12:34:16 UTC 2020
On 2/15/20 10:22 PM, Eric Blake wrote:
> Although the real reason for adding the new interface is the vddk
> plugin, that one is harder to test (not everyone configures it to be
> built); so adding a standalone plugin that does the bare minimum to
> validate our code is worthwhile.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> +++ b/tests/test-dlopen.sh
> +
> +# First: show that without using the new function, dlopen complains
> +# about a relative request.
> +nbdkit $libs/test-dlopen-plugin.so --run : 2> test-dlopen.err
Needs to use -U -, otherwise this fails if port 10809 is in use.
> +cat test-dlopen.err
> +grep "as expected: no_one_has" test-dlopen.err
> +
> +# Now, show that we can alter the message based on our config parameter.
> +nbdkit $libs/test-dlopen-plugin.so libdir="$PWD" --run : 2> test-dlopen.err
> +cat test-dlopen.err
> +grep -F "as expected: $PWD/no_one_has" test-dlopen.err
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list