public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/openvpn] main: Add patch to fix unit tests on big endian systems (s390x)
@ 2026-07-01 16:28 Frank Lichtenheld
  0 siblings, 0 replies; only message in thread
From: Frank Lichtenheld @ 2026-07-01 16:28 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/openvpn
            Branch : main
            Commit : 46f40bb652ec221c4d8a6a297cc477e10b4aeab8
            Author : Frank Lichtenheld <frank@lichtenheld.com>
            Date   : 2026-07-01T16:17:47+00:00
            Stats  : +38/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/openvpn/c/46f40bb652ec221c4d8a6a297cc477e10b4aeab8?branch=main

            Log:
            Add patch to fix unit tests on big endian systems (s390x)

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>

---
diff --git a/0001-test_tls_crypt-Fix-issue-with-temp-file-name-on-big-.patch b/0001-test_tls_crypt-Fix-issue-with-temp-file-name-on-big-.patch
new file mode 100644
index 0000000..9093284
--- /dev/null
+++ b/0001-test_tls_crypt-Fix-issue-with-temp-file-name-on-big-.patch
@@ -0,0 +1,37 @@
+From bb285c2156009fbfbc3ceee439e71daf2cc3dc8a Mon Sep 17 00:00:00 2001
+From: Frank Lichtenheld <frank@lichtenheld.com>
+Date: Wed, 1 Jul 2026 17:57:20 +0200
+Subject: [PATCH 1/1] test_tls_crypt: Fix issue with temp file name on big
+ endian systems
+
+Encountered by Fedora s390x build instances.
+
+Change-Id: Iba577d662b389de539b81034735e437199cb495d
+Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
+---
+ tests/unit_tests/openvpn/test_tls_crypt.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/openvpn/test_tls_crypt.c
+index 82b1dc89..1d8ac258 100644
+--- a/tests/unit_tests/openvpn/test_tls_crypt.c
++++ b/tests/unit_tests/openvpn/test_tls_crypt.c
+@@ -722,8 +722,13 @@ tls_crypt_v2_unwrap_checks(void **state)
+ 
+     tls_options.tmp_dir = "/tmp";
+ 
+-    /* Since we override rand_bytes the tmpfile name is non-random as well */
+-    const char *non_random_tmpfile = "/tmp/openvpn_tls_crypt_v2_metadata__706050403020100706050403020100.tmp";
++    /* Since we override rand_bytes the tmpfile name is non-random as well.
++     * Build the expected name via the same code path as
++     * platform_create_temp_file() */
++    char non_random_tmpfile[128];
++    snprintf(non_random_tmpfile, sizeof(non_random_tmpfile),
++             "%s/" PACKAGE "_tls_crypt_v2_metadata__%08" PRIx64 "%08" PRIx64 ".tmp",
++             tls_options.tmp_dir, get_random(), get_random());
+     unlink(non_random_tmpfile);
+ 
+     expect_string(__wrap_buffer_write_file, filename, non_random_tmpfile);
+-- 
+2.43.0
+

diff --git a/openvpn.spec b/openvpn.spec
index 70e0232..bbcce7e 100644
--- a/openvpn.spec
+++ b/openvpn.spec
@@ -31,6 +31,7 @@ Source3:           roadwarrior-client.conf
 Source10:          gpgkey-F554A3687412CFFEBDEFE0A312F5F7B42F2B01E7.gpg
 Patch1:            fedora-crypto-policy-compliance.patch
 Patch50:           openvpn-2.4-change-tmpfiles-permissions.patch
+Patch51:           0001-test_tls_crypt-Fix-issue-with-temp-file-name-on-big-.patch
 License:           GPL-2.0-only
 BuildRequires:     gnupg2
 BuildRequires:     gcc

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-01 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-01 16:28 [rpms/openvpn] main: Add patch to fix unit tests on big endian systems (s390x) Frank Lichtenheld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox