Skip to content

Support running integration tests on macOS#524

Open
mtjhrc wants to merge 6 commits intocontainers:mainfrom
mtjhrc:tests-macos-support
Open

Support running integration tests on macOS#524
mtjhrc wants to merge 6 commits intocontainers:mainfrom
mtjhrc:tests-macos-support

Conversation

@mtjhrc
Copy link
Collaborator

@mtjhrc mtjhrc commented Feb 2, 2026

This PR makes sure our make test simply just works on macOS.

Note that this currently utilizes the same tests as linux which is the libkrunfw/virtio-fs use-case (not the commonly used EFI+disk variant on macOS), these test can hopefully be added later, still though this is quite useful for testing virtio devices.
This also disables vsock and tsi/vsock tests since these currently fail on macOS (the TSI is understandable, but I'm not sure about the vsock failure) - we can investigate or declare this unsupported later.

TODO:

  • on macOS the default tmp directory path can be so long to cause unix domain socket paths to be too long and fail. fix this (without user having to use TEST_FLAGS="--base-dir=/something)

Since we currently don't have a macOS CI that supports virtualization, these tests still have to be ran locally.

@mtjhrc mtjhrc force-pushed the tests-macos-support branch 6 times, most recently from 3159e54 to edf1b4d Compare February 2, 2026 16:34
@mtjhrc mtjhrc changed the title Run integration tests on macOS Support running integration tests on macOS Feb 2, 2026
@mtjhrc mtjhrc force-pushed the tests-macos-support branch 6 times, most recently from 3bafd76 to abdaf7e Compare February 9, 2026 15:27
@mtjhrc mtjhrc marked this pull request as ready for review February 9, 2026 15:28
@mtjhrc mtjhrc force-pushed the tests-macos-support branch from abdaf7e to 5808778 Compare February 10, 2026 14:20
@mtjhrc mtjhrc marked this pull request as draft February 11, 2026 13:34
@mtjhrc mtjhrc force-pushed the tests-macos-support branch 5 times, most recently from e0795f9 to 126ed51 Compare February 12, 2026 16:28
@mtjhrc
Copy link
Collaborator Author

mtjhrc commented Feb 16, 2026

After the fixes to to the tests in this PR and #543 which fixes an issue in the implementation all tests now pass on macOS correctly.

@mtjhrc mtjhrc marked this pull request as ready for review February 16, 2026 10:26
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Use correct platform-specific library directory (lib vs lib64) and
library path env variable (DYLD_LIBRARY_PATH vs LD_LIBRARY_PATH).

Signed-off-by: Matej Hrica <mhrica@redhat.com>
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Make TcpTester::run_server also leak the file descriptor for the stream socket.
Closing the fd caused the tests to fail on macOS (they randomly worked on Linux
I suppose).

Signed-off-by: Matej Hrica <mhrica@redhat.com>
Explicitly specify a /tmp directory, this fixes an issue on macOS where the
default tmp path that gets used could be very long, causing unix domain socket
tests to fail due to path length.

Signed-off-by: Matej Hrica <mhrica@redhat.com>
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