
On 08/06/2018 04:42 AM, Michal Simek wrote:
On 14.9.2017 23:34, Paul Burton wrote:
In python 3.x the configparser module is named with all lower case. Import it as such in order to avoid errors when running on python 3.x, and fall back to the CamelCase version in order to keep working with python 2.x.
...
I have bisect issue with test/py framework on my PC and I end up on this patch.
Below is the issue I am getting.
And here are my python version. [u-boot](test)$ python3 --version Python 3.4.3 [u-boot](test)$ python --version Python 2.7.6 [u-boot](test)$ which python /usr/bin/python
Do you know what could be the issue?
I honestly can't think why the configuration parsing could cause the kind of issue that was shown in the test log. It seems like there's a bug in the test/py code w.r.t. receiving characters from the target outside the ASCII range, which should be applicable in all cases, but I can't see how that would only happen based on how configparser was imported.
Thanks, Michal
===================================================================================================== FAILURES ====================================================================================================== _____________________________________________________________________________________________________ test_help _____________________________________________________________________________________________________
u_boot_console = <u_boot_console_exec_attach.ConsoleExecAttach object at 0x7f1da3e6f290>
def test_help(u_boot_console): """Test that the "help" command can be executed."""
u_boot_console.run_command('help')
test/py/tests/test_help.py:8: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/py/u_boot_console_base.py:181: in run_command self.logstream.write(self.prompt, implicit=True) test/py/multiplexed_log.py:65: in write self.logfile.write(self, data, implicit) test/py/multiplexed_log.py:688: in write self.f.write(self._escape(data)) test/py/multiplexed_log.py:335: in _escape c for c in data) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <iterator object at 0x7f1da3d9bb90>
data = ''.join((c in self._nonprint) and ('%%%02x' % ord(c)) or
c for c in data)
E UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 32: ordinal not in range(128)
test/py/multiplexed_log.py:335: UnicodeDecodeError
130 tests deselected
===================================================================================== 1 failed, 130 deselected in 7.32 seconds ======================================================================================
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot