Bug 14360

Summary: oe-selftest oescripts.OEPybootchartguyTests.test_pybootchartguy* failure, ZeroDivisionError
Product: [QA/Testing] Functional (self) Testing Reporter: Naveen Saini <naveen.kumar.saini>
Component: oe-selftestAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod, richard.purdie
Version: 3.3   
Target Milestone: 3.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Naveen Saini 2021-04-23 08:51:17 UTC
ZeroDivisionError: float division by zero

Failed following oe-selftests on master:
worker: tumbleweed-ty-1

Testcases:
oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_pdf_outputoescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_png_outputoescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_svg_output

https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/1423


Error log:
2021-04-23 02:32:41,291 - oe-selftest - INFO - ======================================================================
2021-04-23 02:32:41,291 - oe-selftest - INFO - FAIL: oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_png_output (subunit.RemotedTestCase)
2021-04-23 02:32:41,291 - oe-selftest - INFO - ----------------------------------------------------------------------
2021-04-23 02:32:41,292 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest/build/meta/lib/oeqa/selftest/cases/oescripts.py", line 56, in test_pybootchartguy_to_generate_build_png_output
    runCmd('%s/pybootchartgui/pybootchartgui.py  %s -o %s/charts -f png' % (self.scripts_dir, self.buildstats, self.tmpdir))
  File "/home/pokybuild/yocto-worker/oe-selftest/build/meta/lib/oeqa/utils/commands.py", line 210, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command '/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui.py  /home/pokybuild/yocto-worker/oe-selftest/build/build-st-1770/tmp/buildstats/20210423013714 -o /home/pokybuild/yocto-worker/oe-selftest/build/build-st-1770/tmp/charts -f png' returned non-zero exit status 1:
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui.py", line 23, in <module>
    sys.exit(main())
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui/main.py", line 174, in main
    render()
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui/main.py", line 165, in render
    batch.render(writer, r, options, f)
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui/batch.py", line 43, in render
    draw.render (ctx, options, 1.0, trace)
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui/draw.py", line 581, in render
    curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui/draw.py", line 453, in render_charts
    draw_chart (ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect, \
  File "/home/pokybuild/yocto-worker/oe-selftest/build/scripts/pybootchartgui/pybootchartgui/draw.py", line 275, in draw_chart
    yscale = float(chart_bounds[3]) / (data_range[1] - data_range[0])
ZeroDivisionError: float division by zero
Comment 1 Randy MacLeod 2021-04-29 14:50:18 UTC
We forked pybootchart so it's likely a problem in our code.
Comment 2 Richard Purdie 2021-04-29 14:52:19 UTC
/saved/1 on the worker (tumbleweed-ty-1)