From 7c5752dd5770123468a454c57f3cf8d088c88652 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 8 May 2013 16:11:09 +0100 Subject: [PATCH] Disable some URI tests on older libxml2 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 --- tests/viruritest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/viruritest.c b/tests/viruritest.c index 0bcd78d560..6339d17b0c 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;