manage.py cannot handle raspberry pi kernels properly

Bug #1588794 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hardware Certification Tools
Fix Released
High
Po-Hsu Lin

Bug Description

The manage.py script cannot handle raspberry pi kernels properly, it will put 4.2 and 4.4 kernel into the same kernel cache file (linux-raspi_kernel):

4.2.0-1028.36
4.2.0-1029.37
4.4.0-1010.11
4.2.0-1030.39
4.4.0-1011.14
4.2.0-1030.39

This is because in the code, we use codenames as part of the file name, like for a bug title with:
"linux: 4.4.0-23.41 -proposed tracker"
It will be parsed as "xenial", because it matches the "linux" (for non-lts) and 4.4 in the string.

But for rapsi2 kernel testing task, the title looks like this:
"linux-raspi2: 4.2.0-1030.39 -proposed tracker"
"linux-raspi2: 4.4.0-1011.14 -proposed tracker"

They all have the same "linux-raspi2" header, we should parse and deal with the following kernel number to get the correct name.

Po-Hsu Lin (cypressyew)
Changed in hwcert-tools:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
kaxing (kaxing) wrote :

I got this on the production code:

Traceback (most recent call last):
  File "./hwcert-tools/sru_tools/manage_sru", line 261, in <module>
    sys.exit(main())
  File "./hwcert-tools/sru_tools/manage_sru", line 258, in main
    args.func(**params)
  File "./hwcert-tools/sru_tools/manage_sru", line 78, in notify_kernels
    filename = os.path.expanduser(KERNELS_CACHE) + codename + '_kernel'
TypeError: cannot concatenate 'str' and 'NoneType' objects

For some reason NoneType-codename escape from if-elif statements.
Made a quick fix in production but still got other issue, will take look into this tomorrow.

-- overnight breaker --

So today I figure the latest code from master branch just work, some false indents breaks the if-statements,
however there is another issue, I will just update this bug to fixed released and file another one for "manage_sru status" related problems.

Changed in hwcert-tools:
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.