kernel version for P-lts is not correct for test result gathering

Bug #1849079 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Critical
Po-Hsu Lin

Bug Description

For 3.13.0-174.225~12.04.1 the test result gathered by our infrastructure - kernel-testing shows the kernel version is:
    "kernel": "3.13.0-174.1",

This is caused by bug 1838610.

Here is the code we use in lib/test_attributes.py:

    def kernel_version(self):
        m = re.match('^(\d+\.\d+\.\d+[\.-][\drc]+)-?(.*)$', platform.release())
        version = m.group(1)
        flavour = m.group(2)

        m = re.match('^#(\d+.*?)(-Ubuntu)* .*$', platform.version())
        upload = m.group(1)

        retval = "%s.%s" % (version, upload)
        return retval, flavour

The platform.release() will return:
    3.13.0-174-generic

m.group(1) will be:
    3.13.0-174

The platform.version() will return:
    #1-Ubuntu SMP Fri Oct 4 13:07:52 UTC 2019

So the m.group(1) will be:
    1

This combined will generate the wrong kernel version: "3.13.0-174.1"

Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
importance: Undecided → Critical
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Precise EOL, the temporary fix is no longer needed.

Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.