Bug 999174 - python-pexpect fails test on arm architecture
Summary: python-pexpect fails test on arm architecture
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pexpect
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andrew McNabb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F-ExcludeArch-ARM 993848
TreeView+ depends on / blocked
 
Reported: 2013-08-20 21:06 UTC by Andrew McNabb
Modified: 2013-11-24 03:51 UTC (History)
5 users (show)

Fixed In Version: python-pexpect-3.0-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-24 03:51:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
tests in an ARM virtual machine (8.73 KB, text/plain)
2013-08-21 21:43 UTC, Andrew McNabb
no flags Details

Description Andrew McNabb 2013-08-20 21:06:24 UTC
Reported upstream: https://bitbucket.org/takluyver/pexpect/issue/4/test-failure-on-arm

Neither the upstream maintainer nor I have access to an ARM machine to be able to track down the problem.

The build fails on an ARM build server with the message:

+ nosetests
........E...............................................................................
======================================================================
ERROR: This tests that we can send all special control codes by name.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pexpect-u-2.5.1/pexpect/tests/test_ctrl_chars.py", line 62, in test_sendcontrol
    child.expect ('[0-9]+\r\n')
  File "/builddir/build/BUILD/pexpect-u-2.5.1/pexpect/__init__.py", line 1354, in expect
    return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
  File "/builddir/build/BUILD/pexpect-u-2.5.1/pexpect/__init__.py", line 1368, in expect_list
    return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
  File "/builddir/build/BUILD/pexpect-u-2.5.1/pexpect/__init__.py", line 1452, in expect_loop
    raise TIMEOUT (str(e) + '\n' + str(self))
TIMEOUT: Timeout exceeded in read_nonblocking().
<pexpect.spawn object at 0x1ea2d30>
version: 2.5.1
command: /usr/bin/python
args: ['/usr/bin/python', 'getch.py']
searcher: searcher_re:
    0: re.compile("[0-9]+
")
buffer (last 100 chars): ^A
before (last 100 chars): ^A
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 27055
child_fd: 3
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
-------------------- >> begin captured stdout << ---------------------
pexpect.tests.test_ctrl_chars.TestCtrlChars.test_sendcontrol
--------------------- >> end captured stdout << ----------------------

Comment 1 Andrew McNabb 2013-08-20 21:16:19 UTC
Apparently there's a way to get an ARM virtual machine, which would come in handy for tracking this down:

http://fedoraproject.org/wiki/Architectures/ARM/F19/Installation#For_Versatile_Express_Emulation_with_QEMU

Comment 2 Andrew McNabb 2013-08-21 21:43:13 UTC
Created attachment 789003 [details]
tests in an ARM virtual machine

I tried running in an ARM virtual machine with QEMU, which was dog slow. I am attaching the output from the failed tests in this case. Only one of them was a timeout. The others seemed to be various types of mangled output.

As annoying as the slowness is, it seems like it shouldn't cause tests to fail with mangled output. Is it possible that these are bugs in the unit tests and/or in the pexpect library? I'm not quite sure what to think.

Comment 3 Thomas Spura 2013-08-22 07:22:46 UTC
I think the tests failing because of mangled output can be ignored (I did a scratch build on koji and there only was the failing test with the timeout.).

Therefore, I'd expect some error on arm in spawn.sendcontrol or the test in test_ctrl_chars.py itself. Could you maybe try to run the test_sendcontrol test interactively? Maybe then you'll see something odd somewhere...

Comment 4 Andrew McNabb 2013-08-22 15:10:13 UTC
(In reply to Thomas Spura from comment #3)
> I think the tests failing because of mangled output can be ignored (I did a
> scratch build on koji and there only was the failing test with the timeout.).

I think it's possible that the mangled output is caused by an actual bug that only appears when the system is slow.

> Therefore, I'd expect some error on arm in spawn.sendcontrol or the test in
> test_ctrl_chars.py itself. Could you maybe try to run the test_sendcontrol
> test interactively? Maybe then you'll see something odd somewhere...

I'll try, but my virtual machine is so slow that I can't promise I'll see anything useful.

Comment 5 Fedora Update System 2013-09-05 16:50:02 UTC
python-pexpect-2.5.1-11.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-pexpect-2.5.1-11.fc20

Comment 6 Andrew McNabb 2013-09-05 17:12:59 UTC
I've temporarily changed the package to be an arch-specific build and to exclude ARM. When we eventually figure out what's wrong, we can switch back to noarch.

Comment 7 leigh scott 2013-09-06 16:39:53 UTC
(In reply to Andrew McNabb from comment #6)
> I've temporarily changed the package to be an arch-specific build and to
> exclude ARM. When we eventually figure out what's wrong, we can switch back
> to noarch.

I will exclude arm till this issue is fixed.

cinnamon has broken dependencies in the rawhide tree:
On armhfp:
	cinnamon-1.9.2-0.20.git2d1ac4d.fc21.armv7hl requires python-pexpect
Please resolve this as soon as possible.

Comment 8 Fedora End Of Life 2013-09-16 17:06:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 9 Thomas Kluyver 2013-10-07 19:19:06 UTC
I did work out the issue with this. On slow machines, the child process has not finished starting before the test starts sending it data. I have implemented a fix in what will become Pexpect 3.0. Despite the major version increment, my intention with this is not to break backwards compatibility.

Pexpect 3.0 is currently in beta, to shake out bugs before a release. If you want to do any testing with this, please grab it from Github, and report any issues you find there:
https://github.com/pexpect/pexpect

Comment 10 Thomas Spura 2013-10-08 09:08:18 UTC
I'm running the tests with this (I'm not 100% sure, if this is the right way to do...):
export PROJECT_PEXPECT_HOME=`pwd`
export PYTHONPATH=.
./tools/testall.py

%if 0%{?with_python3}
pushd %{py3dir}
    export PROJECT_PEXPECT_HOME=`pwd`
    export PYTHONPATH=.
    %{_bindir}/python3 ./tools/testall.py
popd
%endif # with_python3

koji build on all architectures:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6035322

arm wasn't fast enough and was killed by the failure for x86_64 and i686:
ERROR: test_interact (test_interact.InteractTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pexpect-3.0b1/tests/test_interact.py", line 33, in test_interact
    p.expect('<in >')
  File "/builddir/build/BUILD/pexpect-3.0b1/pexpect/__init__.py", line 1420, in expect
    timeout, searchwindowsize)
  File "/builddir/build/BUILD/pexpect-3.0b1/pexpect/__init__.py", line 1435, in expect_list
    timeout, searchwindowsize)
  File "/builddir/build/BUILD/pexpect-3.0b1/pexpect/__init__.py", line 1523, in expect_loop
    raise EOF(str(err) + '\n' + str(self))
EOF: End Of File (EOF). Exception style platform.
<pexpect.spawn object at 0x7f72d1f5cf50>

Comment 11 Thomas Kluyver 2013-10-08 17:19:19 UTC
Thanks Thomas S. I'm not quite sure from your description what that traceback represents. Which architecture is that on? If you believe it's a bug in pexpect (or the tests), can you file an issue on Github for it? But I'm somewhat puzzled as to how it could occur.

Comment 12 Peter Robinson 2013-10-10 10:20:55 UTC
If you need me to test something on a faster ARM device I can, also with F20 (as a host) the VM should be faster for the ARM emulation as we can now use virtio rather than emulating a bit banging MMC card.

Comment 13 Fedora Update System 2013-11-13 12:50:40 UTC
python-pexpect-3.0-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-pexpect-3.0-1.fc20

Comment 14 Fedora Update System 2013-11-14 03:35:59 UTC
Package python-pexpect-3.0-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-pexpect-3.0-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21289/python-pexpect-3.0-1.fc20
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2013-11-14 03:39:09 UTC
python-pexpect-2.5.1-11.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2013-11-24 03:51:49 UTC
python-pexpect-3.0-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.