subunit2html can fail on bad input

Bug #1807919 reported by Chris Dent on 2018-12-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-testr
Undecided
Unassigned

Bug Description

While attempting to add a py37 job to nova, there was a POST_FAILURE. This can be traced back to subunit2html failing to deal with unexpected input. Presumably it should be resilient in the face of anything and warn, not die. It looks like the problem could be either in subunit2html or testtools.

The relevant traceback (from http://logs.openstack.org/55/624055/2/check/openstack-tox-py37/9ef9f48/job-output.txt.gz#_2018-12-10_17_14_41_586341 ):

2018-12-10 17:14:41.586492 | ubuntu-bionic | File "/usr/os-testr-env/bin/subunit2html", line 11, in <module>
2018-12-10 17:14:41.586560 | ubuntu-bionic | sys.exit(main())
2018-12-10 17:14:41.586782 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/os_testr/subunit2html.py", line 761, in main
2018-12-10 17:14:41.586887 | ubuntu-bionic | result.stopTestRun()
2018-12-10 17:14:41.587189 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/testtools/testresult/real.py", line 549, in stopTestRun
2018-12-10 17:14:41.587276 | ubuntu-bionic | sink.stopTestRun()
2018-12-10 17:14:41.587523 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/testtools/testresult/real.py", line 1775, in stopTestRun
2018-12-10 17:14:41.587613 | ubuntu-bionic | self.decorated.stopTestRun()
2018-12-10 17:14:41.587858 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/testtools/testresult/real.py", line 1529, in stopTestRun
2018-12-10 17:14:41.587963 | ubuntu-bionic | return self.decorated.stopTestRun()
2018-12-10 17:14:41.588213 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/os_testr/subunit2html.py", line 517, in stopTestRun
2018-12-10 17:14:41.588320 | ubuntu-bionic | report = self._generate_report()
2018-12-10 17:14:41.588597 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/os_testr/subunit2html.py", line 603, in _generate_report
2018-12-10 17:14:41.588740 | ubuntu-bionic | self._generate_report_test(rows, cid, tid, n, t, o, e)
2018-12-10 17:14:41.588992 | ubuntu-bionic | File "/usr/os-testr-env/local/lib/python2.7/site-packages/os_testr/subunit2html.py", line 685, in _generate_report_test
2018-12-10 17:14:41.589102 | ubuntu-bionic | output=saxutils.escape(o + e),
2018-12-10 17:14:41.589322 | ubuntu-bionic | UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 1070: ordinal not in range(128)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers