commit ebaec8e03f46f15fe194f6b794c34816a416dc88 (tree)
parent 135f1915daf8583a4dee81691da70cbeb14004f8
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Fri, 26 Sep 2025 01:20:51 +0200
test: remove `pie` test case from test-standalone
We already have test/cases/pie_linux.zig covering this.
Diffstat:
3 files changed, 0 insertions(+), 44 deletions(-)
diff --git a/test/standalone/build.zig.zon b/test/standalone/build.zig.zon
@@ -136,9 +136,6 @@
.c_embed_path = .{
.path = "c_embed_path",
},
- .pie = .{
- .path = "pie",
- },
.issue_12706 = .{
.path = "issue_12706",
},
diff --git a/test/standalone/pie/build.zig b/test/standalone/pie/build.zig
@@ -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);
-}
diff --git a/test/standalone/pie/main.zig b/test/standalone/pie/main.zig
@@ -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);
-}