Commit Graph
62 Commits
Author SHA1 Message Date
crueter 872aec20b8 [cmake] more parenthesis cleanups, linker gc module, more same-line stuff
I may have gotten carried away.

- I missed some stuff for end parenthesis because I accidentally
  searched within project files instead of the entire directory (so some
  thunk/test/windows stuff was missed), cleaned those up.
- `INTERFACE`, `PUBLIC`, `PRIVATE`, `RUNTIME`, `LIBRARY` should be on
  the same line as the target name. (I should really invest in making a
  style guide...)
- Some short statements were unnecessarily split across multiple
  lines--cleaned those up
- Made a common `LinkerGC` module that applies gc-sections etc. to a
  target in Release mode
- Usually for functions you want to have something on the first line,
  e.g. `FILES`/`DIRECTORY` for install, or the target/a positional
  argument, etc etc. Not always though, notably for some custom_command
  calls

TODO:
- What's with the `list(APPEND LIBS...)` stuff? It's used really
  inconsistently, sometimes not at all, sometimes it looks like there're
  duplicates? A more thorough cleanup is in order there.

Signed-off-by: crueter <crueter@eden-emu.dev>
2025-12-29 15:44:18 -05:00
Ryan Houdek 85e67f92c5 FEX: Rebrand FEXInterpreter as FEX
Still creates a copy of FEXInterpreter from FEX for downstream projects
to have some time to get off the old name. Creating a symlink is kind of
a pain in cmake so just doing an install copy is easy.
2025-09-15 13:06:48 -07:00
Ryan Houdek 9dfd5b5526 unittests: Remove FEXLoader usage from unittests
Use FEXInterpreter directly and pass FEX options through environment
variables.
2025-09-11 12:03:56 -07:00
Ryan Houdek 88e3164b55 unittests: Fixes incorrect argument
Turns out our unittests have been passing an incorrect argument for
years.
2024-09-14 23:15:52 -07:00
Ryan Houdek ae9db336e7 FEXCore/Context: Removes unused features
No functional change here.
- CoreRunningMode enum and variable wasn't used anymore.
   - Code was moved to the frontend
- CustomCPUFactory wasn't used anymore
   - All special signal handling and various features were moved to
     TestHarnessRunner
   - We also don't want to support actual custom CPU cores.
   - TestHarnessRunner just runs as a host runner if compiled on an
     x86-64 device if vixl sim isn't enabled now.
   - Removes the Core config option entirely.
- Moves VDSOPointers struct to the frontend
   - Every use of this lives in the Linux frontend instead now
2024-09-09 18:38:33 -07:00
Paulo Matos b1ec50c7c2 Test running scripts tell ctest of skipped tests
CMake sets 125 as the skipped test exit code that the scripts use.
2024-07-26 14:04:54 +02:00
Paulo Matos ad52514b97 Use number of jobs as defined by TEST_JOB_COUNT
At the moment we always run ctest with max number of cpus. If
undefined, it will keep current behaviour, otherwise it will
honour TEST_JOB_COUNT.

Therefore to run ctest one test at a time, use
`cmake ... -DTEST_JOB_COUNT=1`
2024-07-03 14:09:39 +02:00
Tony Wasserka f4dd456c80 unittests: Instruct CTest to print output from tests on failure 2023-09-26 17:16:28 +02:00
Alyssa Rosenzweig c52741c813 FEXCore: Gut interpreter
It is scarcely used today, and like the x86 jit, it is a significant
maintainence burden complicating work on FEXCore and arm64 optimization. Remove
it, bringing us down to 2 backends.

1 down, 1 to go.

Some interpreter scaffolding remains for x87 fallbacks. That is not a problem
here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2023-09-21 12:48:12 -04:00
Tony Wasserka 527b65648f unittests: Enable logging to stderr when invoking FEXLoader 2023-09-18 16:53:35 +02:00
Ryan Houdek 9fac1b8105 CI: Adds support for flakes
If a test is marked as a flake then it will be tried five times before
giving up.

