[OE-core] [PATCH] apr-util: fix ptest fail problem
changqing.li at windriver.com
changqing.li at windriver.com
Wed Sep 12 08:12:28 UTC 2018
From: Changqing Li <changqing.li at windriver.com>
test_dbm test suite failed since upgrade of gdbm,
from gdbm 13.1, return value changed for some function.
Signed-off-by: Changqing Li <changqing.li at windriver.com>
---
.../apr-util/0001-apr-util-fix-ptest-fail.patch | 44 ++++++++++++++++++++++
meta/recipes-support/apr/apr-util_1.6.1.bb | 1 +
2 files changed, 45 insertions(+)
create mode 100644 meta/recipes-support/apr/apr-util/0001-apr-util-fix-ptest-fail.patch
diff --git a/meta/recipes-support/apr/apr-util/0001-apr-util-fix-ptest-fail.patch b/meta/recipes-support/apr/apr-util/0001-apr-util-fix-ptest-fail.patch
new file mode 100644
index 0000000..316d54c
--- /dev/null
+++ b/meta/recipes-support/apr/apr-util/0001-apr-util-fix-ptest-fail.patch
@@ -0,0 +1,44 @@
+From 665ac3c36247218da7b61b977b3aeede5d6ec9a2 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li at windriver.com>
+Date: Wed, 12 Sep 2018 15:30:41 +0800
+Subject: [PATCH] apr-util: fix ptest fail
+
+Test suite test_dbm failed when gdbm is tested. From gdbm 13.1, have below
+change:
+
+ * gdbm_fetch, gdbm_firstkey, and gdbm_nextkey behavior
+
+ If the requested key was not found, these functions return datum with
+ dptr pointing to NULL and set gdbm_errno to GDBM_ITEM_NOT_FOUND (in
+ prior releases, gdbm_errno was set to GDBM_NO_ERROR)
+
+in this place, we don't take GDBM_ITEM_NOT_FOUND as error, still should
+return success, so make this patch.
+
+Upstream-Status: Inappropriate
+- This patch is not appropriate for upstream, checked 1.6.x development
+ branch, this part have changed to take dbm_said directly. so after apr-util
+ is upgraded in the future, maybe this patch need to dropped.
+
+Signed-off-by: Changqing Li <changqing.li at windriver.com>
+---
+ dbm/apr_dbm_gdbm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c
+index 749447a..94e3a86 100644
+--- a/dbm/apr_dbm_gdbm.c
++++ b/dbm/apr_dbm_gdbm.c
+@@ -57,7 +57,8 @@ static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said)
+
+ /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */
+
+- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) {
++ dbm->errcode = gdbm_errno;
++ if (dbm->errcode == GDBM_NO_ERROR || dbm->errcode == GDBM_ITEM_NOT_FOUND) {
+ dbm->errmsg = NULL;
+ }
+ else {
+--
+2.7.4
+
diff --git a/meta/recipes-support/apr/apr-util_1.6.1.bb b/meta/recipes-support/apr/apr-util_1.6.1.bb
index 88b4300..98f9db6 100644
--- a/meta/recipes-support/apr/apr-util_1.6.1.bb
+++ b/meta/recipes-support/apr/apr-util_1.6.1.bb
@@ -13,6 +13,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
file://configfix.patch \
file://configure_fixes.patch \
file://run-ptest \
+ file://0001-apr-util-fix-ptest-fail.patch \
"
SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f"
--
2.7.4
More information about the Openembedded-core
mailing list