aboutsummaryrefslogtreecommitdiff
path: root/test/src/Libc.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-09-30 18:50:38 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-10-01 03:25:13 +0200
commitf049ae6d57341b4abd64fb6e65b6f9a05af1c226 (patch)
treeae351f9deaa6f39f5ce208ad920fa0875db7e08a /test/src/Libc.zig
parente5ebdf9e4199abc347c72d0ff00e211e858a200c (diff)
downloadzig-f049ae6d57341b4abd64fb6e65b6f9a05af1c226.tar.gz
zig-f049ae6d57341b4abd64fb6e65b6f9a05af1c226.zip
libc-test: set a 1.6G max_rss for each test case
1.4G was the highest value I observed for any test case on x86_64-linux. This change should prevent OOM conditions in CI.
Diffstat (limited to 'test/src/Libc.zig')
-rw-r--r--test/src/Libc.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/src/Libc.zig b/test/src/Libc.zig
index 7a5801ea28..708e4c7bb8 100644
--- a/test/src/Libc.zig
+++ b/test/src/Libc.zig
@@ -10,6 +10,7 @@ pub const Options = struct {
optimize_modes: []const std.builtin.OptimizeMode,
test_filters: []const []const u8,
test_target_filters: []const []const u8,
+ max_rss: usize,
};
const TestCase = struct {
@@ -100,6 +101,7 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
const exe = libc.b.addExecutable(.{
.name = test_case.name,
.root_module = mod,
+ .max_rss = libc.options.max_rss,
});
const run = libc.b.addRunArtifact(exe);
@@ -108,6 +110,7 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
run.expectStdErrEqual("");
run.expectStdOutEqual("");
run.expectExitCode(0);
+ run.step.max_rss = libc.options.max_rss;
libc.root_step.dependOn(&run.step);
}