From: Shuah Khan <skhan@linuxfoundation.org>
To: Brendan Higgins <brendanhiggins@google.com>,
Daniel Latypov <dlatypov@google.com>
Cc: David Gow <davidgow@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals
Date: Fri, 2 Apr 2021 11:47:38 -0600 [thread overview]
Message-ID: <9f5df593-6584-b7d4-3b6e-ad77ee6f8760@linuxfoundation.org> (raw)
In-Reply-To: <CAFd5g44PL+DrN6+0bw-oYQCjCSR-f4Y0=QZL9DsSO-3hKLsFzw@mail.gmail.com>
On 4/2/21 3:35 AM, Brendan Higgins wrote:
> On Fri, Feb 5, 2021 at 2:18 PM Daniel Latypov <dlatypov@google.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@google.com>
>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.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.
thanks,
-- Shuah
next prev parent reply other threads:[~2021-04-02 17:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 22:18 [PATCH] kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals Daniel Latypov
2021-04-02 9:35 ` Brendan Higgins
2021-04-02 17:47 ` Shuah Khan [this message]
2021-04-02 19:09 ` Daniel Latypov
2021-04-02 19:19 ` Shuah Khan
2021-04-02 19:34 ` Daniel Latypov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f5df593-6584-b7d4-3b6e-ad77ee6f8760@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).