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

Bug #1849079 reported by Po-Hsu Lin on 2019-10-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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/

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

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

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

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

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

So the will be:

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

Po-Hsu Lin (cypressyew) on 2019-10-21
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
importance: Undecided → Critical
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers