public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Frank Lichtenheld <frank@lichtenheld.com>
To: git-commits@fedoraproject.org
Subject: [rpms/openvpn] main: Add patch to fix unit tests on big endian systems (s390x)
Date: Wed, 01 Jul 2026 16:28:54 GMT	[thread overview]
Message-ID: <178292333458.1.4248530728978876612.rpms-openvpn-46f40bb652ec@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-07-01 16:28 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=178292333458.1.4248530728978876612.rpms-openvpn-46f40bb652ec@fedoraproject.org \
    --to=frank@lichtenheld.com \
    --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