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

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