-
Notifications
You must be signed in to change notification settings - Fork 152
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
Test failures on Windows WSL and Cygwin #546
Comments
Several unit tests utilize very short duration sleeps (e.g., 100 usec) while waiting for something to happen. The problem with this is that on some platforms the minimum sleep interval might be 1, 10, even 100 msec. Which means the test can take one or two orders of magnitude longer to run on those platforms compared to a platform where sleeps are more granular. So instead of sleeping simply yield execution to another runable thread. This reduces the unit test run time for me from 49 minutes to 20 minutes on OpenBSD in a virtual machine. And from 35 minutes to 16 minutes on Cygwin. Partial fix for #483 Partial fix for #546
I took another look at the test failures on WSL. Three of them are due to the
It's actually surprising this test doesn't fail more often on other platforms. Why? Because you can't calculate a floating point value and reliably compare it for equality to a floating point constant. You have to compute the absolute difference of the two values and test that it is less than some epsilon value. Or, in this case, force the string representation to be rounded to the expected significant digits using |
With the PR I just sent out for review there are zero failures on WSL modulo the usual flakey failures. |
As of today there are no consistent test failures on WSL and 46 consistent failures on Cygwin. Some of those are due to Cygwin quirks or bugs. For example, it gets the NaN sign bit wrong (like OpenBSD, see issue #483). Not much we can do about those failures other than skip the test on Cygwin. |
Closing since we're now passing all tests (most of the time) on WSL. There are still significant failures on CYGWIN. But some of them are known to fail on CYGWIN (e.g., coprocess). Other failures are due to UNIX semantics that CYGWIN doesn't provide and will need workarounds; either in the code under test or the test itself. But that is better handled via an issue for each specific failure opened by someone who cares about CYGWIN. |
This issue is similar to #483 for OpenBSD but is instead for ksh on Windows Subsystem for Linux (WSL, aka "bash on windows") and Cygwin.
I booted Windows 10 today and updated that OS and my Cygwin installation on it. I then installed Meson and Ninja in WSL (aka “bash on windows”) and Cygwin and built and unit tested ksh. On WSL there are 7 test failures. Mostly involving signal handling which isn’t too surprising given the imperfect emulation of UNIX by WSL. There were 71 failures under Cygwin. This is the first time I’ve built/tested ksh on the two Windows platforms we need to support. Obviously there is some work to be done by someone who cares about ksh in those two Windows environments.
Note that the libast API timeouts noted here on OpenBSD also occur under Cygwin but not WSL and thus require running the unit tests with a large timeout multiplier (e.g.,
meson test -t5
) on Cygwin to avoid a lot of false positive test failures.The text was updated successfully, but these errors were encountered: