From: osandov@osandov.com (Omar Sandoval)
Subject: [PATCH 2/2] blktests: add test for ANA state transition
Date: Tue, 14 Aug 2018 14:56:24 -0700 [thread overview]
Message-ID: <20180814215624.GB10954@vader> (raw)
In-Reply-To: <20180802103455.82148-3-hare@suse.de>
On Thu, Aug 02, 2018@12:34:55PM +0200, Hannes Reinecke wrote:
> Add a simple test for ANA state transition handling.
>
> Signed-off-by: Hannes Reinecke <hare at suse.com>
> ---
> tests/nvme/018 | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> tests/nvme/018.out | 18 +++++++
> 2 files changed, 171 insertions(+)
> create mode 100755 tests/nvme/018
> create mode 100644 tests/nvme/018.out
>
> diff --git a/tests/nvme/018 b/tests/nvme/018
> new file mode 100755
> index 0000000..b7f9e00
> --- /dev/null
> +++ b/tests/nvme/018
> @@ -0,0 +1,153 @@
> +#!/bin/bash
> +#
> +# Regression test for ANA base support
> +#
> +# Copyright (C) 2018 Hannes Reinecke
> +#
> +# This program is free software: you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation, either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program. If not, see <http://www.gnu.org/licenses/>.
> +
> +. tests/nvme/rc
> +
> +DESCRIPTION="test ANA optimized/transitioning/inaccessible support"
> +QUICK=1
> +
> +switch_nvmet_anagroup() {
> + local port1="$1"
> + local port2="$2"
> + local mode="$3"
> +
> + echo "ANA state ${mode}"
> +
> + if [ "${mode}" = "change" ] ; then
> + _set_nvmet_anagroup_state "${port1}" "1" "change"
> + _set_nvmet_anagroup_state "${port1}" "2" "change"
> + _set_nvmet_anagroup_state "${port2}" "1" "change"
> + _set_nvmet_anagroup_state "${port2}" "2" "change"
> + elif [ "${mode}" = "failover" ] ; then
> + _set_nvmet_anagroup_state "${port1}" "1" "inaccessible"
> + _set_nvmet_anagroup_state "${port1}" "2" "optimized"
> + _set_nvmet_anagroup_state "${port2}" "1" "optimized"
> + _set_nvmet_anagroup_state "${port2}" "2" "inaccessible"
> + else
> + _set_nvmet_anagroup_state "${port1}" "1" "optimized"
> + _set_nvmet_anagroup_state "${port1}" "2" "inaccessible"
> + _set_nvmet_anagroup_state "${port2}" "1" "inaccessible"
> + _set_nvmet_anagroup_state "${port2}" "2" "optimized"
> + fi
> +}
> +
> +requires() {
> + _have_program nvme && _have_module nvme-loop && _have_module loop && \
> + _have_configfs && _have_fio
Sorry for the delay. This needs _have_program mkfs.xfs. Is there any way
to detect if the kernel supports ANA? This fails miserably on 4.18,
obviously.
Thanks!
next prev parent reply other threads:[~2018-08-14 21:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 10:34 [PATCHv2 0/2] blktests: test ANA base support Hannes Reinecke
2018-08-02 10:34 ` [PATCH 1/2] blktests: enable ANA support Hannes Reinecke
2018-08-03 0:27 ` Chaitanya Kulkarni
2018-08-02 10:34 ` [PATCH 2/2] blktests: add test for ANA state transition Hannes Reinecke
2018-08-03 0:57 ` Chaitanya Kulkarni
2018-08-14 21:56 ` Omar Sandoval [this message]
2018-08-15 3:31 ` Chaitanya Kulkarni
-- strict thread matches above, loose matches on Subject: below --
2018-07-17 13:31 [PATCH 0/2] blktests: test ANA base support Hannes Reinecke
2018-07-17 13:31 ` [PATCH 2/2] blktests: add test for ANA state transition Hannes Reinecke
2018-07-17 13:31 ` Hannes Reinecke
2018-07-17 13:56 ` Johannes Thumshirn
2018-07-17 13:56 ` Johannes Thumshirn
2018-07-21 21:29 ` Chaitanya Kulkarni
2018-07-21 21:29 ` Chaitanya Kulkarni
2018-07-23 14:14 ` Hannes Reinecke
2018-07-23 14:14 ` Hannes Reinecke
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=20180814215624.GB10954@vader \
--to=osandov@osandov.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.