[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Disable some URI tests on older libxml2



On 09.05.2013 15:01, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
> 
> Older versions of libxml2 could not correctly parse certain
> URIs. This causes test failures. There's nothing libvirt can
> do about this, so disable the problem tests on old libxml2
> versions
> 
> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---
>  tests/viruritest.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/tests/viruritest.c b/tests/viruritest.c
> index 0bcd78d..6339d17 100644
> --- a/tests/viruritest.c
> +++ b/tests/viruritest.c
> @@ -182,19 +182,23 @@ mymain(void)
>          { (char*)"foo", (char*)"two", false },
>          { NULL, NULL, false },
>      };
> +#ifdef HAVE_XMLURI_QUERY_RAW
>      virURIParam params3[] = {
>          { (char*)"foo", (char*)"&one", false },
>          { (char*)"bar", (char*)"&two", false },
>          { NULL, NULL, false },
>      };
> +#endif
>      virURIParam params4[] = {
>          { (char*)"foo", (char*)"", false },
>          { NULL, NULL, false },
>      };
> +#ifdef HAVE_XMLURI_QUERY_RAW
>      virURIParam params5[] = {
>          { (char*)"foo", (char*)"one two", false },
>          { NULL, NULL, false },
>      };
> +#endif
>      virURIParam params6[] = {
>          { (char*)"foo", (char*)"one", false },
>          { NULL, NULL, false },
> @@ -204,12 +208,16 @@ mymain(void)
>      TEST_PARAMS("foo=one&foo=two", "", params2);
>      TEST_PARAMS("foo=one&&foo=two", "foo=one&foo=two", params2);
>      TEST_PARAMS("foo=one;foo=two", "foo=one&foo=two", params2);
> +#ifdef HAVE_XMLURI_QUERY_RAW
>      TEST_PARAMS("foo=%26one&bar=%26two", "", params3);
> +#endif
>      TEST_PARAMS("foo", "foo=", params4);
>      TEST_PARAMS("foo=", "", params4);
>      TEST_PARAMS("foo=&", "foo=", params4);
>      TEST_PARAMS("foo=&&", "foo=", params4);
> +#ifdef HAVE_XMLURI_QUERY_RAW
>      TEST_PARAMS("foo=one%20two", "", params5);
> +#endif
>      TEST_PARAMS("=bogus&foo=one", "foo=one", params6);
>  
>      return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
> 

Mmm. Okay. ACK

Michal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]