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-26 01:33:38+02:00
log212715f62d3b22a2da18904f570dbc918ca8470a
tree0a8fd6af0c4e245ee21795c24cb4860e83b2863c
parent459ad8c8e6d24d728492bf43d2a00b67db7c3514
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
......@@ -139,9 +139,6 @@
139139 .c_embed_path = .{
140140 .path = "c_embed_path",
141141 },
142 .pie = .{
143 .path = "pie",
144 },
145142 .issue_12706 = .{
146143 .path = "issue_12706",
147144 },
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}