-
Notifications
You must be signed in to change notification settings - Fork 93
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
Tests fail with python3.8, latest version pulled from master (Linux Mint / Ubuntu) #581
Comments
Thank you - this passes in Ubuntu 18.04. This is what GH actions uses at the moment as Ubuntu-latest, but they will switch to 20.4 soon, so this will come up anyway... has to be some change in the pipe implementation. |
Hm, with Ubuntu 20.04 the error does not occur in CI, didn't test Mint... maybe I misunderstood and you used a version newer than 20.04? |
No, this is 20.04. My Linux Mint at home is based on 20.04 (I checked again, this is sure) and the tests on Launchpad are run to build a focal package, so it must be on a 20.04 virtual machine too. I used
Now, this would be interesting to find out the exact difference that makes the test fail on my machine and on Launchpad, but not in CI. I don't know where is the build log for the 20.04 VM you've used. I've checked a random recent build log and seen that the versions you're using, even on Ubuntu 18.04, look more recent than mine (at home and in the launchpad VM: Here is the link to the launchpad build log that failed (it's about one week ago, so a little bit older than on my machine, but it's the same test failing). |
Thanks! Here is the build log of the GHActions build for comparison. It uses Ubuntu 20.04.1 and Python 3.8.6 (the pytest version doesn't matter, as pytest is not used for the failing test).
Yes, the test is a check for that commit that improves handling of pipes. It partly relies on pipes in the real file system, so a change in the pipe implementation might cause the problem. |
Well, I installed python 3.8.6 via As to the pipe implementation, I don't know the details about this, but could that mean the linux kernel version could be of importance? (If so, my current local version is 5.4.0-60-generic; launchpad's VM one is 4.15.0-128-generic; I couldn't find the one used in the GH's virtual environment). I don't know if the warnings are relevant. Here is the log, in case it's useful:
|
Thank you for the investigation, much appreciated! The warnings are unrelated, but I will have a look into them later (they belong to the pause/resume functionality) - good to know. UPDATE:
This is some Azure tailored kernel, not sure how this compares to the standard kernel versions. This may take a bit, especially if I'm not able to reproduce it. I assume this is not an urgent problem for you (you are not trying to packing pyfakefs with that version or something)? |
No, I do not need the newest features. I will package from a commit that works (c8a0f0c). |
Ok, sorry for all the confusion - nothing to do with the kernel version, but with the test framework! 😶 |
I will probably just skip the test for now if it is run from pytest, as I suspect that this is actually a test problem. |
- does not work under pytest, see #581 - skip temporary until fixed
Did this in master for the time being. I will check how to fix this properly later. |
Ok, this looks like a plain bug in pyfakefs now. Bit embarrasing - could have seen this earlier... The reason why it passes in unittest seems to be that the fake file descriptor is mapped to the same real file descriptor, while pytest opens some file on its own before the test, so the descriptors no longer match. |
- may catch additional problems, see #581
@nicolashainaux - the bug is fixed in master, and I have added |
Ok, after updating to Ubuntu 20.04.1 and installing Python 3.8.6 I still cannot reproduce the warnings, so I'm going to ignore them for now, as they also don't show up in CI. Closing this as fixed - feel free to reopen it if needed. Thanks again for the report! |
Many thanks for investigating this so quickly and efficiently 👍 Moreover, the warnings are gone, too. |
Hello,
Trying to update the (unofficial) Ubuntu 20.04 package on my PPA to a newer version, I got an error in the tests.
I reproduced it at home (Linux Mint), just running
python3.8 -m pytest
:(NB I tried also with the 4.3.3 release (pointing git's HEAD to 3bc6f0c Release 4.3.3) and got the exact same output)
Environment details
The text was updated successfully, but these errors were encountered: