Merge ~cypressyew/qa-regression-testing:phlin/text-mode-for-config-gz into qa-regression-testing:master
Status: | Merged |
---|---|
Merged at revision: | ac459f23afcb6e94211fa9521cec53f497936723 |
Proposed branch: | ~cypressyew/qa-regression-testing:phlin/text-mode-for-config-gz |
Merge into: | qa-regression-testing:master |
Diff against target: |
13 lines (+1/-1) 1 file modified
scripts/test-kernel-security.py (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Beattie | Approve | ||
Review via email: mp+443563@code.launchpad.net |
Commit message
While testing J-xilinx kernel, all of the KernelSecurityC
are failing with:
Traceback (most recent call last):
File "./test-
self.
File "./test-
self.
File "./test-
self.
File "./test-
setting = self._get_
File "./test-
if line.startswith
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
This is because the /proc/config.gz was not opened in text mode with
the python gzip module. Set it to 'rt' (text mode) to fix this issue.
Please find the config.gz copied from the J-xilinx unit here: /people. canonical. com/~phlin/ qrt/config. gz
https:/
Read it with: 'config. gz', 'r') as f:
import gzip
with gzip.open(
content = f.readlines()
And check the content.