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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec95c1b5-7273-9f0b-ad1f-f41e818eaf6f@linuxfoundation.org>
Date:   Fri, 2 Apr 2021 13:19:19 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        David Gow <davidgow@...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: make KUNIT_EXPECT_STREQ() quote values, don't
 print literals

On 4/2/21 1:09 PM, Daniel Latypov wrote:
> On Fri, Apr 2, 2021 at 10:47 AM Shuah Khan <skhan@...uxfoundation.org> wrote:
>>
>> On 4/2/21 3:35 AM, Brendan Higgins wrote:
>>> On Fri, Feb 5, 2021 at 2:18 PM Daniel Latypov <dlatypov@...gle.com> wrote:
>>>>
>>>> Before:
>>>>>    Expected str == "world", but
>>>>>        str == hello
>>>>>        "world" == world
>>>>
>>>> After:
>>>>>    Expected str == "world", but
>>>>>        str == "hello"
>>>> <we don't need to tell the user that "world" == "world">
>>>>
>>>> Note: like the literal ellision for integers, this doesn't handle the
>>>> case of
>>>>     KUNIT_EXPECT_STREQ(test, "hello", "world")
>>>> since we don't expect it to realistically happen in checked in tests.
>>>> (If you really wanted a test to fail, KUNIT_FAIL("msg") exists)
>>>>
>>>> In that case, you'd get:
>>>>>    Expected "hello" == "world", but
>>>> <output for next failure>
>>>>
>>>> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>
>>>
>>> Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
>>>
>>
>> Hi Daniel,
>>
>> Please run checkpatch on your patches in the future. I am seeing
>> a few checkpatch readability type improvements that can be made.
>>
>> Please make changes and send v2 with Brendan's Reviewed-by.
> 
> Are there some flags you'd like me to pass to checkpatch?
> 
> $ ./scripts/checkpatch.pl --git HEAD
> total: 0 errors, 0 warnings, 42 lines checked
> 

My commit script uses --strict which shows readability errors.

> Commit f66884e8b831 ("kunit: make KUNIT_EXPECT_STREQ() quote values,
> don't print literals") has no obvious style problems and is ready for
> submission.
> 
> I just rebased onto linus/master again since I know checkpatch.pl's
> default behavior had changed recently, but I didn't see any errors
> there.
> 
> I know this commit made some lines go just over 80 characters, so
> $ ./scripts/checkpatch.pl --max-line-length=80 --git HEAD
> ...
> total: 0 errors, 4 warnings, 42 lines checked
> 

Don't worry about line wrap warns. I just ignore them. :)

thanks,
-- Shuah



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