test: remove pie test case from test-standalone

We already have test/cases/pie_linux.zig covering this.
This commit is contained in:
Alex Rønne Petersen 2025-09-26 01:20:51 +02:00
parent 459ad8c8e6
commit 212715f62d
No known key found for this signature in database
3 changed files with 0 additions and 44 deletions

View File

@ -139,9 +139,6 @@
.c_embed_path = .{
.path = "c_embed_path",
},
.pie = .{
.path = "pie",
},
.issue_12706 = .{
.path = "issue_12706",
},

View File

@ -1,26 +0,0 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
const test_step = b.step("test", "Test it");
b.default_step = test_step;
const optimize: std.builtin.OptimizeMode = .Debug;
const target = b.resolveTargetQuery(.{
.os_tag = .linux,
.cpu_arch = .x86_64,
});
const main = b.addTest(.{
.root_module = b.createModule(.{
.root_source_file = b.path("main.zig"),
.optimize = optimize,
.target = target,
}),
});
main.pie = true;
const run = b.addRunArtifact(main);
run.skip_foreign_checks = true;
test_step.dependOn(&run.step);
}

View File

@ -1,15 +0,0 @@
const std = @import("std");
const elf = std.elf;
threadlocal var foo: u8 = 42;
test "Check ELF header" {
// PIE executables are marked as ET_DYN, regular exes as ET_EXEC.
const header = @as(*elf.Ehdr, @ptrFromInt(std.process.getBaseAddress()));
try std.testing.expectEqual(elf.ET.DYN, header.e_type);
}
test "TLS is initialized" {
// Ensure the TLS is initialized by the startup code.
try std.testing.expectEqual(@as(u8, 42), foo);
}