public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
To: git-commits@fedoraproject.org
Subject: [rpms/raft] epel10: Fix tests on armv7hl architecture.
Date: Fri, 30 Oct 2026 21:48:29 GMT [thread overview]
Message-ID: <179339690923.1.12075173591495052914.rpms-raft-aac447a599f7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/raft
Branch : epel10
Commit : aac447a599f77a86d0cb684bd26a8589c72f2ebf
Author : Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
Date : 2022-02-12T17:06:28+01:00
Stats : +178/-24 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/raft/c/aac447a599f77a86d0cb684bd26a8589c72f2ebf?branch=epel10
Log:
Fix tests on armv7hl architecture.
---
diff --git a/0.11.3-Revert-test-runner-Define-order-of-constructors.patch b/0.11.3-Revert-test-runner-Define-order-of-constructors.patch
new file mode 100644
index 0000000..834c632
--- /dev/null
+++ b/0.11.3-Revert-test-runner-Define-order-of-constructors.patch
@@ -0,0 +1,93 @@
+commit 837624858668b2f5897cc7a97abca001d87cadd0
+Author: Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
+Date: Sat Feb 12 14:25:20 2022 +0100
+
+ Revert "test runner: Define order of constructors."
+
+ This reverts commit a520dd6601ee7f9bb1662816f494b9ff9ad0a257.
+
+diff --git a/test/lib/runner.h b/test/lib/runner.h
+index f56a80b..32aebea 100644
+--- a/test/lib/runner.h
++++ b/test/lib/runner.h
+@@ -56,47 +56,47 @@ extern int _main_suites_n;
+
+ /* Declare the MunitSuite[] and the MunitTest[] arrays that compose the test
+ * suite identified by S. */
+-#define SUITE__DECLARE(S) \
+- static MunitSuite _##S##_suites[SUITE__CAP]; \
+- static MunitTest _##S##_tests[SUITE__CAP]; \
+- static MunitTestSetup _##S##_setup = NULL; \
+- static MunitTestTearDown _##S##_tear_down = NULL; \
+- static int _##S##_suites_n = 0; \
+- static int _##S##_tests_n = 0; \
+- __attribute__((constructor(101))) static void _##S##_init(void) \
+- { \
+- memset(_##S##_suites, 0, sizeof(_##S##_suites)); \
+- memset(_##S##_tests, 0, sizeof(_##S##_tests)); \
+- (void)_##S##_suites_n; \
+- (void)_##S##_tests_n; \
+- (void)_##S##_setup; \
+- (void)_##S##_tear_down; \
++#define SUITE__DECLARE(S) \
++ static MunitSuite _##S##_suites[SUITE__CAP]; \
++ static MunitTest _##S##_tests[SUITE__CAP]; \
++ static MunitTestSetup _##S##_setup = NULL; \
++ static MunitTestTearDown _##S##_tear_down = NULL; \
++ static int _##S##_suites_n = 0; \
++ static int _##S##_tests_n = 0; \
++ __attribute__((constructor)) static void _##S##_init(void) \
++ { \
++ memset(_##S##_suites, 0, sizeof(_##S##_suites)); \
++ memset(_##S##_tests, 0, sizeof(_##S##_tests)); \
++ (void)_##S##_suites_n; \
++ (void)_##S##_tests_n; \
++ (void)_##S##_setup; \
++ (void)_##S##_tear_down; \
+ }
+
+ /* Set the tests and suites attributes of the next available slot of the
+ * MunitSuite[] array of S1 to the MunitTest[] and MunitSuite[] arrays of S2,
+ * using the given PREFIX. */
+-#define SUITE__ADD_CHILD(S1, PREFIX, S2) \
+- __attribute__((constructor(102))) static void _##S1##_##S2##_init(void) \
+- { \
+- int n = _##S1##_suites_n; \
+- _##S1##_suites[n].prefix = PREFIX; \
+- _##S1##_suites[n].tests = _##S2##_tests; \
+- _##S1##_suites[n].suites = _##S2##_suites; \
+- _##S1##_suites[n].iterations = 0; \
+- _##S1##_suites[n].options = 0; \
+- _##S1##_suites_n = n + 1; \
++#define SUITE__ADD_CHILD(S1, PREFIX, S2) \
++ __attribute__((constructor)) static void _##S1##_##S2##_init(void) \
++ { \
++ int n = _##S1##_suites_n; \
++ _##S1##_suites[n].prefix = PREFIX; \
++ _##S1##_suites[n].tests = _##S2##_tests; \
++ _##S1##_suites[n].suites = _##S2##_suites; \
++ _##S1##_suites[n].iterations = 0; \
++ _##S1##_suites[n].options = 0; \
++ _##S1##_suites_n = n + 1; \
+ }
+
+ /* Add a test case to the MunitTest[] array of suite S. */
+-#define TEST__ADD_TO_SUITE(S, C, SETUP, TEAR_DOWN, OPTIONS, PARAMS) \
+- __attribute__((constructor(103))) static void _##S##_tests_##C##_init(void) \
+- { \
+- MunitTest *tests = _##S##_tests; \
+- int n = _##S##_tests_n; \
+- TEST__SET_IN_ARRAY(tests, n, "/" #C, test_##S##_##C, SETUP, TEAR_DOWN, \
+- OPTIONS, PARAMS); \
+- _##S##_tests_n = n + 1; \
++#define TEST__ADD_TO_SUITE(S, C, SETUP, TEAR_DOWN, OPTIONS, PARAMS) \
++ __attribute__((constructor)) static void _##S##_tests_##C##_init(void) \
++ { \
++ MunitTest *tests = _##S##_tests; \
++ int n = _##S##_tests_n; \
++ TEST__SET_IN_ARRAY(tests, n, "/" #C, test_##S##_##C, SETUP, TEAR_DOWN, \
++ OPTIONS, PARAMS); \
++ _##S##_tests_n = n + 1; \
+ }
+
+ /* Set the values of the I'th test case slot in the given test array */
diff --git a/0.11.3-test-integration-uv-skip-init-oom-test-on-tmpfs.patch b/0.11.3-test-integration-uv-skip-init-oom-test-on-tmpfs.patch
new file mode 100644
index 0000000..bc1e90e
--- /dev/null
+++ b/0.11.3-test-integration-uv-skip-init-oom-test-on-tmpfs.patch
@@ -0,0 +1,41 @@
+From d8e611ada56e4546d568f887ec1fa8c751ae8ec5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mathieu=20Border=C3=A9?= <mathieu.bordere@canonical.com>
+Date: Sat, 5 Feb 2022 16:32:27 +0100
+Subject: [PATCH] test/integration/uv: skip init/oom test on tmpfs
+
+---
+ test/integration/test_uv_init.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/test/integration/test_uv_init.c b/test/integration/test_uv_init.c
+index 75045d46a..3d7cabc8c 100644
+--- a/test/integration/test_uv_init.c
++++ b/test/integration/test_uv_init.c
+@@ -3,6 +3,9 @@
+ #include "../lib/runner.h"
+ #include "../lib/uv.h"
+
++#include <linux/magic.h>
++#include <sys/vfs.h>
++
+ /******************************************************************************
+ *
+ * Fixture with a non-initialized raft_io instance and uv dependencies.
+@@ -144,10 +147,14 @@ static MunitParameterEnum oomParams[] = {
+ TEST(init, oom, setUp, tearDown, 0, oomParams)
+ {
+ struct fixture *f = data;
+-#if defined(__i686__)
+ /* XXX: tmpfs seems to not support O_DIRECT */
+- return MUNIT_SKIP;
+-#endif
++ struct statfs info;
++ int rv;
++ rv = statfs(f->dir, &info);
++ munit_assert_int(rv, ==, 0);
++ if (info.f_type == TMPFS_MAGIC) {
++ return MUNIT_SKIP;
++ }
+ #if defined(__powerpc64__)
+ /* XXX: fails on ppc64el */
+ return MUNIT_SKIP;
diff --git a/0.11.3-test_compress-Respect-32bit-architectures.patch b/0.11.3-test_compress-Respect-32bit-architectures.patch
new file mode 100644
index 0000000..65a8ce4
--- /dev/null
+++ b/0.11.3-test_compress-Respect-32bit-architectures.patch
@@ -0,0 +1,21 @@
+commit 44d506a51aca28ef081a653db7cf017ad39c1fd6
+Author: Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
+Date: Sat Jan 22 18:09:50 2022 +0100
+
+ test/unit/test_compress: Respect 32bit architectures
+
+diff --git a/test/unit/test_compress.c b/test/unit/test_compress.c
+index 229fec5..a7b131a 100644
+--- a/test/unit/test_compress.c
++++ b/test/unit/test_compress.c
+@@ -108,8 +108,8 @@ TEST(Compress, compressDecompressRandomOne, NULL, NULL, 0,
+ }
+
+ static char* len_nonrandom_one_params[] = {
+-#ifdef __arm__
+-/* 4KB 64KB 4MB 1GB INT_MAX (larger alocations fail on arm 32-bit */
++#if !defined(__LP64__) && (defined(__arm__) || defined(__i386__) || defined(__mips__))
++/* 4KB 64KB 4MB 1GB INT_MAX (larger allocations fail on 32-bit archs */
+ "4096", "65536", "4194304", "1073741824", "2147483647",
+ #else
+ /* 4KB 64KB 4MB 1GB 2GB + 200MB */
diff --git a/raft-0.11.3-test_compress-Respect-32bit-architectures.patch b/raft-0.11.3-test_compress-Respect-32bit-architectures.patch
deleted file mode 100644
index 65a8ce4..0000000
--- a/raft-0.11.3-test_compress-Respect-32bit-architectures.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 44d506a51aca28ef081a653db7cf017ad39c1fd6
-Author: Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
-Date: Sat Jan 22 18:09:50 2022 +0100
-
- test/unit/test_compress: Respect 32bit architectures
-
-diff --git a/test/unit/test_compress.c b/test/unit/test_compress.c
-index 229fec5..a7b131a 100644
---- a/test/unit/test_compress.c
-+++ b/test/unit/test_compress.c
-@@ -108,8 +108,8 @@ TEST(Compress, compressDecompressRandomOne, NULL, NULL, 0,
- }
-
- static char* len_nonrandom_one_params[] = {
--#ifdef __arm__
--/* 4KB 64KB 4MB 1GB INT_MAX (larger alocations fail on arm 32-bit */
-+#if !defined(__LP64__) && (defined(__arm__) || defined(__i386__) || defined(__mips__))
-+/* 4KB 64KB 4MB 1GB INT_MAX (larger allocations fail on 32-bit archs */
- "4096", "65536", "4194304", "1073741824", "2147483647",
- #else
- /* 4KB 64KB 4MB 1GB 2GB + 200MB */
diff --git a/raft.spec b/raft.spec
index ac42e01..3e8ca2a 100644
--- a/raft.spec
+++ b/raft.spec
@@ -1,12 +1,17 @@
Name: raft
Version: 0.11.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: C implementation of the Raft consensus protocol
License: LGPLv3 with exceptions
URL: https://github.com/canonical/raft
Source0: %{URL}/archive/v%{version}.tar.gz
-Patch0: raft-0.11.3-test_compress-Respect-32bit-architectures.patch
+# https://github.com/canonical/raft/pull/259/
+Patch0: 0.11.3-test_compress-Respect-32bit-architectures.patch
+# https://github.com/canonical/raft/pull/261
+Patch1: 0.11.3-test-integration-uv-skip-init-oom-test-on-tmpfs.patch
+# https://github.com/canonical/raft/issues/263
+Patch2: 0.11.3-Revert-test-runner-Define-order-of-constructors.patch
BuildRequires: autoconf libtool
BuildRequires: gcc
@@ -43,6 +48,8 @@ This package contains the C-Raft documentation in HTML format.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%build
autoreconf -i
@@ -78,5 +85,18 @@ rm -f %{buildroot}%{_libdir}/libraft.la
%license LICENSE
%doc docs/_build/html/
-%autochangelog
+%changelog
+* Sat Feb 12 2022 Reto Gantenbein <reto.gantenbein@linuxmonk.ch> 0.11.3-3
+- Fix tests on armv7hl architecture.
+* Mon Jan 24 2022 Reto Gantenbein <reto.gantenbein@linuxmonk.ch> 0.11.3-2
+- Fix tests on i686 architecture.
+
+* Sat Jan 22 2022 Reto Gantenbein <reto.gantenbein@linuxmonk.ch> 0.11.3-1
+- Update to 0.11.3
+
+* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.11.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Sun Dec 05 2021 Reto Gantenbein <reto.gantenbein@linuxmonk.ch> 0.11.2-1
+- Initial import (#2017459).
reply other threads:[~2026-10-30 21:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179339690923.1.12075173591495052914.rpms-raft-aac447a599f7@fedoraproject.org \
--to=reto.gantenbein@linuxmonk.ch \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox