Linux block layer
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH blktests 1/7] common/rc: add _min()
Date: Thu, 18 Sep 2025 08:33:30 +0100	[thread overview]
Message-ID: <2b4522f2-03e4-44a5-aaa6-2814fd0f99f3@oracle.com> (raw)
In-Reply-To: <3vajuldrx4svsmh2nabii56psc6kepncrino44gvycj3ekkufn@e2blebamxl5l>

On 18/09/2025 05:08, Shinichiro Kawasaki wrote:
> On Sep 12, 2025 / 09:57, John Garry wrote:
>> Add a helper to find the minimum of two numbers.
>>
>> A similar helper is being added in xfstests:
>> https://lore.kernel.org/linux-xfs/cover.1755849134.git.ojaswin@linux.ibm.com/T/#m962683d8115979e57342d2644660230ee978c803
>>
>> Signed-off-by: John Garry <john.g.garry@oracle.com>
>> ---
>>   common/rc | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/common/rc b/common/rc
>> index 946dee1..77a0f45 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -700,3 +700,14 @@ _real_dev()
>>   	fi
>>   	echo "$dev"
>>   }
>> +
>> +_min() {
>> +	local ret
>> +
>> +	for arg in "$@"; do
>> +		if [ -z "$ret" ] || (( $arg < $ret )); then
> 
> The line above and,
> 
>> +			ret="$arg"
>> +		fi
>> +	done
>> +	echo $ret
> 
> this line above caused shellcheck warnings below.
> 
> $ make check
> shellcheck -x -e SC2119 -f gcc check common/* \
>          tests/*/rc tests/*/[0-9]*[0-9] src/*.sh
> common/rc:708:26: note: $/${} is unnecessary on arithmetic variables. [SC2004]
> common/rc:708:33: note: $/${} is unnecessary on arithmetic variables. [SC2004]
> common/rc:712:7: note: Double quote to prevent globbing and word splitting. [SC2086]
> tests/md/rc:28:12: note: $/${} is unnecessary on arithmetic variables. [SC2004]
> tests/md/rc:28:21: note: $/${} is unnecessary on arithmetic variables. [SC2004]
> ...
> 
> Other patches caused other shellcheck warnings. Could you run "make check" and
> address them?

sure, will fix

thanks


  reply	other threads:[~2025-09-18  7:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12  9:57 [PATCH blktests 0/7] Further stacked device atomic writes testing John Garry
2025-09-12  9:57 ` [PATCH blktests 1/7] common/rc: add _min() John Garry
2025-09-18  4:08   ` Shinichiro Kawasaki
2025-09-18  7:33     ` John Garry [this message]
2025-09-12  9:57 ` [PATCH blktests 2/7] md/rc: add _md_atomics_test John Garry
2025-09-18  4:17   ` Shinichiro Kawasaki
2025-09-18  7:36     ` John Garry
2025-09-12  9:57 ` [PATCH blktests 3/7] md/002: convert to use _md_atomics_test John Garry
2025-09-12  9:57 ` [PATCH blktests 4/7] md/003: add NVMe atomic write tests for stacked devices John Garry
2025-09-18  4:27   ` Shinichiro Kawasaki
2025-09-18  7:44     ` John Garry
2025-09-12  9:57 ` [PATCH blktests 5/7] md/rc: test atomic writes for dm-linear John Garry
2025-09-12  9:57 ` [PATCH blktests 6/7] md/rc: test atomic writes for dm-stripe John Garry
2025-09-12  9:57 ` [PATCH blktests 7/7] md/rc: test atomic writes for dm-mirror John Garry
2025-09-16  8:55 ` [PATCH blktests 0/7] Further stacked device atomic writes testing Shinichiro Kawasaki
2025-09-16 10:20   ` John Garry
2025-09-16 11:55     ` John Garry
2025-09-16 12:23       ` Shinichiro Kawasaki
2025-09-16 12:27         ` John Garry
2025-09-17 12:02           ` Shinichiro Kawasaki
2025-09-17 13:12             ` John Garry
2025-09-17 16:22               ` John Garry
2025-09-18  4:36                 ` Shinichiro Kawasaki
2025-09-18  7:48                   ` John Garry
2025-09-18 10:37                     ` Shinichiro Kawasaki

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=2b4522f2-03e4-44a5-aaa6-2814fd0f99f3@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.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