public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Fabio Valentini <decathorpe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-imgref] epel10.3: Skip two tests on 32-bit arches that fail due to integer overflow
Date: Thu, 27 Aug 2026 15:24:35 GMT	[thread overview]
Message-ID: <178784427502.1.12936633231241548756.rpms-rust-imgref-614a79029c7f@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rust-imgref
Branch : epel10.3
Commit : 614a79029c7f5f014526659a078a4be9126649ff
Author : Fabio Valentini <decathorpe@gmail.com>
Date   : 2026-08-27T16:39:09+02:00
Stats  : +40/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-imgref/c/614a79029c7f5f014526659a078a4be9126649ff?branch=epel10.3

Log:
Skip two tests on 32-bit arches that fail due to integer overflow

---
diff --git a/34.patch b/34.patch
new file mode 100644
index 0000000..205f00d
--- /dev/null
+++ b/34.patch
@@ -0,0 +1,39 @@
+From 230d78bca6adbb46fe4d00fa52f18547dbd71365 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Thu, 27 Aug 2026 16:32:09 +0200
+Subject: [PATCH] tests: skip two tests on 32-bit arches that fail due to
+ integer overflow
+
+The value `1usize << 32` overflows on architectures that are not 64-bit.
+This makes two tests either fail for the wrong reason (integer overflow
+in "debug" mode) or pass unexpectedly (wrapping math in "release" mode
+that does not cause the expected error to happen).
+---
+ src/lib.rs | 1 +
+ src/ops.rs | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/lib.rs b/src/lib.rs
+index 4d0f2af..fadbf73 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -922,6 +922,7 @@ mod tests {
+         let _ = img.sub_image_mut(0,0,1,0);
+     }
+ 
++    #[cfg(target_pointer_width = "64")]
+     #[test]
+     #[should_panic(expected = "Invalid ImgRef params")]
+     fn oversized_dimensions() {
+diff --git a/src/ops.rs b/src/ops.rs
+index cc0708d..55f29a3 100644
+--- a/src/ops.rs
++++ b/src/ops.rs
+@@ -71,6 +71,7 @@ fn index() {
+     assert_eq!(5, img.sub_image_mut(1,1,1,1)[(0usize,0usize)]);
+ }
+ 
++#[cfg(target_pointer_width = "64")]
+ #[test]
+ #[should_panic]
+ fn index_u32_with_huge_stride_does_not_wrap() {

diff --git a/rust-imgref.spec b/rust-imgref.spec
index 00642da..c7bf966 100644
--- a/rust-imgref.spec
+++ b/rust-imgref.spec
@@ -15,6 +15,7 @@ Source:         %{crates_source}
 # Manually created patch for downstream crate metadata changes
 # * remove CC0-1.0 from license metadata (not acceptable for code in Fedora)
 Patch:          imgref-fix-metadata.diff
+Patch:          https://github.com/kornelski/imgref/pull/34.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 

                 reply	other threads:[~2026-08-27 15:24 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=178784427502.1.12936633231241548756.rpms-rust-imgref-614a79029c7f@fedoraproject.org \
    --to=decathorpe@gmail.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