File: fix-32-bit-tests.patch

package info (click to toggle)
rust-heed 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 788 kB
  • sloc: makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: Fix tests on 32-bit architectures
 One of the tests uses a hardcoded value which is too large to fit into
 32 bits, which is the width of usize on 32-bit architectures. This
 results in the test failing due to the value overflowing on such
 architectures. Fix this by using a smaller value (which actually
 matches the corresponding code comment).
Author: Arnaud Ferraris <aferraris@debian.org>
Last-Update: 2025-10-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/envs/env.rs
+++ b/src/envs/env.rs
@@ -865,7 +865,7 @@
             // We really need this env to be dropped before the read-only access.
             let env = unsafe {
                 EnvOpenOptions::new()
-                    .map_size(16 * 1024 * 1024 * 1024) // 10MB
+                    .map_size(10 * 1024 * 1024) // 10MB
                     .max_dbs(32)
                     .open(dir.path())
                     .unwrap()
@@ -885,7 +885,7 @@
             // Open now we do a read-only opening
             let env = unsafe {
                 EnvOpenOptions::new()
-                    .map_size(16 * 1024 * 1024 * 1024) // 10MB
+                    .map_size(10 * 1024 * 1024) // 10MB
                     .max_dbs(32)
                     .open(dir.path())
                     .unwrap()
@@ -915,7 +915,7 @@
             // Open now we do a read-only opening
             let env = unsafe {
                 EnvOpenOptions::new()
-                    .map_size(16 * 1024 * 1024 * 1024) // 10MB
+                    .map_size(10 * 1024 * 1024) // 10MB
                     .max_dbs(32)
                     .open(dir.path())
                     .unwrap()