Bug 5642

Summary: The number of warnings from Build table doesn't match the number of orm_logmessage.level entries with value 1
Product: [Build System, Metadata & Runtime] Toaster Reporter: Andreea Brandusa Proca <andreea.b.proca>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact: Ionut Chisanovici <ionutx.chisanovici>
Severity: normal    
Priority: Medium CC: alexandru.damian, amit, belen.barros.pena, bogdanx.a.voiculescu, cristiana.voicu, ionutx.chisanovici
Version: unspecified   
Target Milestone: 1.6 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
database
none
database
none
toaster_ui.log
none
toaster_ui.log
none
toaster_events.out none

Description Andreea Brandusa Proca 2013-12-06 15:03:21 UTC
Created attachment 1659 [details]
database

FAIL: test_quality_Build (bldviewer.tests.QualityTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/brandusa/masterT/bitbake/lib/toaster/bldviewer/tests.py", line 43, in test_quality_Build
    self.assertEqual(warnings_no[0]["warnings_no"], len(level_warning))
AssertionError: 9 != 3

The build table:

 {
        "pk": 2,
        "model": "orm.build",
        "fields": {
            "build_name": "201312051725",
            "outcome": 0,
            "completed_on": "2013-12-05T16:01:58.165Z",
            "warnings_no": 9,
            "distro_version": "1.5+snapshot-20131205",
            "started_on": "2013-12-05T15:25:50.935Z",
            "machine": "qemumips",
            "bitbake_version": "1.21.0",
            "cooker_log_path": "/home/brandusa/masterT/build/tmp/log/cooker/qemumips/20131205152452.log",
            "image_fstypes": "ext3 tar.bz2",
            "errors_no": 0,
            "distro": "poky-lsb"
        }

The logmessage table:
  {
        "pk": 1,
        "model": "orm.logmessage",
        "fields": {
            "lineno": 95,
            "message": "QA Issue: python-native: configure was passed unrecognised options: --without-cxx --with-cyclic-gc",
            "pathname": "/home/brandusa/masterT/bitbake/lib/bb/__init__.py",
            "build": 2,
            "level": 1
        }
    },
    {
        "pk": 2,
        "model": "orm.logmessage",
        "fields": {
            "lineno": 95,
            "message": "QA Issue: libtool-cross: configure was passed unrecognised options: --with-sysroot",
            "pathname": "/home/brandusa/masterT/bitbake/lib/bb/__init__.py",
            "build": 2,
            "level": 1
        }
    },
    {
        "pk": 3,
        "model": "orm.logmessage",
        "fields": {
            "lineno": 95,
            "message": "QA Issue: python: configure was passed unrecognised options: --without-cxx --with-cyclic-gc",
            "pathname": "/home/brandusa/masterT/bitbake/lib/bb/__init__.py",
            "build": 2,
            "level": 1
        }

The database is attached.
Comment 1 Alexandru Damian 2013-12-30 13:59:30 UTC
There may be warnings and errors that are not coming through during task execution - as such, they may be counted, but not recorded. 

I will investigate for the particular scenario needed, but I think this test is invalid.
Comment 2 Alexandru Damian 2014-02-13 16:28:48 UTC
*** Bug 5693 has been marked as a duplicate of this bug. ***
Comment 3 Alexandru Damian 2014-02-21 14:51:27 UTC
I cannot reproduce this bug.

If you can reproduce the bug, please reproduce it with this patch applied

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=adamian/traceevents&id=38ec6ead67f218640bec3a8bb4efe493cfc91699

and attache toaster_events.out and toaster_ui.log files here.
Comment 4 Andreea Brandusa Proca 2014-03-25 12:34:40 UTC
Created attachment 1855 [details]
database

The error is quite easy to reproduce. I have attached another database where you can find this problem.
Comment 5 Andreea Brandusa Proca 2014-03-25 12:35:15 UTC
Created attachment 1856 [details]
toaster_ui.log

master:ac4ff568f5b2ad4f50a1b7b60797e7b797c314bb
Comment 6 Andreea Brandusa Proca 2014-03-25 13:13:55 UTC
Created attachment 1858 [details]
toaster_ui.log

When I apply the patch from Alex D I don't get the error, the test is passed.
Comment 7 Andreea Brandusa Proca 2014-03-25 13:14:40 UTC
Created attachment 1859 [details]
toaster_events.out
Comment 8 Andreea Brandusa Proca 2014-03-26 11:01:44 UTC
Ropened.
Comment 10 Ionut Chisanovici 2014-04-15 12:48:56 UTC
This is verified.

Ionut C