56 Commits

Author SHA1 Message Date
Tony Wasserka
f4dd456c80 unittests: Instruct CTest to print output from tests on failure 2023-09-26 17:16:28 +02:00
Alyssa Rosenzweig
8247ded2cf unittests: Remove stale comments
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
dff9868e9a unittests/gvisor: Adds all socket tests to flakes
All of these flake so slam them all in the flake file.
2023-07-21 14:50:58 -07:00
Ryan Houdek
e8aaadb2d0 gvisor: Disable timerfd test
Somewhere between kernel 5.15 and 6.0 this syscall's behaviour has
changed.
The unit test expects -ESPIPE result but new kernels will return 0
(noop_llseek in the source).

The new solidrun board is our first CI machine to be running kernel 6.1
so this needs to be merged before that CI machine can be enabled.
2023-04-15 15:23:58 -07:00
Ryan Houdek
0bf79dc5d6 unittests/gvisor: Adds a bunch of tests to flakes
These are getting annoying.
2022-10-31 12:53:04 -07:00
Ryan Houdek
c4285f0d30 unittests: Disable gvisor pselect test
This has a badly coded test that can hang forever. Our timeout kills it
at 5 minutes, which causes it to not even fall down the flake path.

Just disable it outright because of the bad test.
2022-09-15 16:29:02 -07: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
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
81dfc21700 unittests/gvisor-test: Disable semaphore test for now
New rootfs images cause different data to be returned in permissions
than this test was expecting. Disable this while we are upgrading CI.
2022-06-09 20:08:24 -07:00
Ryan Houdek
6a5b9e2a93 unittests: Investigate failing CI changes
One gvisor test didn't expect a file header to change layout.
Another one was testing behaviour that was removed from upstream Linux

Fixes #1741
2022-06-03 23:03:59 -07:00
Ryan Houdek
75090f8f6c GVisor: Disable failing unit tests 2022-06-02 04:40:13 -07: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
df486c0786 gvisor: Disables flaky test 2021-12-09 12:37:58 -08:00
Ryan Houdek
829db6c30d gvisor: Updates getdents test behaviour
This now passes on x86-64 host but still fails on AArch64 because we
don't emulate the getdents syscall
2021-09-11 05:51:10 -07:00
Ryan Houdek
4003ede7ee unittests: gvisor: Remove stale tmp files
Sometimes a test leaves a tmp file in the root of the rootfs.
This should be fixed but to ensure it stops happening, make sure to
delete it
2021-08-30 18:00:10 -07:00
Ryan Houdek
f45de45568 unittests: Updates gvisor lists on changed behaviour 2021-08-30 17:43:12 -07:00
Ryan Houdek
e90892a20b unittests: Disable gvisor test that doesn't pass when namespaces are disabled
It's expecting EPERM (Which is what we used to return) but it is also
valid for the kernel to return EINVAL when not compiled with namespaces enabled
2021-08-10 19:13:32 -07:00
Ryan Houdek
a46773a9ff unittests: Disables gvisor test that uses unsupported clone flags
It uses CLONE_VM which breaks our cloning
2021-08-10 18:39:40 -07:00
Ryan Houdek
25866a00ed Disable rtsignal gvisor test
This test is getting frustrating and is becoming MORE flakey as threads become faster
2021-07-09 01:57:48 -07:00
Ryan Houdek
b923a82c39 unittests: fallocate gvisor test no longer fails 2021-07-01 07:11:00 -07:00
Ryan Houdek
aca8903b56 GVisor: Update gvisor tests that have now changed behaviour 2021-06-24 21:08:59 -07:00
Ryan Houdek
f522303837 gvisor: arch_prctl now passes 2021-05-12 22:17:13 -07:00
Ryan Houdek
b45503f93c gvisor: chown and sync tests now pass 2021-05-12 21:54:08 -07:00
Stefanos Kornilios Mitsis Poiitidis
52f7ea5433
Merge pull request #1029 from Sonicadvance1/fix_fadvise64
Fix fadvise64
2021-05-12 09:45:21 +03:00
Stefanos Kornilios Mitsis Poiitidis
36980131e0
Merge pull request #1024 from Sonicadvance1/signal_fixes
Sigaction fixes
2021-05-12 09:34:51 +03:00
Ryan Houdek
f8cf98d378 gvisor: fadvise64 test now passes 2021-05-11 18:55:48 -07:00
Ryan Houdek
796c5ccbc9 gvisor: sigaction_test now passes 2021-05-11 18:54:08 -07:00
Ryan Houdek
b157a5a0fb gvisor: bad_test now passes 2021-05-11 18:53:22 -07:00
Ryan Houdek
d2b19c0b1c Disable gvisor sigtimedwait test 2021-05-01 10:19:13 -07:00
Ryan Houdek
5820c251e8 Fixes OpenAt breaking with anonymous objects
Fixes #753
2021-04-16 21:21:08 -07:00
Ryan Houdek
8ad45071e4
Merge pull request #945 from Sonicadvance1/fix_truncate_creat
Fixes truncate and creat
2021-04-03 06:47:31 -07:00
Ryan Houdek
5d63dc179c Fixes truncate and creat
These were using the passthrough helper which doesn't was breaking the result value
2021-04-02 20:45:33 -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
e637751112 ptrace behaviour is now changed 2021-03-31 23:38:14 -07:00
Ryan Houdek
ad877d4088 Disables gvisor test proc_pid_oomscore_test
Depending on runner this passes or fails.
The test expects to be able to open `/proc/self/oom_score_adj` as writable to adjust the oom score.
This is expected to fail on all three of our runners, but sometimes the solidrun board manages to open it.
Disable as it is a flake. Could be a kernel bug on the solid run board
2021-03-30 15:29:52 -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
6ea977ba34 Remove proc_pid_uid_gid_map from known failures list
Now instead of crashing with namespacing, it skips the tests if it gets EPERM.
2021-03-23 19:28:12 -07:00
Stefanos Kornilios Mitsis Poiitidis
3eed439728 gvisor: chmod passes now 2021-02-02 14:58:51 +02:00
Scott Mansell
ba3bacb65b Disable more flaky gvisor tests
They assume fair scheduling
2021-02-01 18:43:35 +13:00
Ryan Houdek
a5d9e62cc6 More improvements to BRK handling
Base size is now only one page in size. We will then increment that BRK
size by 8MB alignments. 256MB for 32bit applications was causing some
applications on the edge to run out of virtual memory
I was hitting some 32bit applications that were being fairly mean with
BRK. They were allocating all of BRK space then running out of virtual
memory space with its mmap handler fallback after freeing BRK space.

