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:   Sat, 31 Oct 2020 12:01:44 +0800
From:   David Gow <davidgow@...gle.com>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] kunit: tool: fix extra trailing \n in raw + parsed test output

On Sat, Oct 31, 2020 at 6:39 AM Daniel Latypov <dlatypov@...gle.com> wrote:
>
> For simplcity, strip all trailing whitespace from parsed output.
> I imagine no one is printing out meaningful trailing whitespace via
> KUNIT_FAIL() or similar, and that if they are, they really shouldn't.
>
> `isolate_kunit_output()` yielded liens with trailing \n, which results
> in artifacty output like this:
>
> $ ./tools/testing/kunit/kunit.py run
> [16:16:46] [FAILED] example_simple_test
> [16:16:46]     # example_simple_test: EXPECTATION FAILED at lib/kunit/kunit-example-test.c:29
>
> [16:16:46]     Expected 1 + 1 == 3, but
>
> [16:16:46]         1 + 1 == 2
>
> [16:16:46]         3 == 3
>
> [16:16:46]     not ok 1 - example_simple_test
>
> [16:16:46]
>
> After this change:
> [16:16:46]     # example_simple_test: EXPECTATION FAILED at lib/kunit/kunit-example-test.c:29
> [16:16:46]     Expected 1 + 1 == 3, but
> [16:16:46]         1 + 1 == 2
> [16:16:46]         3 == 3
> [16:16:46]     not ok 1 - example_simple_test
> [16:16:46]
>
> We should *not* be expecting lines to end with \n in kunit_tool_test.py
> for this reason.
>
> Do the same for `raw_output()` as well which suffers from the same
> issue.
>
> This is a followup to [1], but rebased onto kunit-fixes to pick up the
> other raw_output() fix and fixes for kunit_tool_test.py.
>
> [1] https://lore.kernel.org/linux-kselftest/20201020233219.4146059-1-dlatypov@google.com/
>
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>
> ---

Thanks!

I tried this out against everything I could (including the nastier
--alltests option), and didn't hit any problems, so it looks good to
go to me!

Reviewed-by: David Gow <davidgow@...gle.com>
Tested-by: David Gow <davidgow@...gle.com>

Cheers,
-- David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