Fix build failure
(cherry picked from commit 384691e1fd9153c13174c7731cefab98151a0a06)
This commit is contained in:
parent
787d1d4887
commit
d108758b89
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: dovecot
|
Name: dovecot
|
||||||
Version: 2.3.15
|
Version: 2.3.15
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Dovecot Secure imap server
|
Summary: Dovecot Secure imap server
|
||||||
License: MIT and LGPLv2.1
|
License: MIT and LGPLv2.1
|
||||||
URL: http://www.dovecot.org/
|
URL: http://www.dovecot.org/
|
||||||
@ -35,6 +35,8 @@ Patch6009: dovecot-2.3.11-bigkey.patch
|
|||||||
Patch6010: dovecot-2.3.6-opensslhmac.patch
|
Patch6010: dovecot-2.3.6-opensslhmac.patch
|
||||||
Patch6011: dovecot-2.3.15-fixvalcond.patch
|
Patch6011: dovecot-2.3.15-fixvalcond.patch
|
||||||
Patch6012: dovecot-2.3.15-valbasherr.patch
|
Patch6012: dovecot-2.3.15-valbasherr.patch
|
||||||
|
# https://github.com/dovecot/core/commit/6d902507c24fca4f64e3e9bf7d79ae5a48281cd8
|
||||||
|
Patch0013: test-cpu-limit-remove-checking-for-CPU-usage-upper-limit.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++ openssl-devel pam-devel zlib-devel bzip2-devel libcap-devel
|
BuildRequires: gcc-c++ openssl-devel pam-devel zlib-devel bzip2-devel libcap-devel
|
||||||
BuildRequires: libtool autoconf automake pkgconfig sqlite-devel libpq-devel
|
BuildRequires: libtool autoconf automake pkgconfig sqlite-devel libpq-devel
|
||||||
@ -304,6 +306,9 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 10 2022 yaoxin <yaoxin30@ha-partners.com> - 1:2.3.15-5
|
||||||
|
- Fix build failure
|
||||||
|
|
||||||
* Mon Feb 21 2022 caodongxia <caodongxia@huawei.com> - 2.3.15-4
|
* Mon Feb 21 2022 caodongxia <caodongxia@huawei.com> - 2.3.15-4
|
||||||
- Add requires tar for dovecot-sysreport command
|
- Add requires tar for dovecot-sysreport command
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,60 @@
|
|||||||
|
From 6d902507c24fca4f64e3e9bf7d79ae5a48281cd8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Timo Sirainen <timo.sirainen@open-xchange.com>
|
||||||
|
Date: Tue, 21 Sep 2021 13:38:27 +0300
|
||||||
|
Subject: [PATCH] lib: test-cpu-limit - Remove checking for CPU usage upper
|
||||||
|
limit
|
||||||
|
|
||||||
|
These tests keep randomly failing on loaded systems. It's more important
|
||||||
|
anyway to check that the minimum CPU usage is high enough than it is to
|
||||||
|
check that CPU usage isn't too high.
|
||||||
|
---
|
||||||
|
src/lib/test-cpu-limit.c | 10 ----------
|
||||||
|
1 file changed, 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/test-cpu-limit.c b/src/lib/test-cpu-limit.c
|
||||||
|
index 23ac923f2f..aefb92ab7d 100644
|
||||||
|
--- a/src/lib/test-cpu-limit.c
|
||||||
|
+++ b/src/lib/test-cpu-limit.c
|
||||||
|
@@ -68,8 +68,6 @@ test_cpu_limit_simple(enum cpu_limit_type type, const char *type_str)
|
||||||
|
cpu = get_cpu_time(type);
|
||||||
|
diff_msecs = timeval_diff_msecs(&cpu, &usage);
|
||||||
|
test_assert_cmp(diff_msecs, >=, 2000 - ALLOW_MSECS_BELOW);
|
||||||
|
- if ((type & CPU_LIMIT_TYPE_SYSTEM) == 0)
|
||||||
|
- test_assert_cmp(diff_msecs, <=, 2000 + ALLOW_MSECS_ABOVE);
|
||||||
|
|
||||||
|
lib_signals_deinit();
|
||||||
|
test_end();
|
||||||
|
@@ -100,16 +98,12 @@ static void test_cpu_limit_nested(enum cpu_limit_type type, const char *type_str
|
||||||
|
/* we may have looped only for a short time in case climit1
|
||||||
|
was triggered during this loop. */
|
||||||
|
diff_msecs = timeval_diff_msecs(&cpu, &usage2);
|
||||||
|
- if ((type & CPU_LIMIT_TYPE_SYSTEM) == 0)
|
||||||
|
- test_assert_cmp(diff_msecs, <=, 1000 + ALLOW_MSECS_ABOVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
cpu_limit_deinit(&climit1);
|
||||||
|
cpu = get_cpu_time(type);
|
||||||
|
diff_msecs = timeval_diff_msecs(&cpu, &usage1);
|
||||||
|
test_assert_cmp(diff_msecs, >=, 3000 - ALLOW_MSECS_BELOW);
|
||||||
|
- if ((type & CPU_LIMIT_TYPE_SYSTEM) == 0)
|
||||||
|
- test_assert_cmp(diff_msecs, <=, 3000 + ALLOW_MSECS_ABOVE);
|
||||||
|
|
||||||
|
lib_signals_deinit();
|
||||||
|
test_end();
|
||||||
|
@@ -138,16 +132,12 @@ static void test_cpu_limit_nested(enum cpu_limit_type type, const char *type_str
|
||||||
|
/* we may have looped only for a short time in case climit1
|
||||||
|
was triggered during this loop. */
|
||||||
|
diff_msecs = timeval_diff_msecs(&cpu, &usage2);
|
||||||
|
- if ((type & CPU_LIMIT_TYPE_SYSTEM) == 0)
|
||||||
|
- test_assert_cmp(diff_msecs, <=, 1000 + ALLOW_MSECS_ABOVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
cpu_limit_deinit(&climit1);
|
||||||
|
cpu = get_cpu_time(type);
|
||||||
|
diff_msecs = timeval_diff_msecs(&cpu, &usage1);
|
||||||
|
test_assert_cmp(diff_msecs, >=, 3000 - ALLOW_MSECS_BELOW);
|
||||||
|
- if ((type & CPU_LIMIT_TYPE_SYSTEM) == 0)
|
||||||
|
- test_assert_cmp(diff_msecs, <=, 3000 + ALLOW_MSECS_ABOVE);
|
||||||
|
|
||||||
|
i_unlink_if_exists(test_path);
|
||||||
|
lib_signals_deinit();
|
||||||
Loading…
x
Reference in New Issue
Block a user