[Bug 2053226] Re: pexpect 4.9-1 autopkgtest failing on test_interact_exit_unicode

Paul Mars 2053226 at bugs.launchpad.net
Thu Feb 15 08:41:38 UTC 2024


See my ppa https://launchpad.net/~upils/+archive/ubuntu/test-
ppa/+packages


And successful autopkgtests:

- https://autopkgtest.ubuntu.com/results/autopkgtest-noble-upils-test-ppa/noble/amd64/p/pexpect/20240212_102715_a873b@/log.gz
- https://autopkgtest.ubuntu.com/results/autopkgtest-noble-upils-test-ppa/noble/arm64/p/pexpect/20240212_103005_44dab@/log.gz
- https://autopkgtest.ubuntu.com/results/autopkgtest-noble-upils-test-ppa/noble/s390x/p/pexpect/20240212_111956_17d92@/log.gz

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pexpect in Ubuntu.
https://bugs.launchpad.net/bugs/2053226

Title:
  pexpect 4.9-1 autopkgtest failing on test_interact_exit_unicode

Status in pexpect package in Ubuntu:
  New

Bug description:
  Against python3-defaults/3.12.1-0ubuntu1, autopkgtests are failing for
  arm64, ppc64el and s390x.

  See:

  - https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/arm64/p/pexpect/20240207_210042_b7d5a@/log.gz
  - https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/ppc64el/p/pexpect/20240207_150327_dfc4e@/log.gz
  - https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/s390x/p/pexpect/20240207_145854_0172c@/log.gz

  
  820s =================================== FAILURES ===================================
  820s _________________ InteractTestCase.test_interact_exit_unicode __________________
  820s 
  820s self = <tests.test_interact.InteractTestCase testMethod=test_interact_exit_unicode>
  820s 
  820s     def test_interact_exit_unicode(self):
  820s         " Ensure subprocess receives utf8. "
  820s         p = pexpect.spawnu('{self.interact_py} --utf8'.format(self=self),
  820s                            timeout=5, env=self.env)
  820s         p.expect('READY')
  820s         p.send('ɑ')              # >>> map(ord, u'ɑ'.encode('utf8'))
  820s         p.expect('201<STOP>')    # [201, 145]
  820s         p.expect('145<STOP>')
  820s         p.send('Β')              # >>> map(ord, u'Β'.encode('utf8'))
  820s         p.expect('206<STOP>')    # [206, 146]
  820s         p.expect('146<STOP>')
  820s         p.send('\x00')
  820s         if not os.environ.get('CI', None):
  820s             # on CI platforms, we sometimes miss trailing stdout from the
  820s             # chain of child processes, not entirely sure why. So this
  820s             # is skipped on such systems.
  820s >           p.expect('0<STOP>')
  820s 
  820s tests/test_interact.py:91: 
  820s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  820s /usr/lib/python3/dist-packages/pexpect/spawnbase.py:354: in expect
  820s     return self.expect_list(compiled_pattern_list,
  820s /usr/lib/python3/dist-packages/pexpect/spawnbase.py:383: in expect_list
  820s     return exp.expect_loop(timeout)
  820s /usr/lib/python3/dist-packages/pexpect/expect.py:179: in expect_loop
  820s     return self.eof(e)
  820s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  820s 
  820s self = <pexpect.expect.Expecter object at 0x744501d0f3b0>
  820s err = EOF('End Of File (EOF). Exception style platform.')
  820s 
  820s     def eof(self, err=None):
  820s         spawn = self.spawn
  820s     
  820s         spawn.before = spawn._before.getvalue()
  820s         spawn._buffer = spawn.buffer_type()
  820s         spawn._before = spawn.buffer_type()
  820s         spawn.after = EOF
  820s         index = self.searcher.eof_index
  820s         if index >= 0:
  820s             spawn.match = EOF
  820s             spawn.match_index = index
  820s             return index
  820s         else:
  820s             spawn.match = None
  820s             spawn.match_index = None
  820s             msg = str(spawn)
  820s             msg += '\nsearcher: %s' % self.searcher
  820s             if err is not None:
  820s                 msg = str(err) + '\n' + msg
  820s     
  820s             exc = EOF(msg)
  820s             exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
  820s >           raise exc
  820s E           pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
  820s E           <pexpect.pty_spawn.spawn object at 0x744501d0f9b0>
  820s E           command: /usr/bin/python3.12
  820s E           args: [b'/usr/bin/python3.12', b'interact.py', b'--utf8']
  820s E           buffer (last 100 chars): ''
  820s E           before (last 100 chars): '\r\nEscaped interact\r\n'
  820s E           after: <class 'pexpect.exceptions.EOF'>
  820s E           match: None
  820s E           match_index: None
  820s E           exitstatus: None
  820s E           flag_eof: True
  820s E           pid: 1784
  820s E           child_fd: 17
  820s E           closed: False
  820s E           timeout: 5
  820s E           delimiter: <class 'pexpect.exceptions.EOF'>
  820s E           logfile: None
  820s E           logfile_read: None
  820s E           logfile_send: None
  820s E           maxread: 2000
  820s E           ignorecase: False
  820s E           searchwindowsize: None
  820s E           delaybeforesend: 0.05
  820s E           delayafterclose: 0.1
  820s E           delayafterterminate: 0.1
  820s E           searcher: searcher_re:
  820s E               0: re.compile('0<STOP>')
  820s 
  820s /usr/lib/python3/dist-packages/pexpect/expect.py:122: EOF

  These tests are ignored when run in CI with the env var "CI". Before
  pexpect 4.9-1 the env variable used was "TRAVIS". So now these are not
  ignored ignored anymore.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pexpect/+bug/2053226/+subscriptions




More information about the foundations-bugs mailing list