Merge pull request #25402 from alexrp/libc-test-ci

`ci`: enable running libc-test on `x86_64-linux-release`
This commit is contained in:
Alex Rønne Petersen 2025-10-14 21:29:57 +02:00 committed by GitHub
commit 4edebf40d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 1 deletions

View File

@ -615,6 +615,8 @@ pub fn build(b: *std.Build) !void {
.optimize_modes = optimization_modes, .optimize_modes = optimization_modes,
.test_filters = test_filters, .test_filters = test_filters,
.test_target_filters = test_target_filters, .test_target_filters = test_target_filters,
// Highest RSS observed in any test case was exactly 1465151488 on x86_64-linux CI.
.max_rss = 1758181785,
})) |test_libc_step| test_step.dependOn(test_libc_step); })) |test_libc_step| test_step.dependOn(test_libc_step);
} }

View File

@ -56,6 +56,7 @@ stage3-release/bin/zig build \
stage3-release/bin/zig build test docs \ stage3-release/bin/zig build test docs \
--maxrss 21000000000 \ --maxrss 21000000000 \
-Dlldb=$HOME/deps/lldb-zig/Release-e0a42bb34/bin/lldb \ -Dlldb=$HOME/deps/lldb-zig/Release-e0a42bb34/bin/lldb \
-Dlibc-test-path=$HOME/deps/libc-test-f2bac77 \
-fqemu \ -fqemu \
-fwasmtime \ -fwasmtime \
-Dstatic-llvm \ -Dstatic-llvm \

View File

@ -91,7 +91,7 @@ pub fn addCases(cases: *tests.LibcContext) void {
cases.addLibcTestCase("regression/lseek-large.c", false, .{}); cases.addLibcTestCase("regression/lseek-large.c", false, .{});
cases.addLibcTestCase("regression/malloc-0.c", true, .{}); cases.addLibcTestCase("regression/malloc-0.c", true, .{});
// "regression/malloc-brk-fail.c": QEMU OOM // "regression/malloc-brk-fail.c": QEMU OOM
cases.addLibcTestCase("regression/malloc-oom.c", false, .{}); // wasi-libc: requires t_memfill // cases.addLibcTestCase("regression/malloc-oom.c", false, .{}); // wasi-libc: requires t_memfill; QEMU OOM
cases.addLibcTestCase("regression/mbsrtowcs-overflow.c", true, .{}); cases.addLibcTestCase("regression/mbsrtowcs-overflow.c", true, .{});
cases.addLibcTestCase("regression/memmem-oob-read.c", true, .{}); cases.addLibcTestCase("regression/memmem-oob-read.c", true, .{});
cases.addLibcTestCase("regression/memmem-oob.c", true, .{}); cases.addLibcTestCase("regression/memmem-oob.c", true, .{});

View File

@ -10,6 +10,7 @@ pub const Options = struct {
optimize_modes: []const std.builtin.OptimizeMode, optimize_modes: []const std.builtin.OptimizeMode,
test_filters: []const []const u8, test_filters: []const []const u8,
test_target_filters: []const []const u8, test_target_filters: []const []const u8,
max_rss: usize,
}; };
const TestCase = struct { const TestCase = struct {
@ -100,6 +101,7 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
const exe = libc.b.addExecutable(.{ const exe = libc.b.addExecutable(.{
.name = test_case.name, .name = test_case.name,
.root_module = mod, .root_module = mod,
.max_rss = libc.options.max_rss,
}); });
const run = libc.b.addRunArtifact(exe); const run = libc.b.addRunArtifact(exe);
@ -108,6 +110,7 @@ pub fn addTarget(libc: *const Libc, target: std.Build.ResolvedTarget) void {
run.expectStdErrEqual(""); run.expectStdErrEqual("");
run.expectStdOutEqual(""); run.expectStdOutEqual("");
run.expectExitCode(0); run.expectExitCode(0);
run.step.max_rss = libc.options.max_rss;
libc.root_step.dependOn(&run.step); libc.root_step.dependOn(&run.step);
} }