ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
45 stars 77 forks source link

Incorrect kernel version parse #654

Closed douglas-raillard-arm closed 8 months ago

douglas-raillard-arm commented 9 months ago

Devlib does not detect the sha1 correctly in the following kernel version (pixel 8 with a GKI kernel)

>>> uname='5.15.110-android14-11-ga6d7915820a0-ab10726252'
 >>> m = KVERSION_REGEX.match(uname)
 >>> print(m)
 <re.Match object; span=(0, 8), match='5.15.110'>
 >>> print(m.groupdict())
 {'version': '5', 'major': '15', 'minor': '110', 'rc': None, 'commits': None, 'sha1': None}
douglas-raillard-arm commented 9 months ago

The first sha1 is the one that should be reported by devlib. The 2nd one is a GKI ABI version and should probably just be ignored for now (or added as an optional field)