From: Stefano Brivio <sbrivio@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Yury Norov <yury.norov@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] lib: Add test for bitmap_cut()
Date: Mon, 8 Jun 2020 13:51:14 +0200 [thread overview]
Message-ID: <20200608135114.44ae7962@elisabeth> (raw)
In-Reply-To: <CAHp75Vfvx6wKJUKfgDjyEcPthT9BicoZqfZmaS8eKMFwgvVphg@mail.gmail.com>
On Mon, 8 Jun 2020 14:31:02 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Mon, Jun 8, 2020 at 1:29 PM Stefano Brivio <sbrivio@redhat.com> wrote:
> > On Mon, 8 Jun 2020 13:12:14 +0300
> > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > > On Mon, Jun 08, 2020 at 11:13:29AM +0200, Stefano Brivio wrote:
> > > > Based on an original patch by Yury Norov: introduce a test for
> > > > bitmap_cut() that also makes sure functionality is as described for
> > > > partially overlapping src and dst.
> > >
> > > > Co-authored-by: Yury Norov <yury.norov@gmail.com>
> > >
> > > Co-developed-by (and it requires Yury's SoB as well).
> >
> > Oops, sorry, I didn't remember this part from submitting-patches.rst
> > correctly. Thanks for pointing this out.
> >
> > Yury, let me know if I should re-post with both Co-authored-by: and
>
> Co-developed-by: :-)
Grrr. That! :)
> > Signed-off-by: you -- otherwise I'll repost without both.
>
> ...
>
> > > > + if (!bitmap_equal(out, t->expected, t->nbits)) {
> > > > + pr_err("bitmap_cut failed: expected %*pb, got %*pb\n",
> > > > + t->nbits, t->expected, t->nbits, out);
> > > > + }
> > >
> > > Perhaps
> > >
> > > if (bitmap_equal(...))
> > > continue;
> > >
> > > ...
> > >
> > > ?
> >
> > That's five lines instead of four (I can't get pr_err() on one line
> > anyway) and it looks less straightforward: "if it doesn't match we have
> > an error" vs. "if it matches go to next case. We have an error". Any
> > specific reason I'm missing?
>
> Actually, please use one of suitable expect_eq_*() macro or add your
> own. Because above has an inconsistent format with the rest.
Whoops, I see now. Yes, expect_eq_bitmap() will do, I'll change this in
v2.
--
Stefano
next prev parent reply other threads:[~2020-06-08 11:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 9:13 [PATCH 0/2] lib: Fix bitmap_cut() for overlaps, add test Stefano Brivio
2020-06-08 9:13 ` [PATCH 1/2] lib: Fix bitmap_cut() for partial overlapping case Stefano Brivio
2020-06-08 9:13 ` [PATCH 2/2] lib: Add test for bitmap_cut() Stefano Brivio
2020-06-08 10:12 ` Andy Shevchenko
2020-06-08 10:27 ` Stefano Brivio
2020-06-08 11:31 ` Andy Shevchenko
2020-06-08 11:51 ` Stefano Brivio [this message]
2020-06-10 7:42 ` [lib] 0a1d3d4a3c: Kernel_panic-not_syncing:stack-protector:Kernel_stack_is_corrupted_in:test_bitmap_init kernel test robot
2020-06-08 10:13 ` [PATCH 0/2] lib: Fix bitmap_cut() for overlaps, add test Andy Shevchenko
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=20200608135114.44ae7962@elisabeth \
--to=sbrivio@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pablo@netfilter.org \
--cc=yury.norov@gmail.com \
/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