# os: fix getrlimit/setrlimit test for MIPS · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d7c770fb7f071543c21d91dc2d01f01df81f0cf6)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d7c770fb7f071543c21d91dc2d01f01df81f0cf6

Requested commit: d7c770fb7f071543c21d91dc2d01f01df81f0cf6

Commit: d7c770fb7f071543c21d91dc2d01f01df81f0cf6

Tree: 320c9612fdd250a11d1cef536aec02e63adf04f8

Author: Vincent Rischmann

Committer: Vincent Rischmann

## Message

```
os: fix getrlimit/setrlimit test for MIPS

This test can fail due to a fix in musl for 32 bit MIPS, where musl changes limits greater than -1UL/2 to RLIM_INFINITY.
See http://git.musl-libc.org/cgit/musl/commit/src/misc/getrlimit.c?id=8258014fd1e34e942a549c88c7e022a00445c352

Depending on the system where the test is run getrlimit can return
RLIM_INFINITY for example if RLIMIT_MEMLOCK is bigger than ~2GiB.

If that happens, the setrlimit call will fail with PermissionDenied.

```

## Parents

- [353c59e6d5f32203ade301c609e20c1fa954f73d](https://git.cafe/gitcafe/zig/commit/353c59e6d5f32203ade301c609e20c1fa954f73d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d7c770fb7f071543c21d91dc2d01f01df81f0cf6?format=markdown)
