diff -r 9efefcab817e Lib/test/test_posix.py --- a/Lib/test/test_posix.py Fri Sep 12 10:39:48 2014 -0400 +++ b/Lib/test/test_posix.py Fri Sep 12 11:09:45 2014 -0700 @@ -231,7 +231,9 @@ except OSError as inst: # issue10812, ZFS doesn't appear to support posix_fallocate, # so skip Solaris-based since they are likely to have ZFS. - if inst.errno != errno.EINVAL or not sys.platform.startswith("sunos"): + # issue10812, AIX does not support fadvise when _LARGE_FILES + # is defined because off_t is passed as the wrong size. + if inst.errno != errno.EINVAL or (not sys.platform.startswith("sunos") and not sys.platform.startswith("aix")): raise finally: os.close(fd) @@ -242,6 +244,11 @@ fd = os.open(support.TESTFN, os.O_RDONLY) try: posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_WILLNEED) + except OSError as inst: + # issue10812, AIX does not support fadvise when _LARGE_FILES + # is defined because off_t is passed as the wrong size. + if inst.errno != errno.EINVAL or not sys.platform.startswith("aix"): + raise finally: os.close(fd)