Works around the problem of needing to babysit CI once a PR is pushed.
As long as we have all the flake tests marked.
2022-09-15 11:44:56 -07:00
Ryan Houdek af32228e38 unittests: Disable known flake in posix tests
Interpreter is flakey here, likely due to some race, but is periodically
fails and makes CI red.
2022-06-30 14:41:14 -07:00
Stefanos Kornilios Misis Poiitidis 40ec910108 unittests: Add FEXLinuxTests, with a few signal and smc tests 2022-06-10 08:34:40 +03:00
Ryan Houdek 1b6d20b731 unittests: Disables Interpreter tests when its disabled
Would result in failures if you weren't expecting it.
2022-02-11 12:55:10 -08:00
Ryan Houdek 9c8642e0dc unittests: Revise POSIX tests known failures and disabled
Some of these behaviours have changed now, particularly around signal
handling.

Some things still fail now of course. But most everything is now
documented as to why it is failing or disabled.

Fixes #955
2022-01-25 11:41:45 -08:00
Ryan Houdek 228aed98c7 unittests: Fixes ROOTFS needing to be defined prior to cmake
cmake will bake in the environment variable in to the build scripts.
Instead have the guest_test_runner fetch it at runtime.

This means if you forget to set ROOTFS prior to running cmake, you can
now set it afterwards and rerun with just ctest instead of a cmake
dance.

Fixes #315
2022-01-09 01:56:13 -08:00
Ryan Houdek 93dccffc81 unittests: Updates posix tests with new passing tests 2022-01-03 03:29:35 -08:00
Ryan Houdek 005818177c unittests: Update posix tests known failures
This test is relying on legacy behaviour which is no longer true.
Keep running it but expect it to fail
2021-09-02 15:23:10 -07:00
Ryan Houdek bb525e2291 unittests: Updates posix tests with expected failures
These are broken due to how sa_mask currently works. Will need to
resolve this.
2021-08-30 03:00:12 -07:00
Ryan Houdek 20a519a250 unittests: Update posix tests that have been fixed 2021-07-02 23:00:48 -07:00
Ryan Houdek 2e9b22e042 POSIX: Updates known failures
Now that signal behaviours have changed a little bit, update the tests that have changed
2021-06-24 20:42:39 -07:00
Ryan Houdek 5fccf5f741 Disable flaky posix test
Test sleeps for 1 second and expects to come back within 10ms of the time.
When the CPU is doing other things then it can end up missing that timeframe. Thus flake.

Just disable it
2021-06-17 07:51:37 -07:00
Ryan Houdek 90a8c4f114 Shuffle timed sigwait unit tests that have changed behaviour 2021-05-01 10:11:20 -07:00
Ryan Houdek f4ab7cceab Updates a couple POSIX test case failures
The behaviour of these is broken but now they are documented in how they are broken
2021-04-05 04:27:52 -07:00
Ryan Houdek 858566c356 Fixes clock_nanosleep
glibc version behaves slightly differently than kernel
2021-04-02 20:41:04 -07:00
Ryan Houdek dc041bdf0e Disables silent logging on unit tests
We need these for our CI artifacts
2021-03-26 18:04:17 -07:00
Ryan Houdek b857d6ba16 Disables killpg tests and reenables a few tests
killpg has been causing us testing problems for a while now.
As we were running more tests it was becoming more likely to hit a test
doing killpg in the background.

