From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"msys.mizuma@gmail.com" <msys.mizuma@gmail.com>
Cc: "m.mizuma@jp.fujitsu.com" <m.mizuma@jp.fujitsu.com>
Subject: Re: [PATCH 2/2] nfit, test: cleanup test scripts
Date: Tue, 19 Jun 2018 04:36:26 +0000 [thread overview]
Message-ID: <1529382984.1960.4.camel@intel.com> (raw)
In-Reply-To: <20180614194336.15341-3-msys.mizuma@gmail.com>
On Thu, 2018-06-14 at 15:43 -0400, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
>
> Cleanup some test scripts by using helper functions.
>
> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> ---
> test/blk-exhaust.sh | 21 ++++++----------
> test/btt-check.sh | 52 ++++++++++++++++++---------------------
> test/btt-errors.sh | 7 +++---
> test/btt-pad-compat.sh | 36 ++++++++++++---------------
> test/clear.sh | 25 +++++++------------
> test/create.sh | 26 +++++++++-----------
> test/daxdev-errors.sh | 29 ++++++++--------------
> test/firmware-update.sh | 25 +++++--------------
> test/inject-error.sh | 24 ++++++++----------
> test/label-compat.sh | 17 +++++--------
> test/multi-dax.sh | 23 ++++++-----------
> test/pmem-errors.sh | 19 +++++---------
> test/rescan-partitions.sh | 22 ++++++++---------
> test/sector-mode.sh | 22 ++++++-----------
> 14 files changed, 135 insertions(+), 213 deletions(-)
>
>
[..]
> diff --git a/test/sector-mode.sh b/test/sector-mode.sh
> index d507788..3576b70 100755
> --- a/test/sector-mode.sh
> +++ b/test/sector-mode.sh
> @@ -11,10 +11,6 @@
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> # General Public License for more details.
>
> -NDCTL="../ndctl/ndctl"
> -BUS="-b nfit_test.0"
> -BUS1="-b nfit_test.1"
> -TEST=$0
> rc=77
>
> . ./common
> @@ -24,25 +20,23 @@ trap 'err $LINENO' ERR
>
> # setup (reset nfit_test dimms)
> modprobe nfit_test
> -$NDCTL disable-region $BUS all
> -$NDCTL zero-labels $BUS all
> -$NDCTL enable-region $BUS all
> +$NDCTL disable-region $NFIT_TEST_BUS0 all
> +$NDCTL zero-labels $NFIT_TEST_BUS0 all
> +$NDCTL enable-region $NFIT_TEST_BUS0 all
>
> -$NDCTL disable-region $BUS1 all
> -$NDCTL zero-labels $BUS1 all
> -$NDCTL enable-region $BUS1 all
> +$NDCTL disable-region $NFIT_TEST_BUS1 all
> +$NDCTL zero-labels $NFIT_TEST_BUS1 all
> +$NDCTL enable-region $NFIT_TEST_BUS1 all
In all six instances above, missing the '-b' before $NFIT_TEST_BUS*
>
> rc=1
> query=". | sort_by(.size) | reverse | .[0].dev"
> -NAMESPACE=$($NDCTL list $BUS1 -N | jq -r "$query")
> +NAMESPACE=$($NDCTL list $NFIT_TEST_BUS1 -N | jq -r "$query")
Also here..
> REGION=$($NDCTL list -R --namespace=$NAMESPACE | jq -r ".dev")
> echo 0 > /sys/bus/nd/devices/$REGION/read_only
> $NDCTL create-namespace --no-autolabel -e $NAMESPACE -m sector -f -l 4K
> $NDCTL create-namespace --no-autolabel -e $NAMESPACE -m dax -f -a 4K
> $NDCTL create-namespace --no-autolabel -e $NAMESPACE -m sector -f -l 4K
>
> -$NDCTL disable-region $BUS all
> -$NDCTL disable-region $BUS1 all
> -modprobe -r nfit_test
> +_cleanup
>
> exit 0
Other than these, the patches look good. Thanks for these cleanups!
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2018-06-19 4:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 19:43 [PATCH 0/2] nfit, test: Add some global variables and functions to cleanup Masayoshi Mizuma
2018-06-14 19:43 ` [PATCH 1/2] nfit, test: Add NFIT_TEST_BUS[01] variable and some helper funtions to common Masayoshi Mizuma
2018-06-14 19:43 ` [PATCH 2/2] nfit, test: cleanup test scripts Masayoshi Mizuma
2018-06-19 4:36 ` Verma, Vishal L [this message]
2018-06-19 13:19 ` Masayoshi Mizuma
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=1529382984.1960.4.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=linux-nvdimm@lists.01.org \
--cc=m.mizuma@jp.fujitsu.com \
--cc=msys.mizuma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.