Commit 212715f62d

Alex Rønne Petersen <alex@alexrp.com>
2025-09-26 01:20:51
test: remove `pie` test case from test-standalone
We already have test/cases/pie_linux.zig covering this.
1 parent 459ad8c
Changed files (3)
test
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);
-}
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);
-}
test/standalone/build.zig.zon
@@ -139,9 +139,6 @@
         .c_embed_path = .{
             .path = "c_embed_path",
         },
-        .pie = .{
-            .path = "pie",
-        },
         .issue_12706 = .{
             .path = "issue_12706",
         },