-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
tests: fix execution on WSL2, Ubuntu 24.04 #8235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Skip incompatible parts of tests to ensure that cargo nextest run --features unix executes successfully in WSL2, Ubuntu 24.04 distribution. Changes * Skip tests that required sys/kernel/profiling which is not available in WSL2 default configuration. * Use timezones in tests that are part of the standard tzdata list and not only available in backwards list. Backwards list is not installed by default in Ubuntu 24.04 (package tzdata-legacy). * check that /proc/modules is not empty when expecting content, because it is empty in WSL2 default configuration. * Skip logname test not only in WSL1, also in WSL2.
GNU testsuite comparison:
|
Would it be possible to add a job in github to verify that we don't regress? |
Never tried to run WSL2 in github actions, but I will try. I see that there exists action https://github.com/vedantmgoyal9/setup-wsl2 to setup WSL2 on windows runners. If yes, I would create a new workflow file, a bit similar to freebsd or android and execute the tests based on the setup-wsl2 action. |
will also check https://github.com/marketplace/actions/setup-wsl. This supports setting user instead of root, which should make this even more compatible with local exection. |
yeah, no worries for the action |
This will setup WSL2 on windows-latest runner, install Ubuntu-24.04, and run the feat_os_unix tests.
@sylvestre : I added a new workflow for WSL2. Here is a test execution: https://github.com/martinkunkel2/coreutils/actions/runs/15799503167/job/44535926995 |
GNU testsuite comparison:
|
I tried to run
in WSL2, which results in a few failing tests
This pull request skips incompatible parts of tests to ensure that they execute successfully in WSL2, Ubuntu 24.04 distribution.
Changes
Test environment: