Skip to content

test_create_directory_with_write in test_zipfile fails in AIX #105089

Description

@ayappanec

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions