Skip to contentSkip to conversation

neon: Backport redirect test debug improvements

PATCH Superseded Bhabu Bindu 1 participant 1 message Apr 6

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 neon: Backport redirect test debug improvements

The redirect test in neon 0.30.2 intermittently fails with "did not get NE_REDIRECT", making it hard to debug.

Backport relevant upstream changes from updated neon version to:
- log actual return value when NE_REDIRECT is not received
- use double_serve_sstring for improved test reliability

Upstream-Status: Backport
[https://github.com/notroj/neon/commit/f7a3d8f1366c7df6578d79af3b5d28a316011be0]
[https://github.com/notroj/neon/commit/0f8dec6c8e7d672f74bb5f81fc7c6bd0d5c56619]
[https://github.com/notroj/neon/commit/1e562888d85efc492c434474c8d90cef3aaa8b18]
[https://github.com/notroj/neon/commit/9e836bb63bf41fd78e12175cd7b35bfb07a031e3]

---
 ...0001-Temporarily-disable-no_redirect.patch | 45 +++++++++++++++++
 ...ling-no_redirect-with-more-debugging.patch | 50 +++++++++++++++++++
 ...Switch-to-using-double_serve_sstring.patch | 48 ++++++++++++++++++
 .../neon/0004-test-redirect.c-Cleanup.patch   | 49 ++++++++++++++++++
 meta-oe/recipes-support/neon/neon_0.30.2.bb   |  4 ++
 5 files changed, 196 insertions(+)
 create mode 100644 meta-oe/recipes-support/neon/neon/0001-Temporarily-disable-no_redirect.patch
 create mode 100644 meta-oe/recipes-support/neon/neon/0002-Re-enabling-no_redirect-with-more-debugging.patch
 create mode 100644 meta-oe/recipes-support/neon/neon/0003-no_redirect-Switch-to-using-double_serve_sstring.patch
 create mode 100644 meta-oe/recipes-support/neon/neon/0004-test-redirect.c-Cleanup.patch
meta-oe/recipes-support/neon/neon/0001-Temporarily-disable-no_redirect.patch new file +45 -0
new file mode 100644
index 0000000000..e0c373d416
@@ -0,0 +1,45 @@
+From f7a3d8f1366c7df6578d79af3b5d28a316011be0 Mon Sep 17 00:00:00 2001
+From: Joe Orton <[email protected]>
+Date: Thu, 7 Mar 2019 09:56:57 +0000
+Subject: [PATCH 1/4] Temporarily disable redirect.c:no_redirect
+
+Upstream-Status: Backport
+[https://github.com/notroj/neon/commit/f7a3d8f1366c7df6578d79af3b5d28a316011be0]
+Signed-off-by: Bindu Bhabu <[email protected]>
+---
+ test/redirect.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/test/redirect.c b/test/redirect.c
+index c93b388..920c481 100644
+--- a/test/redirect.c
++++ b/test/redirect.c
+@@ -162,6 +162,7 @@ static int fail_loop(void)
+ }
+ #endif
+ 
++#if 0
+ /* ensure that ne_redirect_location returns NULL when no redirect has
+  * been encountered, or redirect hooks aren't registered. */
+ static int no_redirect(void)
+@@ -187,6 +188,7 @@ static int no_redirect(void)
+     ne_session_destroy(sess);
+     return OK;
+ }
++#endif
+ 
+ ne_test tests[] = {
+     T(lookup_localhost),
+@@ -194,7 +196,9 @@ ne_test tests[] = {
+     T(non_absolute),
+     T(relative_1),
+     T(relative_2),
++#if 0
+     T(no_redirect),
++#endif
+     T(NULL) 
+ };
+ 
+-- 
+2.34.1
+
meta-oe/recipes-support/neon/neon/0002-Re-enabling-no_redirect-with-more-debugging.patch new file +50 -0

50 lines not on this page · raw message

meta-oe/recipes-support/neon/neon/0003-no_redirect-Switch-to-using-double_serve_sstring.patch new file +48 -0

48 lines not on this page · raw message

meta-oe/recipes-support/neon/neon/0004-test-redirect.c-Cleanup.patch new file +49 -0

49 lines not on this page · raw message

meta-oe/recipes-support/neon/neon_0.30.2.bb +4 -0
index 646a9eca13..f620d547a9 100644
@@ -9,6 +9,10 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/neon27/neon27_${PV}.orig.tar.gz \
            file://pkgconfig.patch \
            file://fix-package-check-for-libxml2.patch \
            file://run-ptest \
+           file://0001-Temporarily-disable-no_redirect.patch \
+           file://0002-Re-enabling-no_redirect-with-more-debugging.patch \
+           file://0003-no_redirect-Switch-to-using-double_serve_sstring.patch \
+           file://0004-test-redirect.c-Cleanup.patch \
           "
 
 SRC_URI[md5sum] = "e28d77bf14032d7f5046b3930704ef41"
Signature · 1 line
2.34.1