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_mmap failing on AIX #37880
Comments
test_mmap is failing on a flush while trying to do: The problem is that the mmap is opened with I'm not sure what the correct fix should be. |
Logged In: YES I think the test is somewhat bogus: It tries to check that So I see two options: Declare that .flush() always raises an Assigning to Tim, as he incorporated that feature into mmap. |
Logged In: YES Sorry, I've had nothing to do with mmap beyond fixing bugs. Martin, I don't understand why you think it's reasonable for So that's a third alternative: alter the implementation to make |
Logged In: YES The documentation for flush says "Flushes changes made to the in-memory copy of a file back But it doesn't do that, and we all agree it shouldn't do This is like trying to write to a file that was opened for |
Logged In: YES Hmm. I suspect the flush docs() are too strong (does flush Your point is well taken, though, and whatever flush() does |
Logged In: YES I am getting the same error on AIX 5.2 with Python 2.3.3 |
Logged In: YES run the test with the -v flag: ./python I think only everything should be fine up to copy-on-write [neal@epoch c3]$ ./python ./Lib/test/regrtest.py -v test_mmap Modifying file's content... |
Logged In: YES I'm running into this problem under both AIX 4.3.3 and 5.1. |
Logged In: YES Mark, the 3 bugs you commented on (this one, 713169, and |
Is this concern still valid? |
Closed as no response to msg81716. |
I would like to reopen this issue as it is still occurring in py3k on AIX 5.3 and 6.1: Re-running test test_mmap in verbose mode ====================================================================== Traceback (most recent call last):
File "/san_u02/home/recette/buildbot/buildbot-aix5/py3k-aix5-xlc/build/Lib/test/test_mmap.py", line 219, in test_access_parameter
m.flush()
mmap.error: [Errno 22] Invalid argument Ran 19 tests in 0.216s FAILED (errors=1) Should flush be modified to do nothing in this case or should the unit test be updated? |
Tim is suggesting that flush should indeed become a noop. Since nobody |
Interestingly, the matter was discussed on another issue, bpo-2643. I also agree that ideally flush() should become a no-op (only in 3.2, since it would break compatibility). But then we should also expose a separate sync() method with the current behaviour. |
I think you misunderstand. I'm not proposing that flush should become |
Would that patch be OK? It solves the test_mmap on AIX. |
Looks fine to me. |
After Antoine commit concerning bpo-2643, here is a new patch (just removing the changes in close). Could you commit it? |
Committed to py3k in r85678. If I'm reading this string correctly, I believe this can (and should be) be backported. Am I correct? |
I also believe this patch should be backported. If the bpo-2643 is not backported, then the patch to apply should be "patch_flush_mmap.diff" instead of "patch_mmap_flush_updated.diff" |
Committed the patch_flush_mmap patch to 3.1 in r87163 and 2.7 in r87164. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: