Bug 999174 - python-pexpect fails test on arm architecture
python-pexpect fails test on arm architecture
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-pexpect (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Andrew McNabb
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F-ExcludeArch-ARM 993848
  Show dependency treegraph
 
Reported: 2013-08-20 17:06 EDT by Andrew McNabb
Modified: 2013-11-23 22:51 EST (History)
5 users (show)

See Also:
Fixed In Version: python-pexpect-3.0-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-23 22:51:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Andrew McNabb 2013-08-20 17:06:24 EDT
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 17:16:19 EDT
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 17:43:13 EDT
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 03:22:46 EDT
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 11:10:13 EDT
(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 12:50:02 EDT
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 13:12:59 EDT
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 12:39:53 EDT
(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 13:06:43 EDT
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 15:19:06 EDT
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 05:08:18 EDT
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 13:19:19 EDT
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 06:20:55 EDT
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 07:50:40 EST
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-13 22:35:59 EST
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-13 22:39:09 EST
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-23 22:51:49 EST
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.