Skip to content

test(acceptance): activate NoDynamic so the RPATH tag is actually pinned (reld#123) - #164

Merged
zackees merged 2 commits into
mainfrom
test/123-nodynamic-directive
Sep 17, 2026
Merged

zackees merged 2 commits into
mainfrom
test/123-nodynamic-directive

Conversation

@zackees

@zackees zackees commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Advances #123 (Wave 1 of #153): ticks rpath_tag_default_documented on the Phase 2 checklist.

A test that was not running

NoDynamic is fully implemented — parsed into absent_dynamic_entries, checked in verify_dynamic_entries — but it was still listed in is_deferred_legacy_directive, and a deferred directive silently skips the entire fixture. So crates/reld/tests/sources/elf/new-dtags/new-dtags.c never ran. reld's DT_RUNPATH / DT_RPATH behaviour, the only thing that fixture exists to pin, was untested in both directions while looking covered.

(This is the same trap that hid a fixture during #155: a directive on the deferred list takes the whole file with it.)

What changes

  • NoDynamic moves off the deferred list and onto the frozen directive surface. No new implementation was needed; the verifier was already there.
  • A third configuration: the default, with neither --enable-new-dtags nor --disable-new-dtags. That is the tag a caller gets from a bare -rpath, and it was the one case the fixture did not describe. reld emits DT_RUNPATH, matching ld.lld:
reld  -rpath /tmp/foo                       -> RUNPATH
ld.lld -rpath /tmp/foo                      -> RUNPATH
reld  -rpath /tmp/foo --disable-new-dtags   -> RPATH

The fixture also records why the distinction matters (RUNPATH is not transitive; LD_LIBRARY_PATH takes precedence over it), so the property is documented where the person changing it will read it.

pack-relative-relocs also uses NoDynamic, but stays skipped on DoesNotContain and LinkSoArgs — separate directives, separate work.

Verification

cargo test --test acceptance: 215 passed, up from 212, with the same 11 pre-existing environmental failures this NixOS host produces on main (no static glibc). The three new tests are elf/x86_64/new-dtags/{default-dtags,new-dtags,old-dtags}.

🤖 Generated with Claude Code

…ned (reld#123)

`NoDynamic` was fully implemented — parsed into `absent_dynamic_entries` and
checked in `verify_dynamic_entries` — but still listed as a deferred legacy
directive, and a deferred directive silently skips the whole fixture. So
`new-dtags` never ran. reld's DT_RUNPATH/DT_RPATH behaviour, which the fixture
exists to pin, was untested in both directions.

Removing it from the deferred list and adding it to the frozen surface makes all
three configurations run. The third is new: the default, with neither
`--enable-new-dtags` nor `--disable-new-dtags`, which is the tag a caller gets
from a bare `-rpath`. reld emits DT_RUNPATH there, matching ld.lld — verified
against ld.lld — and that is `rpath_tag_default_documented` on the reld#123
Phase 2 checklist.

`pack-relative-relocs` also uses `NoDynamic` but stays skipped on
`DoesNotContain` and `LinkSoArgs`, which are separate directives.

Acceptance: 215 passed, up from 212, with the same 11 pre-existing environmental
failures this host has on main.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Running `new-dtags` for the first time made its own ratchet fire: the
`old-dtags` configuration carried `.dynamic.DT_FLAGS_1.NOW`, and with the
fixture actually executing, the oracle reports no such difference. The ratchet's
message is "remove it from the fixture", so it is removed.

That is the second thing the fixture being skipped was hiding, after the RPATH
behaviour itself.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@zackees
zackees merged commit 8f57215 into main Sep 17, 2026
18 checks passed
@zackees
zackees deleted the test/123-nodynamic-directive branch September 17, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant