Skip to content

test: abi_policy's catalog imports leave no stub directory (#3485) - #3508

Merged
paul-hammant merged 1 commit into
mainfrom
test/abi-policy-stubdir
Nov 2, 2026
Merged

paul-hammant merged 1 commit into
mainfrom
test/abi-policy-stubdir

Conversation

@paul-hammant

Copy link
Copy Markdown
Collaborator

A test-only follow-up to f52e0e7 (#3485), carried over from the closed #3506.

f52e0e7 made a refused binary import remove its stub directory. It checked that for the ownership refusals in binary_import_ownership. The catalog refusals go through the same exit path in ae_lib_check_compat, and they had no such check.

abi_policy already builds those catalogs from the real aether_lib_meta.h (fake_catalog.c). This PR changes only its import_it helper:

  • each import gets a temp dir of its own, converted with cygpath -m on Windows, the way binary_import_ownership does it;
  • a leftover ae-binimport-* directory fails the test.

That covers five cases: four refusals (another major, an unknown duty, another runtime ABI, a legacy shared runtime) plus a newer minor, which imports.

Verification

  • Negative control: with ae_remove_binimport_stubdirs made a no-op in a copy of main's tools/ae.c, all five cases fail, e.g. [FAIL] abi_policy: major: the import left its stub directory (.../major/tmp/ae-binimport-Njz68e).
  • With main's ae.c: [PASS] abi_policy.
  • Gates: check-changelog, check-tests and check-docs pass.

🤖 Generated with Claude Code

f52e0e7 made a refused binary import remove its stub directory and
checked it for the ownership refusals in binary_import_ownership. The
catalog refusals (ae_lib_check_compat) go through the same path; abi_policy
already builds those catalogs from the real header, so its import_it now
gives each import a temp dir of its own (cygpath'd on Windows, as
binary_import_ownership does) and fails on a leftover ae-binimport-*.

With ae_remove_binimport_stubdirs made a no-op, all five catalog cases
fail (major, duty, newer, otherabi, legacy); with main's ae.c they pass.

From the closed #3506, which carried this beside a duplicate of the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paul-hammant
paul-hammant merged commit 886acf5 into main Nov 2, 2026
44 checks passed
@paul-hammant
paul-hammant deleted the test/abi-policy-stubdir branch November 2, 2026 07:12
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