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

SourceForge.net noreply@sourceforge.net
Wed, 23 Apr 2003 11:04:30 -0700


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

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
>Assigned to: Thomas Heller (theller)
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: Guido van Rossum (gvanrossum)
Date: 2003-04-23 14: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 07: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 07: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 06: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 10: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 13: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