[Python-bugs-list] [ python-Bugs-420476 ] Python 2.1 'make test' failures: AIX 4.2

noreply@sourceforge.net noreply@sourceforge.net
Thu, 16 Aug 2001 14:25:05 -0700


Bugs item #420476, was opened at 2001-05-01 09:02
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=420476&group_id=5470

>Category: Python Library
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Tim Peters (tim_one)
Summary: Python 2.1 'make test' failures: AIX 4.2

Initial Comment:
Successfully built and installed Python 2.1 on AIX 
4.2.  However, 3 regression tests failed.  The output 
from 'make test' (edited for brevity) is shown below:

make test
...successful tests deleted...
test___all__
test test___all__ failed -- tty has no __all__ 
attribute
...successful tests deleted...
test_coercion
The actual stdout doesn't match the expected stdout.
This much did match (between asterisk lines):
*******************************************************
***************
test_coercion
2 + 2 = 4
2 += 2 => 4
2 - 2 = 0
2 -= 2 => 0
2 * 2 = 4
2 *= 2 => 4
2 / 2 = 1
2 /= 2 => 1
2 ** 2 = 4
2 **= 2 => 4
2 % 2 = 0
2 %= 2 => 0
2 + 4.0 = 6.0
2 += 4.0 => 6.0
2 - 4.0 = -2.0
2 -= 4.0 => -2.0
2 * 4.0 = 8.0
2 *= 4.0 => 8.0
2 / 4.0 = 0.5
2 /= 4.0 => 0.5
2 ** 4.0 = 16.0
2 **= 4.0 => 16.0
2 % 4.0 = 2.0
2 %= 4.0 => 2.0
2 + 2 = 4
2 += 2 => 4
2 - 2 = 0
2 -= 2 => 0
2 * 2 = 4
2 *= 2 => 4
2 / 2 = 1
2 /= 2 => 1
2 ** 2 = 4
2 **= 2 => 4
2 % 2 = 0
2 %= 2 => 0
2 + (2+0j) = (4+0j)
2 += (2+0j) => (4+0j)
2 - (2+0j) = 0j
2 -= (2+0j) => 0j
2 * (2+0j) = (4+0j)
2 *= (2+0j) => (4+0j)
2 / (2+0j) =
*******************************************************
***************
Then ...
We expected (repr): '(1+0j)'
But instead we got: '(1-0j)'
test test_coercion failed -- Writing: '(1-0j)', 
expected: '(1+0j)'
...successful tests deleted...
test_pty
test test_pty failed -- Tail of expected stdout 
unseen: 'y pet fish, Eric.\n'
...successful tests deleted...
test_zlib
test test_zlib skipped --  No module named zlib
112 tests OK.
3 tests failed: test___all__ test_coercion test_pty
22 tests skipped: test_al test_bsddb test_cd test_cl 
test_dl test_gdbm test_gl test_gzip test_imgfile 
test_largefile test_linuxaudio
dev test_minidom test_nis test_openpty test_pyexpat 
test_sax test_sunaudiodev test_sundry test_winreg 
test_winsound test_zipfile test_zlib
make: 1254-004 The error code from the last command is 
1.


----------------------------------------------------------------------

>Comment By: Barry Warsaw (bwarsaw)
Date: 2001-08-16 14:25

Message:
Logged In: YES 
user_id=12800

Sorry, I've no clue about test_pty so I'm reassigning back
to Tim for all that math gibberish.

----------------------------------------------------------------------

Comment By: The Written Word (china) (tww-china)
Date: 2001-06-14 04:18

Message:
Logged In: YES 
user_id=119770

If you have the IBM C compiler, the magic flag is
-qfloat=nomaf. This should probably be documented in
Misc/AIX-NOTES.

According to the C for AIX manual:
  The nomaf option is provided for cases where it is
necessary to exactly duplicate the double results of an
implmeentation that does not have multiply-add operations.
The nomaf option prevents the compiler from generating any
multiply-add operations. Not using multiply-add operations
decreases accuracy and performance but strictly conforms to
the IEEE standard for double-precision arithmetic.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-05-11 11:27

Message:
Logged In: YES 
user_id=31435

test___all__ failures are always spurious (due to 
incomplete module objects left behind in sys.modules for 
other reasons -- in this case presumably related to the 
test_pty failure).

The test_coerce failure is a +0 versus -0 IEEE-754 thing.  
Platforms that produce -0 here are not computing the 
correct sign bit for (+0)-(+0) (according to the 754 
rules).  First make sure you're using whatever gibberish 
your platform C requires to produce 754-conforming code.  
If it still fails, and the HW supports any sort of fused 
multiply+add or multiply+subtract instructions, tell the 
compiler not to use them.  If it still fails, we're in for 
long and tedious platform-specific debugging work.

Assigned to Barry in case he has a clue about test_pty (I 
don't).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=420476&group_id=5470