authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-26 01:20:51+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-28 08:19:49+02:00
logebaec8e03f46f15fe194f6b794c34816a416dc88
tree054de5beb25a25e5ed7d6ae412de5beedd652d8c
parent135f1915daf8583a4dee81691da70cbeb14004f8
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: remove `pie` test case from test-standalone

We already have test/cases/pie_linux.zig covering this.

3 files changed, 0 insertions(+), 44 deletions(-)

test/standalone/build.zig.zon-3
......@@ -136,9 +136,6 @@
136136 .c_embed_path = .{
137137 .path = "c_embed_path",
138138 },
139 .pie = .{
140 .path = "pie",
141 },
142139 .issue_12706 = .{
143140 .path = "issue_12706",
144141 },
test/standalone/pie/build.zig deleted-26
......@@ -1,26 +0,0 @@
1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const test_step = b.step("test", "Test it");
5 b.default_step = test_step;
6
7 const optimize: std.builtin.OptimizeMode = .Debug;
8 const target = b.resolveTargetQuery(.{
9 .os_tag = .linux,
10 .cpu_arch = .x86_64,
11 });
12
13 const main = b.addTest(.{
14 .root_module = b.createModule(.{
15 .root_source_file = b.path("main.zig"),
16 .optimize = optimize,
17 .target = target,
18 }),
19 });
20 main.pie = true;
21
22 const run = b.addRunArtifact(main);
23 run.skip_foreign_checks = true;
24
25 test_step.dependOn(&run.step);
26}
test/standalone/pie/main.zig deleted-15
......@@ -1,15 +0,0 @@
1const std = @import("std");
2const elf = std.elf;
3
4threadlocal var foo: u8 = 42;
5
6test "Check ELF header" {
7 // PIE executables are marked as ET_DYN, regular exes as ET_EXEC.
8 const header = @as(*elf.Ehdr, @ptrFromInt(std.process.getBaseAddress()));
9 try std.testing.expectEqual(elf.ET.DYN, header.e_type);
10}
11
12test "TLS is initialized" {
13 // Ensure the TLS is initialized by the startup code.
14 try std.testing.expectEqual(@as(u8, 42), foo);
15}