fix error in test
This commit is contained in:
parent
bce715e90c
commit
55f2368a86
47
Set-polling-self-tests-to-slow.patch
Normal file
47
Set-polling-self-tests-to-slow.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From dd0b437d866878faa4672518b4b732e8ac00aa30 Mon Sep 17 00:00:00 2001
|
||||
From: Mario Limonciello <mario.limonciello@dell.com>
|
||||
Date: Tue, 22 Oct 2019 09:29:41 -0500
|
||||
Subject: [PATCH] trivial: fu-self-test: set polling self tests to slow
|
||||
|
||||
Currently the test runs for 100ms and looks to see that at least 8 times
|
||||
the poll function callback hit.
|
||||
|
||||
This normally works well enough, but during self tests it depends upon
|
||||
too much timing and leads to failures sometimes:
|
||||
|
||||
```
|
||||
** (/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.189: poll cnt=0
|
||||
*# DEBUG: poll cnt=1
|
||||
** (/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.199: poll cnt=1
|
||||
*** (/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.209: poll cnt=2
|
||||
** (/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.227: poll cnt=3
|
||||
*# DEBUG: poll cnt=4
|
||||
** (/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.255: poll cnt=4
|
||||
*# DEBUG: poll cnt=5
|
||||
** (/<<PKGBUILDDIR>>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.267: poll cnt=5
|
||||
Bail out! ERROR:../src/fu-self-test.c:3489:fu_device_poll_func: assertion failed (cnt >= 8): (6 >= 8)
|
||||
--- stderr ---
|
||||
**
|
||||
ERROR:../src/fu-self-test.c:3489:fu_device_poll_func: assertion failed (cnt >= 8): (6 >= 8)
|
||||
-------
|
||||
```
|
||||
|
||||
Mark this as a slow test so that it doesn't cause CI failures.
|
||||
---
|
||||
src/fu-self-test.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/fu-self-test.c b/src/fu-self-test.c
|
||||
index 869b76fc5..2f4a83aa8 100644
|
||||
--- a/src/fu-self-test.c
|
||||
+++ b/src/fu-self-test.c
|
||||
@@ -4149,7 +4149,8 @@ main (int argc, char **argv)
|
||||
g_test_add_func ("/fwupd/archive{cab}", fu_archive_cab_func);
|
||||
g_test_add_func ("/fwupd/engine{requirements-other-device}", fu_engine_requirements_other_device_func);
|
||||
g_test_add_func ("/fwupd/device{incorporate}", fu_device_incorporate_func);
|
||||
- g_test_add_func ("/fwupd/device{poll}", fu_device_poll_func);
|
||||
+ if (g_test_slow ())
|
||||
+ g_test_add_func ("/fwupd/device{poll}", fu_device_poll_func);
|
||||
g_test_add_func ("/fwupd/device-locker{success}", fu_device_locker_func);
|
||||
g_test_add_func ("/fwupd/device-locker{fail}", fu_device_locker_fail_func);
|
||||
g_test_add_func ("/fwupd/device{metadata}", fu_device_metadata_func);
|
||||
@ -9,14 +9,15 @@
|
||||
|
||||
Name: fwupd
|
||||
Version: 1.2.9
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Make updating firmware on Linux automatic, safe and reliable
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/fwupd/fwupd/releases
|
||||
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
||||
|
||||
#Self-tests are failing due to an expired cert #1264
|
||||
Patch1: 0001-Relax-the-certificate-time-checks-in-the-self-tests-.patch
|
||||
Patch0000: 0001-Relax-the-certificate-time-checks-in-the-self-tests-.patch
|
||||
Patch6000: Set-polling-self-tests-to-slow.patch
|
||||
|
||||
BuildRequires: gettext glib2-devel libxmlb-devel valgrind valgrind-devel libgcab1-devel
|
||||
BuildRequires: gpgme-devel libgudev1-devel libgusb-devel libsoup-devel polkit-devel sqlite-devel libxslt
|
||||
@ -174,6 +175,9 @@ mkdir -pm 0700 %{buildroot}%{_localstatedir}/lib/%{name}/gnupg
|
||||
%{_datadir}/man/man1/*
|
||||
|
||||
%changelog
|
||||
* Sun Jun 28 2020 huanghaitao <huanghaitao@huawei.com> - 1.2.9-3
|
||||
- Solve build problem with check
|
||||
|
||||
* Mon Dec 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.9-2
|
||||
- Solve build problem of x86
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user