authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-12-01 13:43:16+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-12-01 13:43:16+01:00
log5c6b25d9bb4d6fbee8f823ddc2c4ffcc7b4a9e35
tree65bf15a41fce09936ffd49e9dbee14bd422bad8f
parentaa7d138462602e086aacf738e4b92bfa3372bebe
parent17315109336a8ae048f98170f557b9abb79568db
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #22115 from alexrp/x32-tests

`test`: Add `x86_64-linux-(gnux32,muslx32)` to module tests.

2 files changed, 20 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+4-1
...@@ -2451,7 +2451,10 @@ pub fn fadvise(fd: fd_t, offset: i64, len: i64, advice: usize) usize {...@@ -2451,7 +2451,10 @@ pub fn fadvise(fd: fd_t, offset: i64, len: i64, advice: usize) usize {
2451 const length_halves = splitValue64(len);2451 const length_halves = splitValue64(len);
24522452
2453 return syscall6(2453 return syscall6(
2454 .fadvise64_64,2454 switch (builtin.abi) {
2455 .gnuabin32, .gnux32, .muslabin32, .muslx32 => .fadvise64,
2456 else => .fadvise64_64,
2457 },
2455 @as(usize, @bitCast(@as(isize, fd))),2458 @as(usize, @bitCast(@as(isize, fd))),
2456 offset_halves[0],2459 offset_halves[0],
2457 offset_halves[1],2460 offset_halves[1],
test/tests.zig+16
...@@ -217,6 +217,14 @@ const test_targets = blk: {...@@ -217,6 +217,14 @@ const test_targets = blk: {
217 },217 },
218 .link_libc = true,218 .link_libc = true,
219 },219 },
220 .{
221 .target = .{
222 .cpu_arch = .x86_64,
223 .os_tag = .linux,
224 .abi = .gnux32,
225 },
226 .link_libc = true,
227 },
220 .{228 .{
221 .target = .{229 .target = .{
222 .cpu_arch = .x86_64,230 .cpu_arch = .x86_64,
...@@ -225,6 +233,14 @@ const test_targets = blk: {...@@ -225,6 +233,14 @@ const test_targets = blk: {
225 },233 },
226 .link_libc = true,234 .link_libc = true,
227 },235 },
236 .{
237 .target = .{
238 .cpu_arch = .x86_64,
239 .os_tag = .linux,
240 .abi = .muslx32,
241 },
242 .link_libc = true,
243 },
228 .{244 .{
229 .target = .{245 .target = .{
230 .cpu_arch = .x86_64,246 .cpu_arch = .x86_64,