CI: Rebase NumPy compiled extension test modules on Cygwin#23073
CI: Rebase NumPy compiled extension test modules on Cygwin#23073mattip merged 18 commits intonumpy:mainfrom
Conversation
This seems to be causing fork failures on Cygwin. Let's see if this reduces the number of failures.
|
Four hours to see if all extension modules can find their dependencies. That step really shouldn't take longer than the test that loads all the modules, and definitely not more than twice as long. |
--ignore led to more failures, which is not ideal.
|
Six hundred errors on the last two attempts, which is less than ideal given that the original problem was eight. (EDIT: 8-41 in the last few PRs) |
Let's see if this shows why everything's got a fork() failure now.
It should be plenty of time; each of these commands should complete in maybe five seconds per file on a slow day.
Let's see if this fixes the 8-50 fork failures.
|
On the cygwin help it still mentions to check for bad "bloda" software running (mostly anti-virus stuff), no idea if that can help... But besides that, I am wondering if we have to opt for some hot-fix to get CI green again soon. |
It can, but I don't see anything obvious:
pytestmark = pytest.mark.xfail(sys.platform == "cygwin", message="Random fork() failures", error=BlockingIOError)at module level in a couple of places should work to get CI green, but I haven't tested that. |
Forgot to check this earlier.
Hopefully this will keep the main memory space clear enough to allow all tests to succeed.
This should help debugging a bit.
|
The equivalent of |
Tests hang, which is less than ideal. Hopefully this one works well.
|
The tests for every submodule but |
I found the image description:
#23114 now up: it takes a few more places than I thought it would if running all the tests together. |
Also adjust CI so they don't immediately collide with NumPy. I forgot to do that last time, which caused problems.
|
Or write the locations of the NumPy extension modules to the rebase database so the F2Py tests don't put their modules right on top of those, guaranteeing |
mattip
left a comment
There was a problem hiding this comment.
LGTM, unbreaks the cygwin build. I am a little concerned about listing the non-f2py directories to test, but maybe this is good enough for now?
.github/workflows/cygwin.yml
Outdated
| # Not sure if that will run the top-level tests. | ||
| shell: "C:\\tools\\cygwin\\bin\\bash.exe -o igncr -eo pipefail {0}" | ||
| run: | | ||
| for submodule in array_api compat core distutils fft lib linalg ma matrixlib polynomial random tests typing; |
There was a problem hiding this comment.
I am not sure what is the best path forward here:
- a list of directories to use, which will break the next time we add/remove a top-level directory
- some ugly path parsing like
find numpy -maxdepth 1 -type d | cut -f2 -d/ | grep -v f2py | grep -v numpy | grep -v "^_"to get all the directories exceptf2py - add a command line switch to
runtests.pyto allow skipping a subdirectory - move the build to meson, and add a command line option to dev.py to skip a subdirectory
What you have is the simplest, but will be fragile. On the other hand, how often do we change the top-level directories?
Maybe is there a way to verify that your list is complete with a helper script?
There was a problem hiding this comment.
I think this might work runtests.py ... -- --deselect f2py
There was a problem hiding this comment.
for name in numpy/*;
do
if [ -d "${name}" -a "${name}" != numpy/f2py -a "${name:6:1}" != "_" ] ;
then
echo ${name##numpy/};
fi;
doneor
find numpy/* -maxdepth 0 -type d -a ! -name f2py -a ! -name _\* | cut -f2 -d/would also work. I think a helper script to check the list is complete would need the same path parsing.
I don't think this separation is needed anymore, so I'll go back to the simple invocation and see if that works.
There was a problem hiding this comment.
All submodule tests run at the same time again; PR title changed to match.
Ideally this works nicely and I can change the PR name. If not, I put the split back, then the parallelization if that still doesn't work.
This assumes NumPy is rebased before tests run, but does not assume the locations are in the database.
seberg
left a comment
There was a problem hiding this comment.
This looks OK to me, not super pretty, but also reasonably little additional code in the test.
Thanks for so valiantly tracking this down!
|
Thanks @DWesl |
This seems to be causing fork failures on Cygwin. Let's see if this reduces the number of failures.
Fixes #23070?