Skip to content

[tests] Enable sys cppia tests#11922

Merged
Simn merged 2 commits intoHaxeFoundation:developmentfrom
tobil4sk:more-cppia-tests
Mar 15, 2026
Merged

[tests] Enable sys cppia tests#11922
Simn merged 2 commits intoHaxeFoundation:developmentfrom
tobil4sk:more-cppia-tests

Conversation

@tobil4sk
Copy link
Copy Markdown
Member

@tobil4sk tobil4sk commented Jan 16, 2025

There were failures due to: HaxeFoundation/hxcpp#901. I've added workarounds for now to avoid the errors.

@skial skial mentioned this pull request Jan 17, 2025
1 task
@tobil4sk
Copy link
Copy Markdown
Member Author

This threads test currently works incorrectly in jit mode:

raises(
() -> thread.events.run(() -> {}),
sys.thread.NoEventLoopException
);

This is because local functions break exceptions in jit mode, see: HaxeFoundation/hxcpp#876 (comment)

@Simn
Copy link
Copy Markdown
Member

Simn commented Apr 7, 2025

The hxcpp PR has been merged, please update the branch.

@tobil4sk
Copy link
Copy Markdown
Member Author

There are still cppia jit failures. I think it is due to: HaxeFoundation/hxcpp#1212, but it's strange that it isn't affecting Linux because the minimal sample does.

@tobil4sk
Copy link
Copy Markdown
Member Author

it's strange that it isn't affecting Linux because the minimal sample does.

I've found that on linux there is an element of randomness, the same code can cause the issue or not depending on where it is found in the program and whether the client script was compiled with export_classes.info (which changes the classes included/excluded from the cppia script).

I think the problem is that there is some out of bounds memory access occurring due to the attempt to run a method on a null object, and in some cases this out of bounds access is not detected on Linux, but is always detected on Windows and Mac.

Either way, the hxcpp patch includes some additional tests and fixes these errors.

@tobil4sk tobil4sk changed the title [tests] Enable sys, threads, eventloop cppia tests [tests] Enable sys cppia tests Mar 15, 2026
@tobil4sk
Copy link
Copy Markdown
Member Author

@Simn The cppia sys tests are working now. We just need to fix the cppia host path for arm64: HaxeFoundation/hxcpp#1323. It would also be useful to clean up some linux arm64 warnings in the cppia host build: HaxeFoundation/hxcpp#1282

I have reverted the thread/eventloop change as those tests are currently broken due to a regression: HaxeFoundation/hxcpp#1321. I will open a separate PR for them once this is merged.

Comment thread tests/sys/src/TestArguments.hx
@Simn Simn merged commit 907164d into HaxeFoundation:development Mar 15, 2026
97 of 99 checks passed
@tobil4sk tobil4sk deleted the more-cppia-tests branch March 15, 2026 17:28
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.

2 participants