linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: dwagner@suse.de, osandov@fb.com, linux-block@vger.kernel.org
Subject: Re: [PATCH] blktests: replace module removal with patient module removal
Date: Tue, 8 Feb 2022 14:26:38 -0800	[thread overview]
Message-ID: <d32088fb-2423-b7c7-9184-ebb184ec95e8@acm.org> (raw)
In-Reply-To: <YgLe2GXJW2vqFZc5@bombadil.infradead.org>

On 2/8/22 13:21, Luis Chamberlain wrote:
> On Mon, Feb 07, 2022 at 05:10:24PM -0800, Bart Van Assche wrote:
>> On 11/16/21 09:29, Luis Chamberlain wrote:
>>> +	if [[ -f /sys/module/$module/refcnt ]]; then
>>
>> Has this patch been analyzed with 'make check'? I expect checkpatch to
>> complain about missing double quotes for the above statement.
> 
> No, I was not aware this was a thing. I fixed all the stupid complaints
> however I should note at least tests/srp/rc has existing complaints
> before my changes. I won't address those.

Please consider opening a pull request for the 
https://github.com/osandov/blktests repository. That will cause the 
blktests presubmit tests to be run. See also .github/workflows/ci.yml in 
the blktests source code.

> I can't say I agree with the changes to remove checks for $?, but
> whatever. Consinstancy is better than not having one. Perhaps we should
> embrace this on fstests as well.

+1

> No, I'll clarify to this:
> 
> # Tries to wait patiently to remove a module by ensuring first
> # the refcnt is 0 and then trying to remove the module over and over
> # again within the time allowed

Looks better to me :-)

>>>    	for m in ib_srpt iscsi_target_mod target_core_pscsi target_core_iblock \
>>>    			 target_core_file target_core_stgt target_core_user \
>>>    			 target_core_mod
>>> -	do
>>> -		unload_module $m 10 || return $?
>>> -	done
>>> +	_patient_rmmod $m || return $1
>>
>> Please proofread your changes and test your changes before posting these. I
>> think that both "do" and "done" should have been preserved above.
> 
> And the return value shoudl be $? not $1. I couldn't test srp so wanted
> someone who would to help review, but sure, I should have caught this.

Hmm ... the SRP tests can be run inside a virtual machine so it is not 
clear to me what prevents to run these tests?

Thanks,

Bart.

  reply	other threads:[~2022-02-08 22:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 17:29 [PATCH] blktests: replace module removal with patient module removal Luis Chamberlain
2021-11-18  1:38 ` Chaitanya Kulkarni
2021-12-08 12:53   ` Luis Chamberlain
2022-01-20 20:25     ` Luis Chamberlain
2022-01-26  5:39 ` Chaitanya Kulkarni
2022-02-05  2:33   ` Luis Chamberlain
2022-02-06  3:57     ` Bart Van Assche
2022-02-05 17:50 ` Theodore Ts'o
2022-02-08  1:10 ` Bart Van Assche
2022-02-08 21:21   ` Luis Chamberlain
2022-02-08 22:26     ` Bart Van Assche [this message]
2022-04-13 22:46       ` Luis Chamberlain

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=d32088fb-2423-b7c7-9184-ebb184ec95e8@acm.org \
    --to=bvanassche@acm.org \
    --cc=dwagner@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=osandov@fb.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;
as well as URLs for NNTP newsgroup(s).