All of the tests run under the same process group so it is a significant
race condition to have these running.
Until we improve CI to somehow work around how killpg works, we just
need to have these disabled.
2021-01-11 09:12:02 -08:00
Stefanos Kornilios Mitsis Poiitidis 311aa2b811 Tests: Cleanup scripts, review feedback 2021-01-10 18:06:02 +02:00
Stefanos Kornilios Mitsis Poiitidis 32aea07335 Tests/posix: Disable some more 2021-01-09 19:47:06 +02:00
Stefanos Kornilios Mitsis Poiitidis 2957515967 Tests/posix: Disable some more 2021-01-09 19:40:50 +02:00
Stefanos Kornilios Mitsis Poiitidis 5c18ea3211 Tests/posix: Disable some more 2021-01-09 19:38:28 +02:00
Stefanos Kornilios Mitsis Poiitidis afaf79f568 Tests/posix: Disavle verbose for real 2021-01-09 19:33:53 +02:00
Stefanos Kornilios Mitsis Poiitidis 278e156a8a Tests: Move timeout to ctest from python + timeout 2021-01-09 19:26:15 +02:00
Stefanos Kornilios Mitsis Poiitidis 08b9f90286 Tests: Disable Verbose logging for posixtests, gvisor 2021-01-09 19:14:15 +02:00
Stefanos Kornilios Mitsis Poiitidis 7cc2404c63 Tests: Correctly match test cases 2021-01-09 19:08:46 +02:00
Stefanos Kornilios Mitsis Poiitidis fea7ac1f83 Tests: Update posix_test_runner, update gvisor and posix test lists 2021-01-09 18:57:19 +02:00
Ryan Houdek 17c34537f9 Redisable the mlockall unit test
CI runners don't have enough RAM to ensure it consistently passes, so it
is flakey
2020-12-10 02:15:52 -08:00
Ryan Houdek f17ec1661c Removes -U option from POSIX unit test runner
Option no longer exists.
mlockall POSIX test now works since it doesn't try to make 64GB of
memory resident in RAM
2020-12-10 02:09:52 -08:00
Ryan Houdek 467a27ba23 This test is unstable between x86 and Arm64 architecture 2020-11-20 01:21:26 -08:00
Ryan Houdek b0c842163e These are now passing 2020-11-20 01:07:54 -08:00
Ryan Houdek 820d83f158 Disables problematic posix tests 2020-09-22 23:15:19 -07:00
Ryan Houdek ddecec12ec Spam out a wackload more syscalls
Almost all of these end up being simple passthrough.
This covers most syscalls, the remaining ones are signal related, exec
related, or rseq required.

All of these syscalls exist prior to Linux 5.0. We are using these with
the expectation still that the host Linux implementation is 5.0 or
higher.
Once we implement newer syscalls we will need to start checking for host
Linux version. We don't really have a care about devices shipping older
4.x kernels atm.
2020-09-16 10:48:56 -07:00
Ryan Houdek c28a684305 Disable some tests that are unstable
These change behaviour erratically between PRs and need to be disabled
for now
2020-09-11 16:07:44 -07:00
Ryan Houdek 4f593f8e88 Updates POSIX unit tests results
These have changed behaviour due to the new changes
2020-09-10 18:16:24 -07:00
Ryan Houdek 5f696336d7 Emergency fix. POSIX tests failing because of ELFLoader rename 2020-09-05 15:48:35 -07:00
Ryan Houdek 50349db4c6 Moves our entire execution model over to signal execution
This requires implementing custom ASM dispatchers for the interpreter
side of things so it works correctly.
Allows all of our CPU backends to safely support signaling.
This is a bit of a nightmare change and requires rethinking logic about
debugging in some instances.
2020-09-02 16:00:17 -07:00
Ryan Houdek 4621366b5e Updates unit tests to handle change in sigpending behaviour 2020-08-20 13:48:52 -07:00
Ryan Houdek be5e5bafe9 Updates Posix test filed that change behaviour
Behaviour now doesn't match between x86-64 and AArch64 so these need to
be disabled explicitly.
Once signaling is fully polished off then they can be reenabled for
x86-64 as well
2020-08-11 00:33:50 +01:00
Ryan Houdek d70f2e6854 Actually run the IRJIT for the JIT posix test 2020-07-19 04:03:38 -07:00
Stefanos Kornilios Mitsis Poiitidis 3a979ccf75 posixtests: Update disabled/passing lists 2020-07-02 15:35:24 +03:00