linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: Sagi Grimberg <sagi@grimberg.me>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v7 1/7] nvme: consolidate nvme requirements based on transport type
Date: Mon, 14 Sep 2020 16:23:32 -0600	[thread overview]
Message-ID: <92478e6f-622a-a1ae-6189-4009f9a307bc@deltatee.com> (raw)
In-Reply-To: <20200914220951.GD148663@relinquished.localdomain>



On 2020-09-14 4:09 p.m., Omar Sandoval wrote:
>> I noticed this too during my review, but based on my read of the current
>> blktest code, the return value of the requires() function is not
>> actually used. It seems to only check if SKIP_REASON is set.
>>
>> If we want to ensure the return value of requires() is correct, perhaps
>> we should check it after we call it and then consult SKIP_REASON? And
>> WARN or fail if SKIP_REASON is set when requires() didn't return 1.

> Oops, you're right, I actually changed this a few months ago in
> 4824ac3f5c4a ("Skip tests based on SKIP_REASON, not return value").
> Totally forgot about that :) IMO it's still cleaner to chain them
> together.

In my opinion, this creates a bit of confusion when reading the code.
The &&s make it look like the return value is important when, in fact,
it is not.

It is also easy to make the assumption that adding any bash command to
the && list will skip the test -- however that is not the case and
people may introduce subtle bugs that look correct, but go unnoticed.

Logan

  reply	other threads:[~2020-09-14 22:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 23:53 [PATCH v7 0/7] blktests: Add support to run nvme tests with tcp/rdma transports Sagi Grimberg
2020-09-03 23:53 ` [PATCH v7 1/7] nvme: consolidate nvme requirements based on transport type Sagi Grimberg
2020-09-04  0:18   ` Chaitanya Kulkarni
2020-09-14 21:51   ` Omar Sandoval
2020-09-14 22:04     ` Logan Gunthorpe
2020-09-14 22:09       ` Omar Sandoval
2020-09-14 22:23         ` Logan Gunthorpe [this message]
2020-09-14 22:25           ` Omar Sandoval
2020-09-03 23:53 ` [PATCH v7 2/7] nvme: consolidate some nvme-cli utility functions Sagi Grimberg
2020-09-04  0:19   ` Chaitanya Kulkarni
2020-09-03 23:53 ` [PATCH v7 3/7] nvme: make tests transport type agnostic Sagi Grimberg
2020-09-04  0:20   ` Chaitanya Kulkarni
2020-09-03 23:53 ` [PATCH v7 4/7] tests/nvme: restrict tests to specific transports Sagi Grimberg
2020-09-04  0:21   ` Chaitanya Kulkarni
2020-09-14 21:53   ` Omar Sandoval
2020-09-03 23:53 ` [PATCH v7 5/7] nvme: support nvme-tcp when runinng tests Sagi Grimberg
2020-09-04  0:21   ` Chaitanya Kulkarni
2020-09-03 23:53 ` [PATCH v7 6/7] common: move module_unload to common Sagi Grimberg
2020-09-04  0:22   ` Chaitanya Kulkarni
2020-09-03 23:53 ` [PATCH v7 7/7] nvme: support rdma transport type Sagi Grimberg
2020-09-04  0:23   ` Chaitanya Kulkarni
2020-09-04 17:00   ` Yi Zhang
2020-09-04 15:52 ` [PATCH v7 0/7] blktests: Add support to run nvme tests with tcp/rdma transports Logan Gunthorpe
2020-09-11 22:06 ` Sagi Grimberg
2020-09-25 17:32 ` Omar Sandoval

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=92478e6f-622a-a1ae-6189-4009f9a307bc@deltatee.com \
    --to=logang@deltatee.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=osandov@osandov.com \
    --cc=sagi@grimberg.me \
    /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).