Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] kernel-module-split.bbclass: Fix modinfo decoding in old kernels
@ 2018-12-18 15:29 pespin.shar
  2018-12-18 15:33 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: pespin.shar @ 2018-12-18 15:29 UTC (permalink / raw)
  To: openembedded-core; +Cc: Pau Espin Pedrol

From: Pau Espin Pedrol <pespin@sysmocom.de>

Before linux commit d36b691077dc59c74efec0d54ed21b86f7a2a21a, some
strings contained invalid utf-8 character which made
split_kernel_module_packages unhappy when parsing ums-isd200.ko:

Exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 21: invalid start byte
---
 meta/classes/kernel-module-split.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 67ab4161da..e8996cf59b 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -48,7 +48,8 @@ python split_kernel_module_packages () {
         tmpfile = tf[1]
         cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX") or "", file, tmpfile)
         subprocess.check_call(cmd, shell=True)
-        f = open(tmpfile)
+        # errors='replace': Some old kernel versions contain invalid utf-8 characters in mod descriptions (like 0xf6, 'ö')
+        f = open(tmpfile, errors='replace')
         l = f.read().split("\000")
         f.close()
         os.close(tf[0])
-- 
2.20.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for kernel-module-split.bbclass: Fix modinfo decoding in old kernels
  2018-12-18 15:29 [PATCH] kernel-module-split.bbclass: Fix modinfo decoding in old kernels pespin.shar
@ 2018-12-18 15:33 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-12-18 15:33 UTC (permalink / raw)
  To: Pau Espin Pedrol; +Cc: openembedded-core

== Series Details ==

Series: kernel-module-split.bbclass: Fix modinfo decoding in old kernels
Revision: 1
URL   : https://patchwork.openembedded.org/series/15398/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            kernel-module-split.bbclass: Fix modinfo decoding in old kernels
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-18 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-18 15:29 [PATCH] kernel-module-split.bbclass: Fix modinfo decoding in old kernels pespin.shar
2018-12-18 15:33 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox