Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/nova/virt/images.py", line 73, in qemu_img_info'
b' out, err = utils.execute(*cmd, prlimit=QEMU_IMG_LIMITS)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/nova/utils.py", line 231, in execute'
b' return processutils.execute(*cmd, **kwargs)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/oslo_concurrency/processutils.py", line 424, in execute'
b' cmd=sanitized_cmd)'
b'oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.'
b'Command: /home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C qemu-img info /fake/path'
b'Exit code: 127'
b"Stdout: ''"
b"Stderr: '/usr/bin/env: \xe2\x80\x98qemu-img\xe2\x80\x99: No such file or directory\\n'"
b''
b'During handling of the above exception, another exception occurred:'
b''
b'Traceback (most recent call last):'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/mock/mock.py", line 1305, in patched'
b' return func(*args, **keywargs)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/nova/tests/unit/virt/test_images.py", line 37, in test_qemu_info_with_errors'
b" '/fake/path')"
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 485, in assertRaises'
b' self.assertThat(our_callable, matcher)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 496, in assertThat'
b' mismatch_error = self._matchHelper(matchee, matcher, message, verbose)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 547, in _matchHelper'
b' mismatch = matcher.match(matchee)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/matchers/_exception.py", line 108, in match'
b' mismatch = self.exception_matcher.match(exc_info)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/matchers/_higherorder.py", line 62, in match'
b' mismatch = matcher.match(matchee)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 475, in match'
b' reraise(*matchee)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/_compat3x.py", line 16, in reraise'
b' raise exc_obj.with_traceback(exc_tb)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/matchers/_exception.py", line 101, in match'
b' result = matchee()'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 1049, in __call__'
b' return self._callable_object(*self._args, **self._kwargs)'
b' File "/home/jaypipes/src/git.openstack.org/openstack/nova/nova/virt/images.py", line 87, in qemu_img_info'
b' raise exception.InvalidDiskInfo(reason=msg)'
b'nova.exception.InvalidDiskInfo: Disk info file is invalid: qemu-img failed to execute on /fake/path : Unexpected error while running command.'
b'Command: /home/jaypipes/src/git.openstack.org/openstack/nova/.tox/py36/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C qemu-img info /fake/path'
b'Exit code: 127'
b"Stdout: ''"
b"Stderr: '/usr/bin/env: \xe2\x80\x98qemu-img\xe2\x80\x99: No such file or directory\\n'"
b''
nova.tests. unit.virt. test_images. QemuTestCase. test_qemu_ info_with_ errors is failing in both py27 and py36 tox environments due to a missing mock.
This system does not have qemu(-img) installed in it and running unit tests returns the following:
======= ======= ======= ======= == ======= ======= ======= ==
Failed 1 tests - output below:
=======
nova.tests. unit.virt. test_images. QemuTestCase. test_qemu_ info_with_ errors ------- ------- ------- ------- ------- ------- ------- ------- ------- --
-------
Captured traceback: jaypipes/ src/git. openstack. org/openstack/ nova/nova/ virt/images. py", line 73, in qemu_img_info' QEMU_IMG_ LIMITS) ' jaypipes/ src/git. openstack. org/openstack/ nova/nova/ utils.py" , line 231, in execute' execute( *cmd, **kwargs)' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ oslo_concurrenc y/processutils. py", line 424, in execute' concurrency. processutils. ProcessExecutio nError: Unexpected error while running command.' src/git. openstack. org/openstack/ nova/.tox/ py36/bin/ python -m oslo_concurrenc y.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C qemu-img info /fake/path' x98qemu- img\xe2\ x80\x99: No such file or directory\\n'" jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ mock/mock. py", line 1305, in patched' jaypipes/ src/git. openstack. org/openstack/ nova/nova/ tests/unit/ virt/test_ images. py", line 37, in test_qemu_ info_with_ errors' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ testcase. py", line 485, in assertRaises' (our_callable, matcher)' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ testcase. py", line 496, in assertThat' er(matchee, matcher, message, verbose)' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ testcase. py", line 547, in _matchHelper' match(matchee) ' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ matchers/ _exception. py", line 108, in match' matcher. match(exc_ info)' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ matchers/ _higherorder. py", line 62, in match' match(matchee) ' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ testcase. py", line 475, in match' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ _compat3x. py", line 16, in reraise' with_traceback( exc_tb) ' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ matchers/ _exception. py", line 101, in match' jaypipes/ src/git. openstack. org/openstack/ nova/.tox/ py36/lib/ python3. 6/site- packages/ testtools/ testcase. py", line 1049, in __call__' object( *self._ args, **self._kwargs)' jaypipes/ src/git. openstack. org/openstack/ nova/nova/ virt/images. py", line 87, in qemu_img_info' InvalidDiskInfo (reason= msg)' exception. InvalidDiskInfo : Disk info file is invalid: qemu-img failed to execute on /fake/path : Unexpected error while running command.' src/git. openstack. org/openstack/ nova/.tox/ py36/bin/ python -m oslo_concurrenc y.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C qemu-img info /fake/path' x98qemu- img\xe2\ x80\x99: No such file or directory\\n'"
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/home/
b' out, err = utils.execute(*cmd, prlimit=
b' File "/home/
b' return processutils.
b' File "/home/
b' cmd=sanitized_cmd)'
b'oslo_
b'Command: /home/jaypipes/
b'Exit code: 127'
b"Stdout: ''"
b"Stderr: '/usr/bin/env: \xe2\x80\
b''
b'During handling of the above exception, another exception occurred:'
b''
b'Traceback (most recent call last):'
b' File "/home/
b' return func(*args, **keywargs)'
b' File "/home/
b" '/fake/path')"
b' File "/home/
b' self.assertThat
b' File "/home/
b' mismatch_error = self._matchHelp
b' File "/home/
b' mismatch = matcher.
b' File "/home/
b' mismatch = self.exception_
b' File "/home/
b' mismatch = matcher.
b' File "/home/
b' reraise(*matchee)'
b' File "/home/
b' raise exc_obj.
b' File "/home/
b' result = matchee()'
b' File "/home/
b' return self._callable_
b' File "/home/
b' raise exception.
b'nova.
b'Command: /home/jaypipes/
b'Exit code: 127'
b"Stdout: ''"
b"Stderr: '/usr/bin/env: \xe2\x80\
b''