Skip to content
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_create_directory_with_write in test_zipfile fails in AIX #105089

Closed
ayappanec opened this issue May 30, 2023 · 1 comment
Closed

test_create_directory_with_write in test_zipfile fails in AIX #105089

ayappanec opened this issue May 30, 2023 · 1 comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@ayappanec
Copy link
Contributor

ayappanec commented May 30, 2023

test_create_directory_with_write in test_zipfile fails in AIX with the below message

======================================================================
FAIL: test_create_directory_with_write (test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write)

Traceback (most recent call last):
File "/cpython/Lib/test/test_zipfile/test_core.py", line 2879, in test_create_directory_with_write
self.assertEqual(zinfo.external_attr, (mode << 16) | 0x10)
AssertionError: 1106051088 != 5401018384


The reason being AIX stat call st_mode returns 240700 (in octal) for a directory with 700 mode. In linux, it returns 40700. So there is extra “2” which seems to be related to journaled filesystem. So the logic requires that the mode should go a bitwise AND operation with 0xFFFF , like how it is done in test_write_dir in test_core.py to be in sync with zinfo.external_attr

Linked PRs

@ayappanec ayappanec added the type-bug An unexpected behavior, bug, or error label May 30, 2023
ayappanec added a commit to ayappanec/cpython that referenced this issue Sep 7, 2023
@iritkatriel iritkatriel added the tests Tests in the Lib/test dir label Nov 24, 2023
serhiy-storchaka added a commit to ayappanec/cpython that referenced this issue Feb 1, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 1, 2024
… AIX (pythonGH-105228)

(cherry picked from commit 4dbb198)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 1, 2024
… AIX (pythonGH-105228)

(cherry picked from commit 4dbb198)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
serhiy-storchaka pushed a commit that referenced this issue Feb 1, 2024
…n AIX (GH-105228) (GH-114860)

(cherry picked from commit 4dbb198)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
serhiy-storchaka pushed a commit that referenced this issue Feb 1, 2024
…n AIX (GH-105228) (GH-114861)

(cherry picked from commit 4dbb198)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
@hugovk
Copy link
Member

hugovk commented Mar 15, 2024

Closing because the PRs have been merged and backported. Thanks!

@hugovk hugovk closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants