fix tests failed when build with rpmbuild command
This commit is contained in:
parent
e9b953c5b9
commit
318425875c
@ -0,0 +1,48 @@
|
|||||||
|
From 9d935795ea5a3294f82fe65cca17c79a7b6589f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mathieu Parent <math.parent@gmail.com>
|
||||||
|
Date: Thu, 25 Jun 2020 09:48:04 +0200
|
||||||
|
Subject: [PATCH] Fix FTBFS / Increase the over-estimation for sparse files
|
||||||
|
|
||||||
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14418
|
||||||
|
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
||||||
|
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
||||||
|
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
||||||
|
|
||||||
|
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
|
||||||
|
Autobuild-Date(master): Tue Aug 25 04:23:19 UTC 2020 on sn-devel-184
|
||||||
|
---
|
||||||
|
lib/ldb/tests/ldb_kv_ops_test.c | 10 ++++++++--
|
||||||
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/ldb/tests/ldb_kv_ops_test.c b/lib/ldb/tests/ldb_kv_ops_test.c
|
||||||
|
index 30adebf1952..9db2212895f 100644
|
||||||
|
--- a/tests/ldb_kv_ops_test.c
|
||||||
|
+++ b/tests/ldb_kv_ops_test.c
|
||||||
|
@@ -1717,8 +1717,11 @@ static void test_get_size(void **state)
|
||||||
|
/*
|
||||||
|
* The tdb implementation of get_size over estimates for sparse files
|
||||||
|
* which is perfectly acceptable for it's intended use.
|
||||||
|
+ * mipsel, ia64: 9994
|
||||||
|
+ * ppc64el, powerpc, ppc64: 13369
|
||||||
|
+ * sparc64: 5046
|
||||||
|
*/
|
||||||
|
- assert_in_range(size, 2500, 5000);
|
||||||
|
+ assert_in_range(size, 2500, 15000);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -1746,8 +1749,11 @@ static void test_get_size(void **state)
|
||||||
|
/*
|
||||||
|
* The tdb implementation of get_size over estimates for sparse files
|
||||||
|
* which is perfectly acceptable for it's intended use.
|
||||||
|
+ * mipsel, ia64: 9994
|
||||||
|
+ * ppc64el, powerpc, ppc64: 13369
|
||||||
|
+ * sparc64: 5046
|
||||||
|
*/
|
||||||
|
- assert_in_range(size, 2500, 5000);
|
||||||
|
+ assert_in_range(size, 2500, 15000);
|
||||||
|
#endif
|
||||||
|
talloc_free(tmp_ctx);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
27
Skip-ldb_lmdb_free_list_test-on-ppc64el-ppc64-and-sp.patch
Normal file
27
Skip-ldb_lmdb_free_list_test-on-ppc64el-ppc64-and-sp.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From eb5409dd5e4dde482935421ce0eddf88a0d2d2f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mathieu Parent <math.parent@gmail.com>
|
||||||
|
Date: Thu, 25 Jun 2020 15:15:40 +0200
|
||||||
|
Subject: [PATCH] Skip ldb_lmdb_free_list_test on alpha, ia64, mips64el, ppc64el, ppc64 and sparc64
|
||||||
|
|
||||||
|
Workaround: https://bugzilla.samba.org/show_bug.cgi?id=14404
|
||||||
|
---
|
||||||
|
wscript | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff -ruNa ldb-2.1.4/wscript ldb-2.1.4-org/wscript
|
||||||
|
--- ldb-2.1.4/wscript 2021-03-23 11:14:55.530512420 +0800
|
||||||
|
+++ ldb-2.1.4-org/wscript 2020-06-25 16:43:52.000000000 +0800
|
||||||
|
@@ -635,8 +635,9 @@
|
||||||
|
# fit > 4G of data into the DB), it would fill up the disk on
|
||||||
|
# many of our test instances
|
||||||
|
'ldb_mdb_kv_ops_test',
|
||||||
|
+ 'ldb_key_value_sub_txn_mdb_test']
|
||||||
|
+ if os.environ.get('DEB_HOST_ARCH', 'unknown') not in ['alpha', 'ia64', 'mips64el', 'ppc64el', 'ppc64', 'sparc64', 'unknown']:
|
||||||
|
+ test_exes += ['ldb_lmdb_free_list_test']
|
||||||
|
- 'ldb_key_value_sub_txn_mdb_test',
|
||||||
|
- 'ldb_lmdb_free_list_test']
|
||||||
|
else:
|
||||||
|
test_exes += ['ldb_no_lmdb_test']
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
11
libldb.spec
11
libldb.spec
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: libldb
|
Name: libldb
|
||||||
Version: 2.1.4
|
Version: 2.1.4
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A schema-less, ldap like, API and database
|
Summary: A schema-less, ldap like, API and database
|
||||||
Requires: libtalloc%{?_isa} >= %{talloc_version}
|
Requires: libtalloc%{?_isa} >= %{talloc_version}
|
||||||
Requires: libtdb%{?_isa} >= %{tdb_version}
|
Requires: libtdb%{?_isa} >= %{tdb_version}
|
||||||
@ -16,6 +16,9 @@ URL: http://ldb.samba.org/
|
|||||||
Source0: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
|
Source0: http://samba.org/ftp/ldb/ldb-%{version}.tar.gz
|
||||||
Source1: http://samba.org/ftp/ldb/ldb-%{version}.tar.asc
|
Source1: http://samba.org/ftp/ldb/ldb-%{version}.tar.asc
|
||||||
|
|
||||||
|
Patch0: Fix-FTBFS-Increase-the-over-estimation-for-sparse-files.patch
|
||||||
|
Patch1: Skip-ldb_lmdb_free_list_test-on-ppc64el-ppc64-and-sp.patch
|
||||||
|
|
||||||
BuildRequires: gcc libtalloc-devel >= %{talloc_version} libtdb-devel >= %{tdb_version}
|
BuildRequires: gcc libtalloc-devel >= %{talloc_version} libtdb-devel >= %{tdb_version}
|
||||||
BuildRequires: libtevent-devel >= %{tevent_version} lmdb-devel >= 0.9.16 popt-devel
|
BuildRequires: libtevent-devel >= %{tevent_version} lmdb-devel >= 0.9.16 popt-devel
|
||||||
BuildRequires: libxslt docbook-style-xsl python3-devel python3-tdb python3-talloc-devel
|
BuildRequires: libxslt docbook-style-xsl python3-devel python3-tdb python3-talloc-devel
|
||||||
@ -151,6 +154,12 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
|
|||||||
%{_mandir}/man1/ldbsearch.1.*
|
%{_mandir}/man1/ldbsearch.1.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 23 2021 gaihuiying <gaihuiying1@huawei.com> - 2.1.4-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix tests failed when build with rpmbuild command
|
||||||
|
|
||||||
* Fri Jul 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.1.4-1
|
* Fri Jul 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.1.4-1
|
||||||
- Type:update
|
- Type:update
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user