Commit 0c2d0d4
committed
tests: object: refactor largefile test to not use
The `p_fallocate` platform is currently in use in our tests,
only, but it proved to be quite burdensome to get it implemented
in a cross-platform way. The only "real" user is the test
object::tree::read::largefile, where it's used to allocate a
large file in the filesystem only to commit it to the repo and
read its object back again. We can simplify this quite a bit by
just using an in-memory buffer of 4GB. Sure, this cannot be used
on platforms with low resources. But creating 4GB files is not
any better, and we already skip the test if the environment
variable "GITTEST_INVASIVE_FS_SIZE" is not set. So we're arguably
not worse off than before.p_fallocate
1 parent c3179ef commit 0c2d0d4
1 file changed
+15
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
96 | | - | |
| 94 | + | |
97 | 95 | | |
98 | | - | |
99 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
100 | 99 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 106 | + | |
116 | 107 | | |
117 | 108 | | |
118 | | - | |
119 | 109 | | |
120 | 110 | | |
121 | | - | |
| 111 | + | |
122 | 112 | | |
123 | | - | |
| 113 | + | |
124 | 114 | | |
0 commit comments