A part of python-runtime test report ... <09:28:08> test_builtin <09:28:11> test test_builtin failed -- errors occurred; run in verbose mode for details ... <09:34:58> test test_getargs crashed -- <type 'exceptions.ValueError'>: bad marshal data Using command line to try to get more information: eg. test_getargs.py Failure result is like this, >>> import marshal >>> marshal.loads(u'\x92') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: bad marshal data >>> Correct result should be: >>> import marshal >>> marshal.loads(u'\x92') Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character u'\x92' in position 0: ordinal not in range(128) >>> I recompiled python without -O2/-O3 option and debug it using gdb. I found that the default encoding has been changed at beginning. site.py |-- execsitecustomize() |-- import sitecustomize sitecustomize.py |-- sys.setdefaultencoding( "utf8" ) So, because of setting default encoding from "ascii" to "utf8" and LSB require the default encoding is "ascii", the test failed. I delete "sitecustomize.py" or make relevant lines and we can get the above two tests passed. I find this file "sitecustomize.py" in OE recipe and I wonder whether it is possible to delete it. Any suggestion?
Remove sitecustomize.py for lsb image.