[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2021-06-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The 2014 patch to our copies of libffi eefd521f19ce included patches from 2009 
forward, including at least one about long double alignment on sparc.  If there 
are any problems now on current Solaris, they are likely to be different, and 
someone will find and report them.

--
nosy: +jcea
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2021-06-18 Thread Irit Katriel


Irit Katriel  added the comment:

The patch doesn't look anything like the current code. Is this issue still 
relevant?

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2019-04-27 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2014-08-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Mark, the rev #s are not being translated correctly. Better to use the 10 digit 
hex #.  Can you find the commit again?

We have a SPARC Solaris 10 buildbot
http://buildbot.python.org/all/waterfall?category=3.x.stablecategory=3.x.unstable
The ctypes test is passing on 'Open CSW' (I don't know what that means) 2.7 and 
3.5. The test suite has not been run recently on GCC recently.

Peter or Clifford, can either of you report current status?

--
assignee: theller - 
nosy: +terry.reedy
versions:  -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2014-08-30 Thread Mark Lawrence

Mark Lawrence added the comment:

Terry r59626 in the file's revision history refers to eefd521f19ce which I 
assume is what you're after.  FWIW I get that on Windows 8.1 by right clicking 
on the file, select TortoiseHg, then Revision History.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2014-08-30 Thread Peter Bray

Peter Bray added the comment:

Terry,

I no longer have easy access to SPARC64 systems (they are in boxes), so 
unfortunately I will not be able to contribute to this issue in the near 
future.

Peter

--
components:  -Tests

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2014-06-26 Thread Mark Lawrence

Mark Lawrence added the comment:

I believe this can be closed as a very similar change was done in r59626.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2010-08-04 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 2.7 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2010-07-02 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Closed issue 9143 as a duplicate of this one.

--
nosy: +jengelh, mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-07-22 Thread Peter Bray

Peter Bray pdb...@yahoo.com.au added the comment:

Sorry for the internet lifetime I've been away.

I have tested the patch provided against the released 3.1 distribution
and all tests pass without coredumping or failing on Solaris 10 Update 6
with gcc 4.1.2. The 3.1 distribution with the patch was built and tested
on both 32-bit and 64-bit SPARC and X86.

The patch was rejected by GNU patch, but applying by hand (copy/paste)
worked fine against 3.1.

Like the patch's author I can't say if this right approach to take, that
is for others to say but it does not break any of my builds.

Regards,
Peter

And sorry for the delay.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-05-21 Thread Clifford W Johnson

Clifford W Johnson cliff...@ieee.org added the comment:

Turns out the problem is really in the Sparc version of libffi -- the 
ffi_closure_sparc_inner_v9 function in 
Modules/_ctypes/libffi/src/sparc/ffi.c wasn't properly accounting for 
the 16-byte alignment of a long double in an argument stack -- it 
presumed 8-byte alignment throwing off any long double value after a 
shorter value.  (16-byte alignment is specified in the SPARC Compliance 
Definition.)

I've attached a patch which I'm sure could be improved (there's 
probably a more proper way to do things in libffi) but it passes the 
check tests for ctypes and a few other tests I threw in.


By the way, I noticed that one of the test cases in the script I added 
in my last comment has an error in its success/failure test ... 
the (typ, c_byte) test should check for the result of -3 instead of 
3.14.

--
keywords: +patch
Added file: http://bugs.python.org/file14037/sparc_longdouble.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-05-20 Thread Clifford W Johnson

Clifford W Johnson cliff...@ieee.org added the comment:

The following script (based on an extract of test_callbacks.py)
demonstrates the problem.  When run on a Sparc-based Solaris 10
platform, the output shows correct operation only when the c_longdouble
arguments appear first in the function call -- the use of other types
would seem to throw off argument alignment.

Could this be an issue with libffi?

#!/bin/env python

import sys
from ctypes import *


class Callback:
functype = CFUNCTYPE

def callback(self, *args):
self.got_args = args
return args[-1]

def check_type(self, typ, arg):
print typ=%s % (typ,)

print Trying (typ) ...
PROTO = self.functype.im_func(typ, typ)
result = PROTO(self.callback)(arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print Trying (c_byte, typ) ...
PROTO = self.functype.im_func(typ, c_byte, typ)
result = PROTO(self.callback)(-3, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print Trying (typ, c_byte) ...
PROTO = self.functype.im_func(typ, typ, c_byte)
result = PROTO(self.callback)(arg, -3)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print Trying (c_byte, typ, typ) ...
PROTO = self.functype.im_func(typ, c_byte, typ, typ)
result = PROTO(self.callback)(-3, arg, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print Trying (typ, typ) ...
PROTO = self.functype.im_func(typ, typ, typ)
result = PROTO(self.callback)(arg, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print Trying (c_double, typ) ...
PROTO = self.functype.im_func(typ, c_double, typ)
result = PROTO(self.callback)(arg, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print trying (c_int, typ) ...
PROTO = self.functype.im_func(typ, c_int, typ)
result = PROTO(self.callback)(-3, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print trying (c_long, typ) ...
PROTO = self.functype.im_func(typ, c_long, typ)
result = PROTO(self.callback)(-3, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

print trying (c_longlong, typ) ...
PROTO = self.functype.im_func(typ, c_longlong, typ)
result = PROTO(self.callback)(-3, arg)
print %s result=%s; got_args=%r % (*FAILED* if result !=
3.14 else WORKED, result, self.got_args)

callback = Callback()
callback.check_type(c_longdouble, 3.14)
# callback.check_type(c_longdouble, -3.14)


 ./python ~/tryLongDouble.py
typ=class 'ctypes.c_longdouble'
Trying (typ) ...
WORKED result=3.14; got_args=(3.1401,)
Trying (c_byte, typ) ...
*FAILED* result=0.0; got_args=(-3, 0.0)
Trying (typ, c_byte) ...
*FAILED* result=-3.0; got_args=(3.1401, -3)
Trying (c_byte, typ, typ) ...
*FAILED* result=-inf; got_args=(-3, nan, -inf)
Trying (typ, typ) ...
WORKED result=3.14; got_args=(3.1401, 3.1401)
Trying (c_double, typ) ...
*FAILED* result=0.0; got_args=(3.1401, 0.0)
trying (c_int, typ) ...
*FAILED* result=0.0; got_args=(-3, 0.0)
trying (c_long, typ) ...
*FAILED* result=0.0; got_args=(-3, 0.0)
trying (c_longlong, typ) ...
*FAILED* result=0.0; got_args=(-3, 0.0)

--
versions: +Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-05-15 Thread Peter Bray

New submission from Peter Bray pdb...@yahoo.com.au:

Greetings,

  I have downloaded and compiled Python 3.1b1 on Solaris 10 Update 6
with GCC 4.1.2 on {SPARC,x86} x {32-bit,64-bit} and encountered only one
test harness failure, which was on SPARC 64-bit.

  Included below are the initial details, is there something more I can
do to assist, if so, please be specific.

Regards,
Peter


./python Lib/test/regrtest.py -v test_ctypes

==
FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks)
--
Traceback (most recent call last):
  File /tmp/64-bit/Python-3.1b1/Lib/ctypes/test/test_callbacks.py,
line 81, in test_longdouble
self.check_type(c_longdouble, 3.14)
  File /tmp/64-bit/Python-3.1b1/Lib/ctypes/test/test_callbacks.py,
line 30, in check_type
self.failUnlessEqual(self.got_args, (-3, arg))
AssertionError: First differing element 1:
0.0
3.14
- (-3, 0.0)
+ (-3, 3.14)

--
Ran 328 tests in 3.853s

FAILED (failures=1)
test test_ctypes failed -- Traceback (most recent call last):
  File /tmp/64-bit/Python-3.1b1/Lib/ctypes/test/test_callbacks.py,
line 81, in test_longdouble
self.check_type(c_longdouble, 3.14)
  File /tmp/64-bit/Python-3.1b1/Lib/ctypes/test/test_callbacks.py,
line 30, in check_type
self.failUnlessEqual(self.got_args, (-3, arg))
AssertionError: First differing element 1:
0.0
3.14
- (-3, 0.0)
+ (-3, 3.14)

1 test failed:
test_ctypes

The test code (from Python-3.1b1/Lib/ctypes/test/test_callbacks.py)

79  
80  def test_longdouble(self):
81  self.check_type(c_longdouble, 3.14)
82  self.check_type(c_longdouble, -3.14)
83  

and ealier in the same file

11  
12  def callback(self, *args):
13  self.got_args = args
14  return args[-1]
15  
16  def check_type(self, typ, arg):
17  PROTO = self.functype.__func__(typ, typ)
18  result = PROTO(self.callback)(arg)
19  if typ == c_float:
20  self.failUnlessAlmostEqual(result, arg, places=5)
21  else:
22  self.failUnlessEqual(self.got_args, (arg,))
23  self.failUnlessEqual(result, arg)
24  
25  PROTO = self.functype.__func__(typ, c_byte, typ)
26  result = PROTO(self.callback)(-3, arg)
27  if typ == c_float:
28  self.failUnlessAlmostEqual(result, arg, places=5)
29  else:
30  self.failUnlessEqual(self.got_args, (-3, arg))
31  self.failUnlessEqual(result, arg)
32  
 


[softw...@specula] 64-bit SPARC % gcc -v
Using built-in specs.
Target: sparc64-sun-solaris2.10
Configured with: ../configure --prefix=/pkgs/64-bit/release/gcc-4.1.2
--with-local-prefix=/pkgs/64-bit --disable-nls --disable-multilib
--enable-shared --with-as=/usr/ccs/bin/as --without-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --with-gmp=/pkgs/64-bit
--with-mpfr=/pkgs/64-bit --enable-languages=c,c++,objc,obj-c++,fortran
sparc64-sun-solaris2.10
Thread model: posix
gcc version 4.1.2

[softw...@specula] 64-bit SPARC % cat /etc/release 
  Solaris 10 10/08 s10s_u6wos_07b SPARC
   Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008

Build Procedure
---

Python 3.1b1

## Note PKGS_PREFIX=/pkgs/64-bit and PKGS_RELEASE=/pkgs/64-bit/release

gtar fxv path/Python-3.1b1.tar.bz2
cd Python-3.1b1

# The CPPFLAGS  LDFLAGS are used by setup.py in external modules builds
CPPFLAGS=-I${PKGS_PREFIX}/include LDFLAGS=-L${PKGS_PREFIX}/lib
./configure --prefix=${PKGS_RELEASE}/Python-3.1b1
--datarootdir=${PKGS_RELEASE}/Python-3.1b1 --with-universal-archs=64-bit 

echo crypt cryptmodule.c  Modules/Setup.local  ## Solaris does not
need -lcrypt

gmake
gmake test

--
assignee: theller
components: Tests, ctypes
messages: 87798
nosy: illumino, theller
severity: normal
status: open
title: FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) 
[SPARC/64-bit]
type: behavior
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-05-15 Thread Clifford W Johnson

Changes by Clifford W Johnson cliff...@ieee.org:


--
nosy: +JohnsonCW

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit]

2009-05-15 Thread Clifford W Johnson

Clifford W Johnson cliff...@ieee.org added the comment:

I get a nearly identical failure building Python 2.6.2 on a SPARC64
machine running Solaris 5.10 using GCC 4.1.1.

# ./python ./Lib/test/test_ctypes.py
...
test_longdouble (ctypes.test.test_callbacks.Callbacks) ... FAIL
...

==
FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks)
--
Traceback (most recent call last):
  File
/home/build/clifford/gpdb/tools/python/2.6.2/objs/sol10_sparc_64/Lib/ctypes/test/test_callbacks.py,
line 81, in test_longdouble
self.check_type(c_longdouble, 3.14)
  File
/home/build/clifford/gpdb/tools/python/2.6.2/objs/sol10_sparc_64/Lib/ctypes/test/test_callbacks.py,
line 30, in check_type
self.failUnlessEqual(self.got_args, (-3, arg))
AssertionError: (-3, 0.0) != (-3, 3.1401)

--
Ran 319 tests in 1.951s

FAILED (failures=1)
Traceback (most recent call last):
  File ./Lib/test/test_ctypes.py, line 12, in module
test_main()
  File ./Lib/test/test_ctypes.py, line 9, in test_main
run_unittest(unittest.TestSuite(suites))
  File
/home/build/clifford/gpdb/tools/python/2.6.2/objs/sol10_sparc_64/Lib/test/test_support.py,
line 722, in run_unittest
_run_suite(suite)
  File
/home/build/clifford/gpdb/tools/python/2.6.2/objs/sol10_sparc_64/Lib/test/test_support.py,
line 705, in _run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File
/home/build/clifford/gpdb/tools/python/2.6.2/objs/sol10_sparc_64/Lib/ctypes/test/test_callbacks.py,
line 81, in test_longdouble
self.check_type(c_longdouble, 3.14)
  File
/home/build/clifford/gpdb/tools/python/2.6.2/objs/sol10_sparc_64/Lib/ctypes/test/test_callbacks.py,
line 30, in check_type
self.failUnlessEqual(self.got_args, (-3, arg))
AssertionError: (-3, 0.0) != (-3, 3.1401)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com