This means we now munmap BRK pages on release for the guest, similar to
behaviour that Linux does.

Additionally I had an application that was getting very upset that BRK
wasn't actually at the end of program space. So allocate at the end of
program space like expected.

brk test now passes from gvisor
2021-01-27 10:12:25 -08:00
Ryan Houdek
3679156dd7 Fixes timer syscall API
The glibc and kernel timer interfaces are sufficiently different enough
that unwrapping this through glibc is impossible.
Pass it directly through to the kernel.
2021-01-26 05:02:44 -08:00
Ryan Houdek
8cbfef2e74 Updates gvisor test results that have changed due to OS update 2021-01-26 01:11:40 -08:00
Ryan Houdek
633ea045e5 Handles unaligned cmpxchg/cmpxchg8b in SIGBUS handler
cmpxchg/cmpxchg8b doesn't have alignment requirements on x86, which means
applications rely on unaligned behaviour support with it.

Steam relies on this to work for a linked list array of jobs in some
internal job queueing system. It will end up always aligning by offsets
of 4 since it stores a couple of pointers.

Doesn't currently support the case of unaligned cmpxchg8b crossing a
cacheline, which ends up being semi-broken depending on which x86
behaviour the application is expected.
Intel CPUs do the "Big ring lock" or "split locks". Which means accesses
across cachelines are atomic.
AMD CPUs will tear the value across the cacheline, which is expected x86
behaviour by spec.

If they are expecting Intel behaviour, then that application is just
broken on non-Intel platforms unless they are fine with a tear.
2021-01-20 16:07:50 -08:00
Ryan Houdek
9869a7c576 Disables problematic gvisor test
This also manages to fail on master but for some reason not on the ARM
runners.
2021-01-12 15:04:43 -08:00
Stefanos Kornilios Mitsis Poiitidis
a29969139e Tests/gvisor: Disable mlock_test 2021-01-10 18:12:56 +02:00
Stefanos Kornilios Mitsis Poiitidis
311aa2b811 Tests: Cleanup scripts, review feedback 2021-01-10 18:06:02 +02:00
Stefanos Kornilios Mitsis Poiitidis
7808948fae Tests/gvisor: Disable some for the arm64-8.2 runner 2021-01-10 03:11:53 +02:00
Stefanos Kornilios Mitsis Poiitidis
e4870b6090 Tests/gvisor: Disable some more 2021-01-09 20:03:34 +02:00
Stefanos Kornilios Mitsis Poiitidis
3ab55898d8 Tests/gvisor: Disable some more 2021-01-09 19:57:26 +02:00