[Python-bugs-list] [ python-Bugs-724774 ] test_getargs2 failing

SourceForge.net noreply@sourceforge.net
Fri, 25 Apr 2003 02:03:44 -0700


Bugs item #724774, was opened at 2003-04-21 00:14
Message generated for change (Comment added) made by jackjansen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=724774&group_id=5470

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: test_getargs2 failing

Initial Comment:
Adding this just so it doesn't fall by the roadside (it's been discussed 
on python-dev): test_getargs2 is currently failing, at least on MacOSX.

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

>Comment By: Jack Jansen (jackjansen)
Date: 2003-04-25 11:03

Message:
Logged In: YES 
user_id=45365

It works!

Thanks everyone!

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-04-24 21:10

Message:
Logged In: YES 
user_id=33168

I think HPs and Alphas are not big-endian, but Sun's are. 
The Sun was the only one failling.  With the last checkin,
the Sun is now working.  Hopefully, it works on OS X too.

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

Comment By: Thomas Heller (theller)
Date: 2003-04-24 18:20

Message:
Logged In: YES 
user_id=11105

I've commited changes to Modules/_testcapimodule.c and
Lib/test/test_getargs2.py which will hopefully fix the problems.

Since this is only test code, I've checked it in without
asking ;-)

Re Big endian: I've got this impression simply by reading
the code. But I've never programmed on such a machine.

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

Comment By: Jack Jansen (jackjansen)
Date: 2003-04-24 15:12

Message:
Logged In: YES 
user_id=45365

Yes, I will be able to test it. But it will have to be tomorrow.

BTW: does this mean that there are *no* bigendian machines in the 
snakefarm? That surprises me, I seem to remember than almost all machines 
except intels (i.e. suns, hps, sgi's) are big-endian...

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

Comment By: Thomas Heller (theller)
Date: 2003-04-23 21:17

Message:
Logged In: YES 
user_id=11105

Jack, if I try to fix this (by implementing the C functions
needed) would you be able to test this, or should we simply
comment out the failing tests and do this after the release? 

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-23 20:04

Message:
Logged In: YES 
user_id=6380

Yes, that makes sense, and I remember seeing that and
thinking, "hmm, that's not right". You probably need
separate C functions for each C data type to test. :-(

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

Comment By: Thomas Heller (theller)
Date: 2003-04-23 13:49

Message:
Logged In: YES 
user_id=11105

Um, I think I found the reason. test_getargs2 uses
getargs_ul (in _testcapimodule.c) to call
PyArg_ParseTuple(), and this always passes a pointer to an
unsigned long, even for H and B format codes. On little
endian machines casting this pointer into a unsigned short
pointer works ok, but not on big endian machines. Makes sense?

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

Comment By: Thomas Heller (theller)
Date: 2003-04-23 13:29

Message:
Logged In: YES 
user_id=11105

Strange, since 196608 == 0x30000, and 50331648 == 0x3000000.
Even stranger (to me) is that the test for upper case i
works, and it uses nearly the same code.

Does it help the test_H case to change line 485 of getargs.c
from 'long ival;' to 'unsigned short ival;', but I'm only
guessing?

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

Comment By: Jack Jansen (jackjansen)
Date: 2003-04-23 12:39

Message:
Logged In: YES 
user_id=45365

Yes, I still have the problem. The test output is attached.

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-04-22 16:16

Message:
Logged In: YES 
user_id=33168

This is fixed on all the snake-farm machines AFAIK.  Jack,
are you still having the problems?

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-04-21 19:42

Message:
Logged In: YES 
user_id=33168

This is failling on several other architectures in the snake
farm:  http://www.lysator.liu.se/xenofarm/python/latest.html

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

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