lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 30 Sep 2020 13:00:25 -0700
From:   Brendan Higgins <brendanhiggins@...gle.com>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     David Gow <davidgow@...gle.com>,
        Shuah Khan <skhan@...uxfoundation.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kunit: tool: fix display of make errors

On Wed, Sep 30, 2020 at 11:32 AM Daniel Latypov <dlatypov@...gle.com> wrote:
>
> CalledProcessError stores the output of the failed process as `bytes`,
> not a `str`.
>
> So when we log it on build error, the make output is all crammed into
> one line with "\n" instead of actually printing new lines.
>
> After this change, we get readable output with new lines, e.g.
> >   CC      lib/kunit/kunit-example-test.o
> > In file included from ../lib/kunit/test.c:9:
> > ../include/kunit/test.h:22:1: error: unknown type name ‘invalid_type_that_causes_compile’
> >    22 | invalid_type_that_causes_compile errors;
> >       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > make[3]: *** [../scripts/Makefile.build:283: lib/kunit/test.o] Error 1
>
> Secondly, trying to concat exceptions to strings will fail with
> > TypeError: can only concatenate str (not "OSError") to str
> so fix this with an explicit cast to str.
>
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>

Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
Tested-by: Brendan Higgins <brendanhiggins@...gle.com>

Cheers!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