[{"id":1951134,"web_url":"http://patchwork.ozlabs.org/comment/1951134/","msgid":"<CAPnjgZ0fzw3uE7ZkYTT5bd1+T3SwpcQgU3O7PursDNijTv9n6w@mail.gmail.com>","list_archive_url":null,"date":"2018-07-10T20:57:06","subject":"Re: [U-Boot] [PATCH v2 6/8] test/py: fit: Open files as binary files","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"On 14 September 2017 at 15:34, Paul Burton <paul.burton@imgtec.com> wrote:\n> The read_file() function in test_fit is used with files that are not\n> text files, as well as some that are. It is never used in a way that\n> requires it to decode text files to characters, so open all files in\n> binary mode such that read() doesn't attempt to decode characters for\n> files which are not text files.\n>\n> Without this test_fit fails on python 3.x when reading an FDT in\n> run_fit_test() with:\n>\n>   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position\n>                        0: invalid continuation byte\n>\n> Signed-off-by: Paul Burton <paul.burton@imgtec.com>\n> Reviewed-by: Stephen Warren <swarren@nvidia.com>\n> ---\n>\n> Changes in v2: None\n>\n>  test/py/tests/test_fit.py | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nApplied to u-boot-dm, thanks!","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org; dmarc=fail (p=none dis=none)\n\theader.from=chromium.org","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"GsOjQxjC\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Uuag01Nn\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 41QF3X1gndz9s0W\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 11 Jul 2018 07:00:55 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 952AEC21D83; Tue, 10 Jul 2018 20:58:21 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 40EB8C21E42;\n\tTue, 10 Jul 2018 20:57:52 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid B42CAC21E44; Tue, 10 Jul 2018 20:57:32 +0000 (UTC)","from mail-oi0-f66.google.com (mail-oi0-f66.google.com\n\t[209.85.218.66])\n\tby lists.denx.de (Postfix) with ESMTPS id 8046DC21E2B\n\tfor <u-boot@lists.denx.de>; Tue, 10 Jul 2018 20:57:28 +0000 (UTC)","by mail-oi0-f66.google.com with SMTP id y207-v6so45301129oie.13\n\tfor <u-boot@lists.denx.de>; Tue, 10 Jul 2018 13:57:28 -0700 (PDT)","by 2002:ac9:3c0c:0:0:0:0:0 with HTTP; Tue, 10 Jul 2018 13:57:06\n\t-0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=VRIvVgSAp9hfaK6Snb43UAEu1WP6Xx0kfvo/0k3SZ7U=;\n\tb=GsOjQxjCspObXjvCmrXHostAOt527EPkDOyE2lfThw43ixDGOb+SiWVaBpAmGiWU4Q\n\tuQmpvKh/2O3nDaCZKHi+nvrPSmlU8xf5AVGWS9XwRfXugpkg5O3pWXRX6Sgg4l5MD5zS\n\twQ3msiBF6t9z54UPRYvT6yhgzNeJO7mBQsnG+dmPJCkpbLyvvzcRHgFCw2cjO06qDoY+\n\tehPmm9D9tLi8PkHf8cwclEA6/8s6HTTAzJeVwGefhFv1xECehNu5hRaQGhdCEYY1aRcy\n\toULA3wWLvtSoWWYsX7FCdq1GW4OUBKkU8E9GPyoMEc2H4AzB4KLWatDaxs8mftyYWuLS\n\taZjQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=VRIvVgSAp9hfaK6Snb43UAEu1WP6Xx0kfvo/0k3SZ7U=;\n\tb=Uuag01NnSGclVRdTaaWSLicjAkhKBsACJQWwyn91zFAwbasfPxxcyeWEPJ4LIoo0aW\n\tYnUSa8bukPugXAhHSuLktaxuVJfwtvqa0JHpolJrcBY+Z6XSNj3RrGKpvXvforYEHME1\n\tsa/OV7qeA1ir9AMe9hlll0PzCW1laQ3y9nXyA="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=VRIvVgSAp9hfaK6Snb43UAEu1WP6Xx0kfvo/0k3SZ7U=;\n\tb=cXPNPEDx0QK9AhzDMFTiQJUULKnHwpIJ0TEyM5YkAByyZ7Si0bFT/uxKtJaHOCPoVH\n\tlzGARkZaFbDRCbPklcVdhs12Uwp802mCuo/OWblNvPHtb7Z9E1Sc8vUGIyYWMliQI7zq\n\tUL8+4dq2YCXg7TwtJfjZZheAJVqX5W/vE+pALbpPjttHWi3CcEgMuzbBgiTzeIH6qqSv\n\tzEaD0wKiA4hwvzCuAGlfkK5LhbBnj+9FxdEX+IWawcUb/5s8aZA0OYIzHYvRjr46OUTX\n\tWYp0gchCS8Z8vHz7anV6CP2euTcqVT9DjH93ggFGnD2J4Kw8zxCbIC7pFiYcNeHyQ680\n\t+VMg==","X-Gm-Message-State":"APt69E0EfIvwPwMpg9eVAhbvj15fKL2rD1yBhOnJ4AF2tFMjm/G2SLYX\n\tasfMee+Emj1UuYpwnwIvEohvfYzlD1S+06PA+2RdgQ==","X-Google-Smtp-Source":"AAOMgpdYiZogTkqSMeJnWBD20Cn/XQ4bh8d7DBVk+aM6IQEJUpAXPpbkIyWodzLuOUji5o0Gk+FHp7mTCZQOD1dak8I=","X-Received":"by 2002:aca:ecd0:: with SMTP id\n\tk199-v6mr31481731oih.227.1531256246981; \n\tTue, 10 Jul 2018 13:57:26 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170914213450.28754-7-paul.burton@imgtec.com>","References":"<20170914213450.28754-1-paul.burton@imgtec.com>\n\t<20170914213450.28754-7-paul.burton@imgtec.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Tue, 10 Jul 2018 14:57:06 -0600","X-Google-Sender-Auth":"LnFgb2jcnzoklTTJx9NLrqle9oI","Message-ID":"<CAPnjgZ0fzw3uE7ZkYTT5bd1+T3SwpcQgU3O7PursDNijTv9n6w@mail.gmail.com>","To":"Paul Burton <paul.burton@imgtec.com>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tStephen Warren <swarren@nvidia.com>","Subject":"Re: [U-Boot] [PATCH v2 6/8] test/py: fit: Open files as binary files","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]