Skip to content

tests: skip complex calls without libffi support - #504

Merged
jow- merged 1 commit into
ucode-lang:masterfrom
ZyPulse-zy:fix/ffi-complex-test-capability
Oct 23, 2026
Merged

jow- merged 1 commit into
ucode-lang:masterfrom
ZyPulse-zy:fix/ffi-complex-test-capability

Conversation

@ZyPulse-zy

Copy link
Copy Markdown
Contributor

The fix merged in #503 correctly rejects unsupported complex ABI calls, but the new positive call tests still fail on libffi's PowerPC and RISC-V backends.

Probe ffi_type_complex_double through the existing public ffi.C.dlsym() API and use the existing exit-77 skip path when it is absent. Supported targets retain every original assertion.

Validation: 109 native FFI cases pass with no skips; three real SDK/QEMU targets each skip the three complex cases and pass 15 scalar/aggregate/closure and complex-rejection checks.

Only the existing test file changes. AI assistance was used.

Some libffi backends, including PowerPC and RISC-V, do not expose
the predefined complex types. Skip the complex call cases on these
backends, as the implementation deliberately rejects such calls.

Use the public symbol lookup to detect the missing descriptor before
compiling the fixtures, preserving all assertions on supported targets.

Signed-off-by: Yuen Su <zypulsecore@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 07:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@jow-

jow- commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

This shouldn't affect buildability though, or are you running the tests or the build on PPC ?

@ZyPulse-zy

Copy link
Copy Markdown
Contributor Author

This shouldn't affect buildability though, or are you running the tests or the build on PPC ?

Correct, this PR only affects test execution. I cross-compiled ucode and the C test fixtures on x86_64 using the OpenWrt SDK, then ran the PPC ucode binary under qemu-ppc.
#503 already fixed the compilation issue. This PR makes the three complex-call tests skip when the target libffi lacks complex ABI support.

@jow-

jow- commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Got it, let's wait for the CI to become green, then I'll merge it.

@jow-
jow- merged commit 70f5153 into ucode-lang:master Oct 23, 2026
2 checks passed
@jow-

jow- commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Merged, thanks!

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.

3 participants