This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING][PATCH v9] Add pretty printers for the NPTL lock types
On 07/11/2016 02:18 PM, Siddhesh Poyarekar wrote:
On Mon, Jul 11, 2016 at 02:00:07PM +0200, Stefan Liebler wrote:
I also have trouble with these tests on s390x:
env python test-mutex-printer.py test-mutex-printer.c
/path-to-build/pretty-printers/test-mutex-printer
Exception AttributeError: "'spawn' object has no attribute 'closed'" in
<bound method spawn.__del__ of <pexpect.spawn object at 0x7f8c3b030410>>
ignored
Traceback (most recent call last):
File "test-mutex-printer.py", line 22, in <module>
from test_common import *
File "/home/stli/glibcDir/glibc/pretty-printers/test_common.py", line 76,
in <module>
gdb = pexpect.spawn(GDB, echo=False, timeout=timeout)
TypeError: __init__() got an unexpected keyword argument 'echo'
After deleting "echo=False" in <src>/pretty-printers/test_common.py:76
and preparing ~/.gdbinit like Siddhesh wrote above.
Now gdb is starting and the pretty-printers are installed:
(gdb) info pretty-printer
global pretty-printers:
builtin
mpx_bound128
glibc pthread locks
pthread_cond_t
pthread_condattr_t
pthread_mutex_t
pthread_mutexattr_t
pthread_rwlock_t
pthread_rwlockattr_t
Afterwards running make check fails with e.g.:
Python Exception <class 'gdb.error'> No struct type named pthread_mutexattr.
Furthermore there are Failures with "Expected pattern: xyz ID = 1"
See logfile for "make subdirs=pretty-printers check" output.
But keep in mind that I've deleted the "echo=False" argument.
Can you give me advice what to do?!
Do you know what version of pexpect module you have? You shouldn't
get the first error about the echo attribute and setting echo=True
(implicitly) is what seems to be causing the test failures.
I have python2-pexpect-4.0.1-4.fc23.noarch and that seems to work just
fine.
Siddhesh
On that machine, I have installed python-pexpect-3.1-1.fc20.noarch.
I've tried python2-pexpect-4.0.1-4.fc23.noarch on another machine and
you are right, the "echo=False" issue does not appear.
But I get fails:
FAIL: pretty-printers/test-condvar-attributes-pp:
Error: Response does not match the expected pattern.
Command: print *attr
Expected pattern: pthread_condattr_t
Response: Python Exception <class 'gdb.error'> No struct type named
pthread_condattr.:
Python Exception <class 'gdb.error'> No struct type named
pthread_condattr.:
$3 = {__size = "\000\000\000", __align = 0}
gdb-test%
FAIL: pretty-printers/test-mutex-attributes-pp:
Error: Response does not match the expected pattern.
Command: print *attr
Expected pattern: pthread_mutexattr_t
Response: Python Exception <class 'gdb.error'> No struct type named
pthread_mutexattr.:
Python Exception <class 'gdb.error'> No struct type named
pthread_mutexattr.:
$1 = {__size = "\000\000\000\002", __align = 2}
gdb-test%
FAIL: pretty-printers/test-rwlock-attributes-pp:
Error: Response does not match the expected pattern.
Command: print *attr
Expected pattern: pthread_rwlockattr_t
Response: Python Exception <class 'gdb.error'> No struct type named
pthread_rwlockattr.:
Python Exception <class 'gdb.error'> No struct type named
pthread_rwlockattr.:
$3 = {__size = "\000\000\000\000\000\000\000", __align = 0}
gdb-test%
The gdb version is gdb-7.10.1-30.fc23.s390x.
Nevertheless is it possible to check the correct versions and warn
at configuring or mark the tests as unsupported if pexpect is not
installed or you have the false version?
Stefan