Commit Graph

453 Commits

Author SHA1 Message Date
Maciej Wawryk
c2d85bb204 RPC: rename rpc resize_lvol_bdev to bdev_lvol_resize
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic8df4b9d775bdcb61c8fa8354138318e78d56855
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466289
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-28 15:20:15 +00:00
Pawel Kaminski
60563dfe7f scripts/rpc: Rename rpc related to null bdev
Rename construct_null_bdev to bdev_null_create
Rename delete_null_bdev to bdev_null_delete

Change-Id: I2390b14ac62130eaf20b2c43ebd30c763eca34de
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465789
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-28 15:19:58 +00:00
Maciej Wawryk
827b266717 RPC: rename rpc clone_lvol_bdev to bdev_lvol_clone
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I11b1625e31227bd0952fd6e1816f6dbf862c94f1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466119
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-23 22:36:28 +00:00
Pawel Kaminski
7964f1df90 scripts/rpc: Change rpc construct_malloc_bdev to bdev_malloc_create
This is patch that implements changes according to proposal
submitted in https://review.gerrithub.io/c/spdk/spdk/+/453036

Change-Id: I5423cd34cb5fc111b34cab2b7f7c6c5f11898af8
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464677
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-14 22:15:08 +00:00
Karol Latecki
c7553efb02 test/nvmf: use single quotes in trap instruction
Previous commit which fixed this styling issue was not
rebased before merging, so this single place was missed.

Change-Id: I67c5024322c97afd031b3a28ab3dfd686cd96cee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465125
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-14 06:55:32 +00:00
Karol Latecki
90c84ec532 test: use single quotes in trap instruction
Fix SC2064 issue.
Use single quotes, otherwise trap expands now rather than
when signalled.

Change-Id: I0b3a9157f52eed037e8d217f639c64d6876ec1e1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464655
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
2019-08-14 02:20:45 +00:00
Seth Howell
765f4a7363 test/nvmf: add initiator timeout test.
This test is meant to simulate uncommon network situations where lots of
I/O are getting dropped before they get to the initiator. Essentially,
we are trying to trigger the initiator timeout in the kernel which
disconnects from the target and reconnects after 10 seconds.

This test is different from the other tests that we have currently
because it doesn't rely on killing either the target or initiator.
Instead it expects the target to stay up and properly respond to the
initiator error conditions. The hope is that the fio job running on the
initiator can still complete successfully and the target doesn't crash
due to improperly handling the disconnect and reconnect.

This test should be added to the nightly CI jobs because it is rather
time consuming.

Change-Id: Id457d9eb21a980140f065663547b89b2c69ace93
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464459
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-13 16:56:01 +00:00
Karol Latecki
0f0cd0a87b test: Use $((..)) instead of deprecated $[..]
Fix SC2007: Use $((..)) instead of deprecated $[..].
SC2007 removed from check_format.sh exclude list.

Change-Id: Ifd858857e461d785d6d6f101acca13c326ee637e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464172
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-08 21:27:40 +00:00
Karol Latecki
1ccc878e7f scripts: use -n instead of ! -z
Changing according to styling check done by ShellCheck.
Removing from check_format.sh exclusion list:
SC2236 - Use -n instead of ! -z
SC2070 - -n doesn't work with unquoted arguments. Quote or use [[ ]]

Change-Id: Ia9d645b9d0ce31b67c4de682395cf36f4ddc8d1f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463180
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-08 21:27:40 +00:00
Ben Walker
fa563858fa test/vhost: Allow string names for vhost targets
Don't require these to be numbered.

Change-Id: I385f579b41d24eea02e157e53c4fc1530864bb5b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461389
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-05 22:56:20 +00:00
Hailiang Wang
23b5124617 test/construct_raid_bdev: fix a deprecated param -s
The "-s" causes ERROR printing, because it has been deprecated.
So I modify it to equally functional "-z".

Change-Id: I9c34bd98fef2c2bd346d288b6a20338be02382f5
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463737
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-08-05 06:40:51 +00:00
Evgeniy Kochetov
3cbb9690d4 test/nvmf: Add test for nvmf_get_stats RPC method
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I1f9d2f75831a93dded21d06de63d9f6f40b1a013
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463390
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-29 18:05:09 +00:00
Ziye Yang
6d4f580e79 nvmf/tcp: Remove spdk_nvmf_tcp_qpair_process_pending
Phenomenon:
Test case:  Using the following command to test
./test/nvmf/target/shutdown.sh --iso --transport=tcp
without this patch, it will cause coredump.
The error is that the NVMe/TCP request in data buffer
waiting list has "FREE" state.

We do not need call this function in
spdk_nvmf_tcp_qpair_flush_pdus_internal, it causes the
bug during shutdown test since it will call the function
recursively, and it does not work for the shutdown path.

There are two possible recursive calls:

(1)spdk_nvmf_tcp_qpair_flush_pdus_internal ->
spdk_nvmf_tcp_qpair_process_pending ->
spdk_nvmf_tcp_qpair_flush_pdus_internal ->
>..
(2) spdk_nvmf_tcp_qpair_flush_pdus_internal->
pdu completion (pdu->cb)
->..
-> spdk_nvmf_tcp_qpair_flush_pdus_internal.

And we need to move the processing for NVMe/TCP requests
which are waiting buffer in another function to handle
in order to avoid the complicated possbile recursive
function calls. (Previously, we found the simliar
issue in spdk_nvmf_tcp_qpair_flush_pdus_internal for
pdu sending handling)

But we cannot remove this feature,
otherwise, the initiator will hang for waiting the
I/O. So we add the same functionality in spdk_nvmf_tcp_poll_group_poll
function.

Purpose: To fix the NVMe/TCP shutdown issue.
And this patch also reables the test for shutdown and bdevio.

Change-Id: Ifa193faa3f685429dcba7557df5b311bd566e297
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462658
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-26 21:16:23 +00:00
Seth Howell
30ca1a9083 test/nvmf: fix edge condition in check_ip_is_soft_roce
When individual tests were run with --iso --transport=tcp, the
check_ip_is_soft_rocefunction incorrectly marked the loopback ip address
as soft_roce due to 'lo' matching with a notice message from the rxe_cfg
config command "module rdma_rxe is not loaded". Instead, grep
specifically to make sure that the argument we are matching against,
which is supposed to be an rxe interface name, contains rxe.

rxe interfaces are numbered sequentially as rxe0 rxe1 . . . rxen

Change-Id: Ibe8afb3e038e104173eb1e2bbf671ce9f417ffeb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463127
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-25 14:49:17 +00:00
Seth Howell
8f12bc5b69 test/nvmf: disable the shutdown tests for the tcp transport.
This test is very unstable on TCP. Until we can get to the bottom of the
latent failures, we should disable it. This will allow us to continue
testing a substantial amount of tcp functionality while avoiding latent
failures in the test pool.

Change-Id: I3c7ec2709ad81a3ec5c1a4d56027b27a9c6ffc7e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-23 08:50:57 +00:00
Seth Howell
a78b7bb18c test/nvmf: avoid running bdevperf on top of nvmf_tgt
When you run verify on bdev perf, it rejects any user provided core
masks and pins itself to core 0. We were also running the NVMe-oF target
on cores 0-3. Occasionally I was seeing the shutdown tests failing
during the waitforio step. It seemed like the target and bdevperf were
both still online during this failure, so my hypothesis is that the
bdevperf poller was stealing all of the cycles from the NVMe-oF poller
completing I/O so the I/O wasn't completing.

Even if that's not what's happening, it is probably a good idea to split
the NVMe-oF application and bdevperf onto different cores.

Change-Id: Ib3b5b00e639ebd14bd1ed2cfb4b7782076ca364c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462551
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-23 03:48:08 +00:00
Seth Howell
4edb785f49 test/nvmf: add || true to kill commands.
In the RDMA transport, the initiator doesn't properly pick up the lost
connection and we have to kill it. However for TCP, the initiator
realizes the closed socket and fails out. Then when we go to kill it, it
fails the test. So add and || true when killing the perf processes.

Change-Id: Ifed5d726946bad2e9396db40b40f1fee72b4597f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 04:10:52 +00:00
Seth Howell
cf7bce72ae test/nvmf: add -o when creating tcp transports.
Kernel versions 5.0.x do not support the -o option from our target.
Currently, kernel versions 5.1.x and 5.2.x are broken for the tcp
transport in loopback, so in order to test against a stock fedora kernel
that works, we will need to use 5.0.x for at least the next few months
until the distributions start shipping 5.3.x which contains the fix we
need.

Change-Id: I41fc5956dd4b53f03879e0adf2427872cd2337ee
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461741
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-18 04:06:25 +00:00
Seth Howell
015ef22a8a test/nvmf: add NVMF_TRANSPORT_OPTS global
For a lot of the tests, we may want to specify different options for
each transport. I believe this will be more prevalent as we add more
transport specific options.

Change-Id: I83a915629460d1d869eaba4bc86822d7563402ac
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461740
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-18 04:06:25 +00:00
Darek Stojaczyk
218f53b115 test/nvmf: remove shebang from the common file
The file is not meant to be executed, so shebang is
not needed - let's remove it.

Change-Id: I51c32613ffb25b43a2d1b96523a8f25c853594e4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461355
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-17 04:25:37 +00:00
Seth Howell
3a7b6e5bd4 test/nvmf: remove extra call to perf.
Currently we test both transports under perf each time we run the nvmf
tests. Once we have created a jenkins job for the tcp transport, we will
only need to run this test against the specified transport for each job.

Change-Id: I053d11f4e6d6f4b86a3f29e6c8f43e1e196bedab
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460714
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-07-09 13:23:03 +00:00
Seth Howell
733262359a test/nvmf: add application for target fuzz testing.
Enables us to test randomized data against the NVMe-oF target interface.

Change-Id: Ie7ab46949ccd89f74b10b79a24256aeae2df89ab
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431571
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: qun wan <qun.wan@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-08 09:18:19 +00:00
Seth Howell
2df7e3a23d test/nvmf: make modprobe calls symmetric.
By moving the modprobe and modprobe -r calls into nvmftestinit and
nvmftestfini respectively, we can make these calls symmetric in all
cases The previous format where nvmfappstart was adding modules and
nvmfcleanup was being called independently to remove them started to
cause issues when we added the tcp transport.

I think this fixes #846

Change-Id: I68d18e0be5a2d4d2ea83a5a34f0aa2da268209fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460396
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-05 09:06:48 +00:00
Seth Howell
0b8e0d81f2 test/nvmf: make nvme-* kmod removal optional.
When we insert the nvme-$TEST_TRANSPORT modules into the kernel, we
allow for it to fail. So, for the sake of symmetry, we should allow for
the opposite to be true.

Thanks to Maciej Wawryk for pointing out the discrepancy.

Change-Id: I3c551950cbe25382c2bbea4f390bead0ba6f2a37
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460395
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-05 09:06:48 +00:00
Ziye Yang
f3d742a6fd test/nvmf: Add one NVMe-oF perf test for Big I/O
Purpose: Currently, there are many patches related with
NVMe-oF, especially related with big I/O. We need to
add a test case to guard this.

Change-Id: Iddd4070976fe6bf4926ca489d9c97f64a108a422
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460065
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-03 04:30:28 +00:00
Ben Walker
4a770fa9f1 test/vhost: Export default VM_IMAGE from common.sh
Also, construct this path by grabbing the home directory
of the current user.

Change-Id: Ia8d5cc2be40c0c3ac693c80a3132b970f7124183
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456704
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-03 04:15:18 +00:00
Ben Walker
97df5bcc63 test/vhost: Use sshpass instead of generating keys
This is much easier.

Change-Id: I4ae5f2f5b9393f65d07f39f03fa30628a40b01cf
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459304
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-03 04:15:18 +00:00
Seth Howell
6e4f5e0b53 test/nvmf: don't use full disk size in host perf.
When we have a really large disk, setting up a nested lvol across the
entire drive can actually be quite time consuming. When trying to run
this test on an 800G p3700 I was actually getting timeouts on the rpcs
when creating the nested lvolstore. By only taking the first 20G of the
drive to set up the stores, we end up with a much quicker test and
conveniently get rid of the timeouts I was facing.

Change-Id: Ifd43c21c66bc77b615da9b0f421e95337b4c7019
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459849
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-01 12:57:55 +00:00
Tomasz Zawadzki
bef870c6d0 test/fio: fail the tests when fio is not available
When possible we should make sure that no silent failures or
skipped tests.
Since some of the tests use fio, autotest should fail
in those places when it is missing.

Change-Id: I97581e2df30a02445b560e3b88d03ce92986d0fd
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456316
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-28 12:26:12 +00:00
Darek Stojaczyk
887aff4d09 test: remove duplicated set -ex from tests
It's always set in autotest_common.sh, there's no need
to set it again in each test script.

Change-Id: Ib14c4189c553dad54a3065c1a1d413a5fc5a5347
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-19 03:54:58 +00:00
Darek Stojaczyk
fafd4ec9fe test/nvmf: don't use set +e
In fio.sh we used `set +e` for bdev deletion RPCs
and for `wait $fio_pid`. Disabling errors from those
RPCs doesn't make sense. We expect FIO to fail due
to bdev hotremoval, but the bdev hotremoval itself
must succeed.

Besides, it's easy to forget to undo `set +e` so
don't use it. For `wait` we can use the following
paradigm instead:

```
rc=0
wait $pid || rc=$?
```

The same applies to nmic.sh, where we expect some
RPC to fail.

Change-Id: I66ce3504a0c6b5da497759f0688b6c0ea6480b61
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457463
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2019-06-19 03:54:58 +00:00
Tomasz Zawadzki
1bed9c1f1a test/asan: preload ASAN for fio
ASAN needs to be LD_PRELOADed before SPDK fio_plugin
in order to analyze its code.
Just adding that will report any issues in fio binary as
well as the fio_plugin.
To prevent known fio leaks from affecting the results,
a suppression list for LeakSanitizer (used in conjunction with ASAN).

At this time the suppression list contains known leaks
for fio 3.3. The list might need adjustments as fio
version is updated.

Side note. Even though it is possible to specify directory
to ignore ("leak:/usr/src/fio/"). Which in theory should
suppress any leaks in fio. It has side effect of hiding
SPDK leaks as well, since the fio_plugins leaks are
seen as coming from /usr/src/fio/ioengines.c.

See below for examples of each suppressed error:

Direct leak of 42 byte(s) in 4 object(s) allocated from:
    #0 0x7f9d52f3e320 in strdup (/lib64/libasan.so.5+0x3b320)
    #1 0x41f267 in get_new_job /usr/src/fio/init.c:490

Direct leak of 914936 byte(s) in 10397 object(s) allocated from:
    #0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
    #1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214

Direct leak of 608 byte(s) in 19 object(s) allocated from:
    #0 0x7f74422e8ca8 in __interceptor_malloc (/lib64/libasan.so.5+0x10dca8)
    #1 0x44c4e1 in add_to_dump_list /usr/src/fio/parse.c:1039
    #2 0x44c4e1 in parse_option /usr/src/fio/parse.c:1098

Direct leak of 173 byte(s) in 20 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44b50d in __handle_option /usr/src/fio/parse.c:718

Indirect leak of 111925528 byte(s) in 1271881 object(s) allocated from:
    #0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
    #1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214

Indirect leak of 171 byte(s) in 19 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44c4ed in add_to_dump_list /usr/src/fio/parse.c:1040
    #2 0x44c4ed in parse_option /usr/src/fio/parse.c:1098

Indirect leak of 167 byte(s) in 19 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44c502 in add_to_dump_list /usr/src/fio/parse.c:1042
    #2 0x44c502 in parse_option /usr/src/fio/parse.c:1098

Change-Id: I9b5811993508421be50b12af160645c77ea93d7e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456315
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-18 03:40:50 +00:00
Karol Latecki
fb9c4ee651 test: replace backticks with dollar-parenthesis syntax
Scripts were using a mix of two approaches, lets unify that so
just dollar-parenthesis syntax is used.

Change-Id: Id093b6c82d1f766ba6af13bed720977eceaa7ffc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457744
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-17 07:19:03 +00:00
yidong0635
858718c31d target/filesystem: Add partprobe after parted
Partprobe is a program that informs the operating system kernel
of partition table changes, by requesting that the operating system
re-read the partition table. For instance, if you create a new
partition on one of your disks using parted, you should run
partprobe afterwards to make the kernel aware of the new partition
configuration.

This is useful for issue #799.And it's compatible with other systems.

Change-Id: Icd4c85193bd9d9e6c2b32b8463e75c7a6ff06f34
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457735
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-13 00:49:52 +00:00
yidong0635
fdb03395db nvmf_vhost: Check qemu before and in vhost/common.sh.
Normal return for qemu checking , this should check before vhost/common.sh.
For qemu not installed on this machine. It may be a VM. Skipping nvmf_vhost test.
Otherwise, code will exit 1 before this normal return.
And in vhost/common.sh should with qemu checking.

Change-Id: I2285fffa6fc4384b4b172e5c443019e9ab391fa0
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456123
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-07 18:35:12 +00:00
Tomasz Zawadzki
3b9db6c403 test/fio: export single variable for running fio_plugins
This patch adds functions in autotest_common.sh,
fio_bdev() and fio_nvme() for their respective plugins.
It simplifies its usage throughout the scripts.

Additionally will help with expanding the fio cmd
line with nessecary changes only in single place.

This will be used in next patch in series to
LD_PRELOAD ASAN before fio_plugin.

Note: Did not implement changes for perf scripts,
since they are usualy run separately and didn't want
to affect those.
Similarly didn't change vhost initiator tests,
because the exported directories do not work for
inside the VM. Will need to think of a way to change it
there as well.

Change-Id: Idf750ee7aa9d5e30efc0ce430d15fa45ceccb203
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456314
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-06 05:17:16 +00:00
Jim Harris
dcee8fb262 test/nvmf: clean up host/aer.sh
Use the new nvmfappstart to simplify this script a
bit and bring it inline with the other nvmf scripts
that have been updated recently.

Also remove the comments about aer with temperature
threshold.  We use namespace notifications to test aer
now, so there's no need to try to resurrect the
temperature-based tests.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9c66ed4c9456acb39d6c64d55153304eb6e07100

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456706
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
d53bfa7245 test/nvmf: allow user to pass transport type to nvmf.sh
Change autotest.sh to pass --transport=rdma.  But this
now allows someone to run nvmf.sh with --transport=tcp
to run all of the nvmf tests with the tcp transport!

Initial testing shows that bdevio.sh fails with tcp,
so only run this test with the rdma transport.  Issue
#808 has been filed - once it's resolved this
restriction can be removed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie50de4d67e504c84d6d8eebfe2b8c68b14f4ba2b

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456698
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2019-06-04 23:04:54 +00:00
Jim Harris
c4d5d2fdcf test/nvmf: run host/perf.sh separately for each transport
While here, remove NVMF_TCP_IP_ADDRESS since we already
have NVMF_FIRST_TARGET_IP which serves the same purpose
when testing the TCP transport.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7cc4712cd9746377937e889127aa5a61566d8846

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
aa429c8044 test/nvmf: add tcp support
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1d162b9bb4c9ee61871f4bc5b81e6b9bb696ab48

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456697
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2019-06-04 23:04:54 +00:00
Jim Harris
02c1c5a69a test/nvmf: use --transport=rdma in nvmf.sh
We also no longer hardcode TEST_TRANSPORT=rdma.  Users
of the individual test scripts must now explicitly
pass --transport=rdma.  Support for tcp will be coming
in future patches.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I819d69cb0906eb27b692eb2755aca5085298d779

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456685
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
43db4eff70 test/nvmf: add ARGS to nvmf.sh
Right now this is empty, but we'll add to it later as
part of parameterizing this script for different transports.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icf0f67ce4dd886031c37986b352129d3c556bd92

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456684
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
aa7a13981b test/nvmf: use TEST_TRANSPORT instead of 'rdma'
This prepares for using scripts for tcp testing as well.
Note that this patch just hardcoded TEST_TRANSPORT to
'rdma' for now.  An upcoming patch will require the
caller to pass --transport=rdma instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I085fdf51910aaf960959c71c73a187be41fd7ee8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
cddfe002e1 test/nvmf: use NVMF_PORT consistently
A lot of places were still hardcoding 4420 directly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iff8a549addeb05e441fe3b035a84a0f8a6bf2205

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456666
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
61b44c9fcd test/nvmf: update nvmf_vhost test
This script was developed in parallel to some of the
script infrastructure improvements.  So fix it up to
match the more recent changes - including leveraging
the common setup of the NVMF_FIRST_TARGET_IP, and removing
the parameters to nvmftestinit/nvmftestfini.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6cc4ef30325961822014e2835e575a950c53ecc0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456665
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Jim Harris
d0201cb1f3 test/nvmf: remove NVMF_FIRST_TARGET_IP duplication from host tests
These scripts already call nvmftestinit which sets up the
NVMF_FIRST_TARGET_IP variable.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id732e2e7c981bf557518489776aaacebeeecdfa8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-04 23:04:54 +00:00
Seth Howell
5470a0584f scripts/fio.py: add argparse for command line parameters
This script was getting a bit unwieldy. adding argparse will make it
easier to add more options in the future or to set default values and
validate arguments going forward.

Change-Id: I1ffdbdf2082287ceb8a88cd3eb6ecf9bbd6c9e11
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455724
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-06-03 04:34:10 +00:00
Jim Harris
6a8a1b6bef test: always parse common script args
Good suggestion from Darek - let's just always
parse common script args from autotest_common.sh.
These arguments follow common arg naming conventions
(i.e. --iso) so there's no harm just doing this for
any test that sources autotest_common.sh.  This has
the nice effect of not requiring scripts to
explicitly call this function.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id89b68c22557a5a771be407873d0e57843f0d05a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455552
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-24 05:36:46 +00:00
Jim Harris
390b364146 test: add parse_common_script_args function
iscsi test scripts can now take two arguments -
"iso" and then the sock type (posix or vpp).  They
need to be in that specific order too.  nvmf test
scripts also support "iso" and we want to add
the transport type (rdma or tcp) as well.  Even further
out, we may want to use a sock type for nvmf, i.e.
tcp transport with vpp.

We also have the iscsi_tgt fio_remove_nvme.sh test
that does both iscsi and nvmf.

So to make this all work a bit nicer, add a new
function called parse_common_script_args that
will take the command line arguments to a script
and set the appropriate variables, including defaults
when a specific parameter isn't specified.  We will
use getopt-like behavior for this also, instead of
enforcing a specific parameter order.  Then a script
could be called like this:

test/nvmf/target/shutdown.sh --iso --transport=tcp --sock=vpp

Individual test scripts then just need to do this
after sourcing autotest_common.sh:

parse_common_script_args $@

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifb8d7666384991482a2d425e26ffa7525b9ac15a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455283
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-22 23:43:51 +00:00
Jim Harris
d96abc9f0d test/nvmf: remove -p num_queues restrictions
There's a bug in Linux 5.1 (possibly 5.0 too) where
the kernel initiator driver crashes if it can't get
one queue per CPU.  This will get fixed eventually,
but for now we need to remove the cases where we
restrict the number of queues per controller so that
we can test on newer kernels.

Even on cases where we're testing the SPDK initiator,
there's no real need to restrict the number of queue
pairs.

The kernel will eventually get fixed, but we should
be testing with default behavior anyways (the kernel
wants lots of queues).  We'll also want to add some
regression tests to make sure the kernel doesn't
break again.  But that will all come later.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9979e6d94456e075688b822b042936b63e518a4a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454819
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-22 14:50:05 +00:00
Seth Howell
5931284f74 tet/nvmf_vhost: change the link to vhost/common.sh
Rather than revert this patch, just modify the path to the common script
to enable it to pass in the test pool.

Change-Id: I33f5d89e1e118df4546f45237b55173ad30fad24
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-21 19:17:31 +00:00
Seth Howell
0372f2b3ae create nvmf+vhost test.
This will allow us to verify functionality between the nvmf target and
the vhost target and test extra code paths within the nvmf target
including multi-sgl stuff.

Change-Id: I3f5e9351c11ab896b75cd7bba7a69d95c1d031be
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-21 10:01:50 +00:00
Jim Harris
46fef66536 test/nvmf: improve nested lvol test
Nested lvolstores take a very long time to create,
since the initial unmap will get broken into
one unmap per cluster for the underlying lvol.

This test is working fine in the test pool, but they
have much smaller SSDs.  My system has a 3.7TB SSD,
and this test times out.

So don't bother clearing the nested lvol store - this
saves unmap operations.  We still have unmap operations
when deleting the nested lvol, so increase the cluster
size for the main lvolstore to 1GiB to reduce the total
number of unmap operations.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I29a254fff443e963cd620b55e78092d6a96f8ddd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453010
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-20 09:03:39 +00:00
Jim Harris
86d8214d15 test/nvmf: simplify rpc.sh test
Just name the malloc bdev explicitly.  And since there
is only one bdev, remove all of the unnecessary loops.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie3b55161d6ebee64497bc9726edaa3fbf04bb445

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454690
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
178b06b438 test/nvmf: fix some nvme_cli.sh test issues
1) remove unnecessary disconnect for cnode2 - this
   subsystem doesn't exist (and the || true was
   hiding the failure
2) remove || true from the cnode1 disconnect
3) remove extra spaces when assigning nvme_model -
   maybe these spaces are OK on some versions of
   bash, but when I run this locally this doesn't
   work at all
4) remove trailing spaces from model returned by
   identify data before comparison

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If3dd7ddc2ba44fc880e5b398b5fe0922b6637b80

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454689
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
03c309432b test/nvmf: make malloc bdevs always the same size
A few test scripts were creating 128MB malloc bdevs
instead of 64MB - but there's no real reason for the
difference.  So make them all the same.  A future
patch will make all of these size variables common
instead of duplicated in each file.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I865ef08f384e026d0d3e7b064fb3a2d5958f054c

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454688
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
4de69f551c test/nvmf: run filesystem.sh against just 1 malloc bdev
Adding the second bdev doesn't provide any real value since
it's the same kind of bdev.

While here, explicitly name the malloc bdev to simplify
the test some more.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ide6da901d4b90383cc73fa195b5a070a8eda0d01

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454687
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
3c422060ca test/nvmf: simplify srq_overwhelm.sh
1) specify malloc bdev name explicitly
2) just use a single loop variable

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7fb4fc28715f7303fc2b39de80985939ab469887

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454686
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
d380f58687 test/nvmf: use "rdma" when creating transport
This is a preparatory patch for specifying the transport
when calling the script.  Better to use "rdma" across the
board instead of a mix of "rdma" and "RDMA".

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If7170cff6ba2ec51e92a0423c0b24cc141054b55

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454685
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
a02b1481db test/nvmf: reduce duplication between target scripts
All of the checking for NVMF_FIRST_TARGET_IP, starting
the target, waiting on the target and modprobing
nvme-rdma is duplicated in every script.  So move
a lot of this either to nvmftestinit() or a new
nvmfappstart() function in common.sh.

Also just kill the nvmf target in nvmftestfini, rather
than the script to explicitly kill it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5864404610a4244473f460d48264de92687ed867

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454678
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
913f5858d3 test/nvmf: simplify "iso" parameter
Pull this parameter when sourcing common.sh 
and set a RUN_IN_ISOLATION flag if it was specified.
This reduces the overall code a bit plus avoids having to
pass the "iso" parameter to nvmftestinit and nvmftestfini.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idbbe27bfb7b62857500176cdb5d90e381fce4ffc

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454814
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-17 12:48:19 +00:00
Jim Harris
fd44a412a4 test/nvmf: re-enable nvmf bdevio test
Resets now work with NVMe fabrics controllers.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I34c2824bcec797779b9888926db123839734f9d1

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453942
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2019-05-16 19:01:33 +00:00
Jim Harris
d27ed1073f test/nvmf: disable bdevio test for now
This test does resets which the nvme driver doesn't
really support yet for fabrics controllers.  Some
recent patches accidentally broke resets for PCIe
controllers, and fixing that causes this test to
hang on fabrics controllers.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5676130087a49555645b077f289bb40f6f27a43

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-09 19:03:18 +00:00
Jim Harris
788c16773b test/nvmf: add bdevio test
This tests a variety of bdev-related commands against
our NVMe-oF target.  The key ones are write_zeroes
and nvme_passthrough which until now weren't being
tested at all.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id8a5cfb2e41c2a7e8fd940b61b43a80c39993f9a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452936
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2019-05-08 22:43:19 +00:00
Jim Harris
915270db68 bdev: make bdevs array for get_bdevs_iostat RPC
Fixes issue #775.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e07084599c2363b64619f38bd826fe100217020

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452477
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-08 22:43:00 +00:00
Jim Harris
211cb4c250 test: don't call python explicitly
We use python3 now, not python.  This is important
because in next patch we will use a new 'aliases'
keyword argument in the argparse API that's only
available in Python 3.

While here, clean up some documentation that was
instructing users to call python explicitly instead
of just invoking scripts/rpc.py directly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0c11e131cd56f7c994aa8fe21b4b00ae33489fdd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453460
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-08 14:22:19 +00:00
Jim Harris
bba25f4a6f test/nvmf: move target-related scripts to one directory
This reduces the number of directories significantly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2bb428962e1666bd3cee20fb566c7eb81195363a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452934
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-07 01:51:47 +00:00
Jim Harris
656c938dcb test/nvmf: fix a couple of bugs in nvmf.sh
1) nmic is a target test - move it out of the host
   section
2) don't reset trap until after all tests have run
3) while here, move all of the target-related test
   together, followed by the host tests

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I73b3c0a8ace0ad65311ab7bb29b6cb08188e3aba

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452933
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-06 23:01:49 +00:00
Jim Harris
41456afc3c test/nvmf: simplify more of the nvmf test scripts
This should cover all of the cases that we want to
changes for now - where it was doing an unnecessarily
loop over just one malloc bdev.

A few cases remain, but I'm planning to strengthen
those tests with more bdevs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I16f9e82b4a551bcf1f491fc506e11c0ee98b60d9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-06 05:46:12 +00:00
Jim Harris
1ddf2b5e20 test/nvmf: simplify subsystem creation in bdev_io_wait test
We only create one namespace, so this can be simpler.  We
can also just specify the name of the malloc bdev explicitly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I04141cb8013605f9c54777147852a53d22ae68cf

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452809
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-06 05:46:12 +00:00
Jim Harris
eb132f75c8 test/nvmf: run bdev_io_wait bdevperf instances in parallel
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I442252a63bb9bffb91c290eb46e3f34b4c48cbbe

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452808
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-06 05:46:12 +00:00
Jim Harris
2dd7496a4e test/nvmf: run bdevperf on its own core for bdev_io_wait test
Currently bdevperf isn't specifying a core mask, meaning it
will conflict with the nvmf_tgt running on cores 0-3.  So
specify a core mask, and actually a different one for each
test.  An upcoming patch will then run these bdevperf
instances in parallel to speed up execution.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I70cf4321d3005dda0ff63a96cef226b0329f778e

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-05-06 05:46:12 +00:00
Jim Harris
dd76212429 test/nvmf: utilize waitforfile for aer test
We need to wait for the aer application to be ready
to handle an AER completion - so instead of blindly
waiting for 5 seconds, instead wait for the aer
application to touch a file indicating it's ready
to receive an AER event.  On my system, this took about
1 second.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic18fabb5ba637ef1f4097930423f897c76bba299

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452806
Reviewed-by: Mike Carlin <mikefcarlin@protonmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-06 05:46:12 +00:00
Jim Harris
7685a48fd8 test/nvmf: fix host/fio.sh test
get_lvs_free_mb only takes a UUID argument, not
a friendly name.  So revert that part of the changes
to this script made previously.

Also fix ordering of nested lvolstore and lvol names.

This fixes last night's nightly test failures for
nvmf.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I408ed787b6ff43314dd432c9fa7d9f5882c3d071

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453007
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-03 17:59:11 +00:00
Jim Harris
654f5a8d9c test/nvmf: call rpc.py only once to build subsystems
This leverages a new feature in rpc.py for piping a
large number of commands at once.  This will cut down
the amount of time it takes to run the affected tests.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ieddf5dcc9cb6132dff96c90db4ed97e67c328f56

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-02 08:53:56 +00:00
Jim Harris
59955106a6 test/nvmf: simplify host/fio.sh
We don't need to use the UUIDs for lvolstores and
lvols in the nightly test - just use the names that
we've specified.

Also remove the bdev loops - there's only one namespace
per subsystem.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I684b72ca4472009dd8bc49f5221a7937769f1ab8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452772
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-02 08:53:56 +00:00
Jim Harris
5b1b044310 test/nvmf: simplify ns creation in shutdown test
We only create one namespace so there's no need for
a loop.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7b37792e5ea0ee7d48853ca05882d566dd6ac5e0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452771
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-02 08:53:56 +00:00
Jim Harris
e259d2bb61 test/nvmf: shorten shutdown test
Currently it blindly waits 5 seconds to make sure bdevperf
has started I/O - and it does this for two different tests.
Improve that by using the get_bdevs_iostat RPC to check when
I/O start occurring.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If7bc773ab65d23f69524d3a42123be090f3b4eac

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452753
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-02 08:53:56 +00:00
Jim Harris
36d1cf3ad8 test/nvmf: improve timing checks in shutdown.sh
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I51c63cf73085b38056f19870f1aa0659895d7093

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452741
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-02 08:53:56 +00:00
Ben Walker
219b62430d nvmf: Improve nvmf_lvol.sh
Simplify the test to only run on the RAID volume, but then
also perform several operations on the logical volume while
I/O is occurring in the background. This would have caught
several recently filed bugs.

Change-Id: If937a118ea034ce08d95b70fe74dc5f445cb1008
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452150
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-29 17:31:34 +00:00
Seth Howell
84c550f3cb test/nvmf: disable overwhelm testing for now.
This test is causing intermittent failures on the test pool.

Change-Id: I6be745700ee34813d49800acf689dc35d6c88ef4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451998
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-25 16:41:46 +00:00
Seth Howell
89d2efe07e rdma: set the srq param in the initiator.
We were setting this value in the target from our initiator, but it
turns out the rdma_conn_params struct is responsible for setting the
opposite side so we need to add it in the target side when accepting
connections.

Also, add a test to demonstrate target functionality when we overwhelm
the SRQ. It is useful to note that performance really tanks when you
start overwhelming the srq so it may be useful to use this test case to
check performance gains in edge cases over time.

Change-Id: Iac541bd9fc1d82eca9f21e7abc3f625663a6c460
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-24 09:22:16 +00:00
Seth Howell
0f94938a74 scripts/fio.py: add support for specifying num_jobs
This will allow us to test a greater number of connections without
having to add more subsystems when doing NVMe-oF testing.

Change-Id: I33203d6db79b30abb065f098c16840096478c5de
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451677
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 09:22:16 +00:00
Gregory Shapiro
14032a984c NVMF: Add model number as parameter to construct_nvmf_subsystem (-d option).
Change-Id: Ia1a458a0ac1c5a17d2955a3f31c6dfe77538eb17
Signed-off-by: Gregory Shapiro <gregory.shapiro@kaminario.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/438562
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-23 16:51:16 +00:00
Seth Howell
2cc6b0dfcb rdma: set the number of wr sge_entries per I/O
This was not being properly set in the multi-sgl path.
Also add a verification step to the fio configuration file to prevent
against future regressions.

Change-Id: I510b6acd92bc2fbc9b6fbec1d59945cc53584ad3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450305
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-19 17:29:45 +00:00
Seth Howell
47fca7c7e8 fio_plugin: add support for mocking SGL entries
FIO is going to always present a contiguous buffer to us. But we can
fake out the nvme driver with a couple of global variables.

Change-Id: I038e70582043e1d7c1800ed065fe126aa091c290
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/439608
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-02 23:26:08 +00:00
Karol Latecki
b6abc16b05 test: remove duplicate fio.py script file
scripts/fio.py and test/nvmf/fio/nvmf_fio.py are almost exact
same script. This commit unifies two files into one.

Change-Id: If753baaeb9f92dad2cda27bb4bed78ade4827d0b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448656
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-26 22:47:45 +00:00
yidong0635
51515d874a test/nvmf: bypass host fio test with asan enabled
This is third party code which no need to run with asan enabled.

Change-Id: Id6f20f5e280e2b2ef67f83bac710133271d84aa8
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448597
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-21 17:29:49 +00:00
Seth Howell
a2bf3cded3 test/nvmf: add connect_disconnect test back to nightly
After the last two patches, I was able to verify that this doesn't fail
with Soft-RoCE on kernel 4.19.13

Also while here, make the output less verbose.

Change-Id: I051e62088db2995e55e07201b91e1dd286ecd22e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-08 21:09:09 +00:00
Seth Howell
3704b949fa test/nvmf: detect a subclass of Chelsio NICs
This automates the process of probing some RDMA capable Chelsio NICs

Change-Id: I1ef52ffd899d4cbd1ace65037c8acf0be099adae
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446968
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 08:35:02 +00:00
Seth Howell
4698f61bd6 test/nvmf: add checks for X722 NICs
Add the option to test with intel X722 NICs

Change-Id: Icb439e43768eb397dac881c6cb6979b3426fa62e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 08:35:02 +00:00
Seth Howell
1e867a8966 test/nvmf: make common function for probing pci NICs
Change-Id: I9368a44ebfec54ab705bd371ffd45de1c0bce5ac
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446967
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 08:35:02 +00:00
Seth Howell
9f03beea38 test/nvmf: change reporting strategy for NICs.
This makes it so we only have to check one variable when determining if
we want to load Soft-RoCE NICs.

Change-Id: I5ba615e26252041023ec8615a00c1777bee6cb12
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446966
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 08:35:02 +00:00
Seth Howell
5dff03721b test/nvmf: detect mlx_4 and mlx_5 NICS into 2 funcs
This helps us simplify the detection of Mellanox NICS and paves the way
for a more modular detection scheme for PCIe connected NICs.

Change-Id: I93f16f469c569977c43d6e20fd4616299fa8c723
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446965
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 08:35:02 +00:00
Seth Howell
8985c5b6be test/nvmf: add new function detect_pci_nics
Change-Id: I5d433dc78bd0e7ff24dddee73c1e159607175084
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446720
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-07 08:35:02 +00:00
Karol Latecki
0d5cbbed16 test/nvmf: move connect_disconnect to NIGHTLY_FAILING
Test consecutively fails for at least couple of days.
Test fails with:
"Failed to write to /dev/nvme-fabrics: Cannot allocate memory"
coming from kernel module.

Change-Id: Idba1bbb3fb63df8a1fb460752ee9cb5780d89860
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-02-21 20:03:04 +00:00
Jim Harris
5f7eb6e38b test: remove references to stub application
We are doing away with using the stub application as
much as possible, so let's just remove references to it
where we can.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I52802474f1aaaf100c1b929f4e3ac555532a8410

Reviewed-on: https://review.gerrithub.io/c/444305
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-02-13 16:43:18 +00:00
Seth Howell
5c97ac1636 test/nvmf: add connect disconnect test
Change-Id: I07e8ea5482537aa0bea343e935a9754d6473d02c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443060
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-06 17:33:18 +00:00
Darek Stojaczyk
20f4a21d84 test/nvmf/nvme-cli: don't run nvme-cli as secondary process
nvme-cli in NVMf tests currently fails to initialize
the NVMe driver and exits straight away [1]. It expects
the primary process to initialize the driver first, but
since the primary process doesn't operate on any NVMe
devices, it doesn't initialize the driver at all.

Fix this by running nvme-cli without multi-process mode.
In NVMf tests, nvme-cli is only used to discover, connect
and disconnect from an SPDK NVMf target. It does not need
to access any shared memory resources.

This wasn't an issue before, because we used an outdated
DPDK version for nvme-cli which didn't detect any other
shared memory processes of SPDK.

[1] nvme.c: 337:nvme_driver_init: *ERROR*: primary process
is not started yet

Change-Id: Id56f94c6655049e87ab9d93ee38853faf40a11e5
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442552
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-29 20:54:13 +00:00
Ziye Yang
0652c0a6c4 test/nvmf: fix the error message in nvmf_lvol test
The error message in the chandler pool is:
bdev.c:1127:_spdk_bdev_finish_unregister_bdevs_iter: *ERROR*: Unregistering claimed bdev 'Malloc2'!
bdev.c:1127:_spdk_bdev_finish_unregister_bdevs_iter: *ERROR*: Unregistering claimed bdev 'raid0'!

And this patch can fix this.

Change-Id: I8a247344aa09b62a7395a5513631e7bef6cf0d32
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-01-23 01:43:14 +00:00
Seth Howell
ea17d2ebb9 test/nvmf: start the perf tests w/ dynamic memory
This can be done now that our DPDK submodule has been updated.

Change-Id: I3e17e5b28e04673f7644bfb47bf62b0a03ade9fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440425
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-01-16 19:06:20 +00:00
Pawel Wodkowski
651d9158a0 test: consolidate tests for reading JSON config
This patch rework all JSON config file reading tests. This is needed as
current approach will require to modify each test to re-launch SPDK
applications for each test type. This is hard to do because tests are
not flexible and will require to be rewritten almost from scratch. Not
metioning time to relaunch each test separatly.

Instead, just replace all old tests with one test. Launch only one
target and only one initiator. Then configure it using RPC calls. Then
config is dumped and target and initiator application is relaunched to
reread the configuration from file. Then config is dumped again and
compared.

Change-Id: Id857089aed0e6f2197cbf3ae625a4e9f4b13e8bb
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/432318
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-16 14:17:10 +00:00
Seth Howell
9a9022af23 Revert "test/nvmf: Use bdevperf in lvol test instead of fio"
This reverts commit e086dba5af. The
NVMe-oF lvol tests give us a unique view of the interaction between the
SPDK target and the kernel initiator. Switching to bdevperf may have
masked some issues.

Change-Id: Iac999997716188cf392e1d7eb96bbe4a64b9d8d7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439190
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-01-09 20:50:36 +00:00
Seth Howell
088379cf74 nvme_rdma: Add source addr info to RPC
Change-Id: Id6b5aee4b36d828a0f9e5ddc85293a15342d2aae
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/436220
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-12-20 17:31:43 +00:00
Seth Howell
675c5592e7 nvme_bdev: add parsing for hostaddr and hostsvcid
This allows us to specify the host-side configuration for each
controller to which we connect.

Change-Id: Iac2aed3934d4a326f45546f2f541e374308e2589
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/436219
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-12-20 17:31:43 +00:00
Ben Walker
9ff6da9961 nvmf: Add test that kills initiator with no I/O outstanding
This is a more difficult case to handle than killing with I/O
outstanding because the target gets no notification that the
connection went away. Effectively, this tests that keep alive
is working correctly.

Change-Id: I5bccea8bc51de6d1d2d40c2648ad7c40cce2c281
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/433360
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-07 18:20:30 +00:00
Seth Howell
d6a1169474 test/nvmf: add iso option to the host tests.
Allows us to run them independent from autotest

Change-Id: I59843fb3e089494be32fd7aa47cad5439f2732c0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/435937
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-12-06 16:53:07 +00:00
Seth Howell
8431fb1196 test/nvmf: Perf test uses preallocated memory
There appear to be issues around using dynamic memory allocation with
secondary processes and local NVMe drives. This change allows us to keep
running the NVMe-oF physical tests while we debug the root cause of the
issue.

Change-Id: I2fdbac9878c3e19e6ef0bcef1aa301b7062dc0bf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/435942
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-06 16:53:07 +00:00
Seth Howell
fd985a47dd test/nvmf: Don't use the stub
Change-Id: I8581919aee1b95cc367cbfca905e434e5bf5ac4b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/435936
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-06 16:53:07 +00:00
Ben Walker
f64bc0d10c nvmf: Update shutdown test to use wait_for_subsystems RPC
This makes it correctly wait until the bdevperf test has started
running prior to starting the sleep to allow I/O to begin.

Change-Id: Ia6c004ede1854e836479dd3a0707a91551f954bc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/433359
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-04 15:46:20 +00:00
Ziye Yang
03370d0544 nvmf/host/perf.sh: Remove the delete nvme controller statement.
This removal operation is unnecessary.

Change-Id: Ifd525b00661adfeeecd12d460ed081575f2be6b2
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/434299
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-29 04:04:17 +00:00
Ziye Yang
c1ce8db0df nvmf: Add the TCP/IP transport related host test
This is the first patch to enable the automated perf
test with TCP transport, which is used to guard the
correctness of the TCP transport related code.

Change-Id: Ic3df3aeae6df2024e22e50be70c7c61e36f85243
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/425699
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-11-22 06:59:19 +00:00
Ziye Yang
c42bee0cb6 nvmf/host/perf.sh: refactor the code into a common function
Purpose: prepare to add the TCP transport test.

Change-Id: I5dd2acabb9259b7a85919ab2dca41eacf9dee913
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/433964
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-20 22:41:53 +00:00
Ben Walker
edb693c58d nvmf: Use bdevperf for the shutdown test
Rewrite the shutdown test to use bdevperf. This has a few advantages:

1) We avoid any kernel bugs in the NVMe-oF initiator which is not
designed to be connected/disconnect quickly.
2) It is much faster
3) It is much less variable in behavior.

Change-Id: I410ade64677ec14a7b0851a674650a145555f4ed
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432356
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-12 18:30:20 +00:00
Ben Walker
e086dba5af test/nvmf: Use bdevperf in lvol test instead of fio
This is much, much faster to set up and tear down than
the kernel initiator plus fio.

Change-Id: I9532b734123556d6e2055e4f3acf2ad4887784c3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432085
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-07 17:06:11 +00:00
Seth Howell
2d153b29db test/nvmf: Fix check_ip_is_soft_roce
This function was always reporting true. Instead of grepping for the nic
name in the output, look for whether there is an rxe device assigned to
that nic.

Change-Id: Ic69868cfb0802a46c36b2fb83d01bca11ed9c181
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/431690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-02 18:48:43 +00:00
Vitaliy Mysak
8cbbdf2ddf test: fix nvmf connect/disconnect
Add missing wait in test/nvme/shutdown/shutdown.sh
Not waiting after connecting nvme device resulted in undefined behavior.

This patch uses new helper function - nvme_connect

Change-Id: Idb29c7f6b40ae4b3fa0eb68f7b8d5f86d9a4149f
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/428336
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-02 18:40:02 +00:00
Ben Walker
08f64b5761 nvmf: Shorten the shutdown test
Especially for rxe. We're not waiting for the queue pairs to get
cleaned up after disconnect, so this test fails due to running
out of qpairs sometimes.

Change-Id: Ib99133776d02743782ef1631e3880e4e6997c1b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/431372
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2018-11-02 16:39:37 +00:00
Seth Howell
79e48eb771 test/nvmf: Delete unneeded references to start_subsystem_init
nvmf_create_transport can be run both before and after the subsystems
have been initialized. Therefore, we don't need the --wait-for-rpc
argument in most cases. This eliminates the need for calling
start_subsystem_init.

Change-Id: I35560fb968159b4796b1022b1de9cca4dfc5feeb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/429983
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-22 22:33:13 +00:00
Seth Howell
5fbbb6c056 test/nvmf: Use create_transport instead of set_tgt_opts
When running these tests, we want to set the transport opts, not
necessarily the target opts. This will also open us up to doing broader
tests in the future against different transports.

Change-Id: I73112f82c371592456c65355f53f7970878a59c3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/429049
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-10-12 16:30:24 +00:00
Ben Walker
79afa1cffb test/nvmf: Expand shutdown test
Also do a few connect/disconnect sequences before killing it.

Change-Id: Iaa36f259f43aa0896878432777458a3e0bed7ffd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/425999
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-04 22:59:57 +00:00
Ben Walker
ff628417b7 test/nvmf: Correctly add listeners to subsystems in rpc test
A subsystem cannot accept a connection on a listener
until that listen address has been added to the subsystem.

Change-Id: I5ae290d8e763ad077ce3dbda2462362ff91ba160
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/425300
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-03 16:12:31 +00:00
Seth Howell
317b9a5324 test/nvmf: watiforblk in shutdown test
In newer versions of the kernel, there is a race condition that causes
the kernel block layer to mess up if an nvme-oF subsystem is
disconnected before it is fully removed. This can cause the shutdown
test to hang during a sync call aftr nvmf tgt shutdown. see:
d1ecb02290.1537982067/fedora-06/build.log
for details.

This problem has been observed and fixed in the RPC tests also.
https://review.gerrithub.io/c/spdk/spdk/+/426772

Change-Id: I9ec8517e067448be323e69979adf5d3915195c80
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/427152
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-02 22:25:12 +00:00
ChenWang01
4db5688e32 test/nvmf: No longer use construct_nvmf_subsystem method
Use nvmf_subsystem_create method instead.

Change-Id: I8d7306b064d98ab0df02ea9d95e56a44c665cc2c
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/427018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-28 18:41:09 +00:00
Seth Howell
713b481796 test/nvmf: add waitforblk calls to rpc tests.
In newer versions of the kernel (tested on 4.17+), it doesn't always win
a race with itself between subsystem creation and deletion. This ensures
that we have completely connected before disconnecting in this test, and
makes running NVMe-oF tests on fedora 28 more teneble.

Change-Id: I6e09a4f8a23764ea53edfe7b23504a4772bf9297
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426772
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-26 21:58:30 +00:00
Chen Wang
104f7d8575 test/nvmf: add fio and lvol test cases with raid bdev
1. Add the raid bdevs which based two malloc bdevs into subsystem
   to run NVMf target fio case.
2. Create the lvol store with raid bdev which based two malloc bdevs
   when the number of subsystems is equal to 1.

Change-Id: Ia7dda4f1b99e259d1fd28b8856cc8c6e791e7720
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/422493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-25 04:18:15 +00:00
Ben Walker
ec1f425841 test: No longer use construct_nvmf_subsystem
Use nvmf_subsystem_create instead.

Change-Id: Idcfa6526ef47e2839f69acd5d7dc08e65e5150b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/425187
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-09-20 18:35:27 +00:00
John Barnard
183d81d0c6 nvmf: Move target opts to transport opts (part 2)
- Add independent functions to create transport with specific opts
  and add to target while maintaining backward compatibility with
  current apps and rpc configuration that still use the add listener
  method to create a transport.
- Add new rpc function to create transport and add to target.
  + Update json reporting to include new rpc function.
  + Update python scripts to support new rpc function.
  + New nvmf test script (cr_trprt.sh) to test new rpc function.

Change-Id: I12d0a42e34c9edff757755f18a78b722d5e1523e
Signed-off-by: John Barnard <john.barnard@broadcom.com>
Reviewed-on: https://review.gerrithub.io/423590
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-17 20:42:16 +00:00
Pawel Wodkowski
b96f97cf29 scripts: use python3 in all scripts
This it to prepare for RPM package. Also lower number of dependencies
needed by SPDK tools.

Update changelog to deprecate Python 2 and explicit interpeter invoking
in scripts.

Change-Id: I2497cca721cbcbadc1c99c675f8b8b7f682d5efa
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/425233
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:24:30 +00:00
Pawel Wodkowski
bd0abde125 test: sort objects in JSON cofniguration tests
Python 3 is changing order of objects in JSON object when doing load ->
dump. Using OrderedDict solves this issue.

Change-Id: I0aa6364de31e871aed36edd918d25c261c66b506
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/425494
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:24:30 +00:00
Karol Latecki
af32aa1b4e test/nvmf: enable tracepoints for nvmf_tgt
Enable tracepoints and move shm file to
the output directory in case of crash.
Cleanup all shm files after successful run.

Change-Id: Ie46c86ddda71015038624f9b2b5fd4a3e1d7f61f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/425078
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-12 16:58:58 +00:00
Liang Yan
cf1366ef66 test: add nvmf multi-path testing
Change-Id: Iea0c8e8c2405d008e77f8bea1a3c30f2f873fa3d
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/420134
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-11 22:58:33 +00:00
Jim Harris
55014ddf53 rpc: remove file parameters from save/load_config in rpc.py
User can pipe or redirect data as needed.  As features like
bdev crypto are added, storing config data in files needs to
be carefully scrutinized - don't make it easy by providing
ways to write data to files that may not be sufficiently
protected.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I24dd32f81b965e275e1bac875f6d008d1b68007a

Reviewed-on: https://review.gerrithub.io/425165
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-11 21:11:51 +00:00
Jim Harris
5a69eb5792 test/nvmf/fio: kill nvmf_tgt before resetting NICs
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib567b9e0f470b3819350fd5210960efec6b73094

Reviewed-on: https://review.gerrithub.io/425144
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-09-11 21:11:51 +00:00
xuhuagen
5dcb2c4678 autotest: testing of nested lvol should be retained
in script test/nvmf/host/perf.sh

github issue #396 has been fixed by removing nested lvol in patch
https://review.gerrithub.io/421136, but the testing of nested lvol
was removed, we can construct nvmf subsystem only after nested lovl
bdev was constructed, it can also fix this issue.

Change-Id: I1783aa76c5ce9f076e73827d46de2ef16c0da66e
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/422194
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-05 21:59:04 +00:00
Liang Yan
ef61d9bcf8 test/nvmf: let modprobe pass if no module found
In fedora 27 4.17.11 kernel, there is no ib_ucm module.
So let modprobe pass if no ib_ucm.

Change-Id: I793802f65263f0f8e3ef0097250fd9ca3cc9ffdc
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/423625
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-29 16:26:52 +00:00
Ben Walker
8c0fc98fb3 nvmf: Fix timing issue in shutdown test
Change-Id: Ifaa33f85914e8b3abba424f1bfd3a6c03d7ca236
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/423750
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-29 16:24:25 +00:00
Jim Harris
8166215677 test/nvmf: fix test/nvmf/nvme_cli/nvme_cli.sh
We need to sleep for a small amount of time after the
./nvme connect since the connection will not appear
immediately.

Remove unnecessary sed commands - this script
did not modify spdk.conf before running these tests,
so it shouldn't be modifying spdk.conf afterwards.

"kill SIGINT" is not valid - a process ID must
be specified.  Just exit with error instead.

Also clean up a typo.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I03b659844c8cfb301b734586eb84b18fc665dc01

Reviewed-on: https://review.gerrithub.io/423743
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-29 06:19:15 +00:00
Ben Walker
02a794ef88 test: Properly quote function arguments
Change-Id: I163f08a52764069bcfcaee4accccd8e1f75c8b9f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/423763
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-29 05:57:15 +00:00
Jim Harris
92861ff5f8 scripts: remove --skip-alias from which commands
--skip-alias is not supported in all versions of which.

While here, explicitly import CalledProcessError - some
versions of Python didn't seem to mind, but it's not
true for all versions.  Also print related error
messages to stderr instead of stdout - this helps
with debugging since in some tests the stdout is
redirected to a file.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7637adc36da6290ece28c77b3398185191347eef

Reviewed-on: https://review.gerrithub.io/423414
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-27 14:58:29 +00:00
Chen Wang
d5d199cfa7 test/fio: update the path of fio binary
Get the path of fio binary dynamically.

Change-Id: Ieb29bdfec33716828339a60e67dfe786e8ad278a
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/423057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-23 19:27:42 +00:00
Tomasz Zawadzki
75408adc3d test/nvmf: add bdev_io_wait tests
Those tests check behaviour of nvmf layer when there is no remaining
bdev_io buffers in pool.

Change-Id: Ic10534108b9d71c00d534407348f1672a74926c4
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/421696
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-22 20:56:04 +00:00
Dariusz Stojaczyk
b5616804dc perf: cleanup cmdline params for consistency
'-s' option is usually associated with the memory size,
but our ioat/perf and nvme/perf use it for io size.

To keep those consistent:
 '-s' option (io size) was be changed to '-o'
 '-d' option (mem size) was be changed to '-s'

Change-Id: I97cef4c0a4e6e902277dd50dfb43bde420a6427e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422654
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-20 16:28:01 +00:00
Dariusz Stojaczyk
39592d7b20 bdevperf: parse all available cmdline options
'-s' option (io size) had to be changed to '-o' as it conflicts
with mem-size.

Change-Id: I7486f30ce7d836a6e465e07f723877facb4f8536
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/421736
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-20 16:28:01 +00:00
Seth Howell
fdf5e5854b test/nvmf: add init and fini functions to tgt tests
These functions enable a user to run one of the Nvme-oF tests directly
from the command line without having to manually invoke all of the setup
we typically do.

Change-Id: Ib0baa77c08abb24c2fa2a1e21cf38ac613d663e0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/422336
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 03:37:26 +00:00
Chen Wang
1f0bff73df test: refactor the run_test function to add detailed information
1.Refactor the run_test function which used to add detailed information
  during run test suites and test cases.
2.Refactor the lvol feature test scripts to make sure their log is the same.
3.Users can use "run_test suite command" to run test suites
  and use "run_test case command" to run test cases.
4.Update the vhost and lvol test as example.

Change-Id: I7b6387019a861bd1c4f89b9a7712e53150aea8fa
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/403610
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-15 17:24:01 +00:00
Changpeng Liu
dc55e08d01 test/nvmf: remove nested lvol test for nvmf
When adding one bdev to NVMeoF Namespace, subsystem
will claim the bdev to prevent shared access to the
same bdev, for nested blobstore tests, this will
fail for NVMeoF test.

Fix the issue #396

Change-Id: Ifade610dc821ae0a7535b1f3f1ef5a44ca43133d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421136
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2018-08-14 02:44:53 +00:00
Dariusz Stojaczyk
aed8986d73 app: drop -w parameter (wait for rpc init)
--wait-for-rpc can be used instead.

This parameter will eventually become obsolete,
so let's remove the short version. It will be
exclusively used for "workload" in perf apps.

Change-Id: Ib4b7001d0e756349b05788278c894d622bc89790
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/421863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-13 17:30:10 +00:00
Changpeng Liu
d5b84ce9d7 test/nvmf: reduce the resource consumption in autotest
When testing test/nvmf/lvol/nvmf_lvol.sh in test pool, Linux
reported error with "Failed to write to /dev/nvme-fabrics:
Cannot allocate memory" sometimes when connecting to target.
While here, reduce the test cycle count to avoid such error.

Change-Id: Ie9283d3e9ad2d13aadf2255225b0ff1184bed267
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421665
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-10 03:09:21 +00:00
Seth Howell
d5de73e017 test/nvmf: Clean up Soft-RoCE NICs after json_config tests
This was leaving soft-roce nics around from run to run.

Change-Id: Ia1114f40aeeae3332aa30310235feab14a1006d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421653
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-09 06:22:30 +00:00
Seth Howell
ab9451bcd0 test/nvmf: Only use Soft-RoCE when RNICs aren't available
Change-Id: I1a48d873afb7579327607182042b2474d8f191cf
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-08-09 06:22:06 +00:00
Changpeng Liu
ff458be850 nvmf: claim each bdev when constructing new Namespace
Claim the block device when adding it to a new Namespace,
and prevent the block device to be added twice for other
modules and Namespaces.  Also remove the test that using
same block device over different Namespaces.

Fix issue #371.

Change-Id: Ib7ce18e9fde4a15c0f19ce9e28e69145e54570e0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/420472
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-06 21:14:37 +00:00
Pawel Niedzwiecki
9668121208 test/iscsi: replace config files from iscsi tests with json and rpc calls
fio.sh still uses conf file because hot remove is not yet imlemented
in rpc calls

Change-Id: If9066e6b24e1e3d381876909fb9e00000a302e02
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/419125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-07-27 16:49:55 +00:00
Tomasz Zawadzki
3a56fabce3 bdev: add delete_nvme_bdev call
Since delete_bdev should be used only for debug purpose,
this patch adds delete call specific for NVMe bdev.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib9a0475d735af2616a3005d04530ca825ece8a52
Reviewed-on: https://review.gerrithub.io/416546
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-07-26 22:07:50 +00:00
Pawel Niedzwiecki
967ca457d0 test/nvmf remove unnecessary line from filesystem.sh
remove 'rm -f /tmp/nvmf.conf' as conf file is no longer used in
this test.

Change-Id: I4889f10df05acdbecea148907f258d5f2925fe7d
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/420364
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-25 19:55:55 +00:00
Tomasz Zawadzki
4219407a93 lvol: destroy_lvol_bdev implementation
This patch fixes lvol delete behaviour.
First, we look if there are any dependencies that disallow lvol deletion.
If there are any (i.e. dependent clones) we fail.
Otherwise we delete lvol and unregister associated bdev.

destroy_bdev no longer deletes lvol.

Fixes #345

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I99e6abded2ed3ae2742103f81fc7eb937ad1cab4
Reviewed-on: https://review.gerrithub.io/407402
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-25 17:06:45 +00:00
Pawel Niedzwiecki
07926e1b55 test/nvmf: Do not use config files
Use rpc methods instead config file in nvmf tests

Change-Id: I75354cae95e1dd5d0e08f5c694b369fb270b92a4
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/419006
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-13 22:40:06 +00:00
Daniel Verkamp
fbb481c2c6 test: add SPDK_TEST_NVME_CLI autotest flag
As requested in GitHub issue #361, we should have a way to control
whether the SPDK-patched nvme-cli tests are executed.

Also add a report_test_completion call for the NVMe-oF nvme-cli test
so we can easily track whether it executed (the local PCIe nvme-cli
test already had a completion).

Change-Id: I70c26bcf2489ccfa563214a9723603aa705be7ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/418866
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Meneghini <johnm@netapp.com>
Reviewed-by: <ed.rodriguez@netapp.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-10 23:18:27 +00:00
Pawel Niedzwiecki
b2fd5b25b2 json/rpc: Tests for nvmf subsystem
Change-Id: I70044bfc01c77a367cf4634d245a58546273f40b
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/412477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-07-10 21:18:18 +00:00
Daniel Verkamp
1fcfc425bf test/nvmf: test InCapsuleDataSize 0 in filesystem.sh
Change-Id: I939aef31473b6a7acae879fb5b03a62154390cac
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/418729
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-07-09 22:24:40 +00:00
Maciej Szwed
2ce9836b17 bdev: add delete_null_bdev call
Since delete_bdev should be used only for debug purpose,
this patch adds delete call specific for null bdev.

Changes in spdkcli done accordingly.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I576322257e5cf70ec03d6b20f8ba43bfce222907
Reviewed-on: https://review.gerrithub.io/416505
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-07-02 22:53:18 +00:00
John Meneghini
f04277f0bf test: remove more sys_sgsw dependencies from test scripts
- To override the default /home/sys_sgsw dependency
   add DEPENDENCY_DIR to ~/autorun-spdk.conf

  E.g.: DEPENDENCY_DIR=/home/vagrant

 - To override the default HUGEPAGES use
   add HUGEMEM to ~/autorun-spdk.conf

  E.g.: HUGEMEM=1024

Change-Id: Ib8db9d7d053ae319fe4c725159742875468d47f0
Signed-off-by: John Meneghini <johnm@netapp.com>
Signed-off-by: Ed Rodriguez <ed.rodriguez@netapp.com>
Reviewed-on: https://review.gerrithub.io/415907
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-02 21:32:39 +00:00
Tomasz Zawadzki
59dee78bd6 bdev: add delete_malloc_bdev call
Since delete_bdev should be used only for debug purpose,
this patch adds delete call specific for malloc.

Changes in tests and spdkcli done accordingly.

Change-Id: I5296452f552ee6eaba4d012d47aea022f17b9d6e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/415259
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-22 15:17:44 +00:00
Ziye Yang
8f26b74e02 examples: make debug flag option consistent
Will change -t to -L

Change-Id: Ie04edf1fd3877b36fde1bae66a84de29f6617bbf
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/415947
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-21 05:18:53 +00:00
Daniel Verkamp
ca88f46a2d test/nvmf: connect kernel host in shutdown test
ATtempt to reproduce GitHub issue #233

Change-Id: I6df334606e6db6c182eccac1f7a3d294dad990a9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398251
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-14 05:10:40 +00:00
Daniel Verkamp
eb387189c2 nvmf: don't change NN while ctrlrs exist
This was partially fixed in commit 1e481d0438 ("nvmf: Do not allow NN
to change while connections present"), but we did not handle the case
where the user asked to add a NS with a NSID outside the current NN.

This patch reworks the logic (again) to be more straightforward and
hopefully more obviously correct.

Some confusion between max_allowed_nsid and max_nsid is also clarified;
if max_allowed_nsid is set, then max_nsid == max_allowed_nsid at all
times, so we don't need the extra logic when calculating NN in
spdk_nvmf_ctrlr_identify_ctrlr().

Change-Id: If531baf1114e03441ff3e1e1be098071702d9056
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414894
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-13 21:52:38 +00:00
Daniel Verkamp
0dc36fe97d test/nvmf: move multiconnection out of NIGHTLY_FAILING
This test is now working reliably after commit 392f3ef589 ("test/nvmf:
fix waitforblk usage in multiconnection").

Change-Id: I15c790b01df8c8204b6c389cf8d381e10ee54fc9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413857
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-06 19:32:15 +00:00
Srikanth kaligotla
8580daa1ac nvmf: SGL support for NVMF RDMA Driver.
Change-Id: I447754c69de432b5a65dc8c1d9ae690926e88c51
Signed-off-by: John Meneghini <johnm@netapp.com>
Signed-off-by: Srikanth kaligotla <kalis@netapp.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/410302
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-04 17:15:49 +00:00
xuhuagen
392f3ef589 test/nvmf: fix waitforblk usage in multiconnection
The subsystems created in this test only have one namespace, not 10;
wait for just nvme0n1, nvme1n1, etc. instead of trying to wait for
nvme0n1, nvme0n2, nvme0n3..., which will time out and fail.

Change-Id: I2d131e9b92c9c89a5dc8fe0cf9138b980f810233
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/413056
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-01 23:25:37 +00:00
Daniel Verkamp
4c91e7bf3b test/nvmf: disable identify_kernel test
This test has been causing intermittent failures for some time:

  nvme_rdma.c: 221:nvme_rdma_get_event: *ERROR*: Expected
  RDMA_CM_EVENT_ESTABLISHED but received RDMA_CM_EVENT_UNREACHABLE (7)
  from CM event channel (status = -110)

Disable it until we find a reliable way to avoid this issue.

Change-Id: Id8f767bfa26a6a14f94cf4f7ff69b3ac0f11d88d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410489
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-29 07:52:35 +00:00
Daniel Verkamp
f9d52c9ebd lvol: add destroy_lvol_bdev RPC method
This is the first step toward fixing the behavior of the lvol bdev
module so that it handles spdk_bdev_unregister() correctly.

Currently, when an lvol bdev is unregistered, this causes the associated
lvol to be deleted; this isn't the desired behavior, since
spdk_bdev_unregister() is just meant to drop the currently-exposed bdev,
as in a hot-unplug event, not destroy the backing storage.

The current implementation of the new destroy_lvol_bdev method still
calls into the exsting (broken) spdk_bdev_unregister() path, but this at
least lets us fix the existing delete_bdev RPC callers that really
intended to destroy the lvol.

The next step is to make vbdev_lvol_destroy() call spdk_lvol_destroy()
instead of unregistering the bdev, which will require cleanup in the
generic lvol layer to remove the close_only flag.

Change-Id: Ic4cb51305d31f6d7366a82ba7bf7b19ebbcd3e9c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408084
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-24 21:33:56 +00:00
Seth Howell
e3263286d3 test/nvmf: confirm kernel finds NVMe-oF namespaces
In Fedora 27 the nvme program returns before the kernel has loaded the
namespces associated with the subsystem. This patch ensures that those
namespaces can be enumerated by the kernel before we run any tests on
them.

Change-Id: I77505ed5cd5b1118a841650851fa5ecaf76f5619
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/407829
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-16 19:25:37 -04:00
Tomasz Zawadzki
b7f049070d test/nvmf: update test scripts from ifconfig to iproute2
iproute2 tools are more up to date and offer broader capabilites,
thus should be used whenever possible.

This change was prompted by "ifconfig -s" cutting interface names,
not allowing for ones that are longer than 8 letters.

Change-Id: I38462f8498207aa0b0d24d1c0b1769c1ba59f0ea
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/407395
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-12 13:19:39 -04:00
Tomasz Zawadzki
5ee127aa2c test/nvmf: fix new line when searching for soft roce interfaces
When combining two lists with of rmda_nics and all_nics,
last entry of rdma_nic and first from all_nics were
combined into one.

Change-Id: I809bdb6c8cc4dcc3aec2c0964598c35fccbba8ae
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/407394
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-12 13:19:39 -04:00
Changpeng Liu
e9ee09f153 test/nvme/aer: add changed namespace list log test
Change-Id: I2cc6c494bacbeec1ba725b4b3d78a1f4a2ed39d1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/406166
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-11 16:05:09 -04:00
Daniel Verkamp
85199c8937 test/nvmf: identify NVM subsystem in kernel test
Run identify against the subsystem we configured earlier, in addition to
the discovery subsystem.  This mirrors the behaivor of
test/nvmf/host/identify.sh.

Change-Id: Ia96c46adb427239f0306d3b57588ee14742b968d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406638
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-06 18:30:58 -04:00
Jim Harris
c057ecf771 test: disable aer.sh test
Several intermittent test failures have been seen with recent
changes to this test.  Disabling it for now while the issue
is debugged further.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0634f182dab3d3d259690981474866a2037c7fce

Reviewed-on: https://review.gerrithub.io/406454
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-04 14:16:57 -04:00
Changpeng Liu
763ab88884 nvmf: add Namespace attribute notice support
Users can use RPC to add/remove a namespace to/from
existing NVMe controller, SPDK NVMeoF target will
generate an asynchronous event as an indication to
host when asynchronous event request is available.

While here, we also set the event with invalid log
identifier, so that the host doesn't need to clear
the event. Users can use Set Feature to disable
such event.

Change-Id: I93c4d752f552d3c86c53e80877aa61c093e167cc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/398759
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-04-03 17:29:56 -04:00
Daniel Verkamp
5d0b4b270e test/nvmf: remove nvmf_tgt+pmem test
This has been replaced with a pmem component-level test.

Change-Id: I3c433d9edbb4c4f0ff26d7716cd11ee9df5c0ad7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405910
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2018-04-03 14:14:29 -04:00
suman chakraborty
bc9423e229 Segfault occurs during connect to the subsystem when a namespace is added with a nsid smaller than the nsid previously added
Change-Id: I74c7b32e1713d683e5d80818724ed3b19f3dac64
Signed-off-by: suman chakraborty <suman.chakraborty@wdc.com>
Reviewed-on: https://review.gerrithub.io/405373
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-03 13:26:14 -04:00
Ed Rodriguez
c540ca01a3 test: nvmf host test script modifications to support fc hardware
This problem was discovered after an lpfc card was installed
  in one of our CIT tetbeds. When an lpfc card is installed the
  modprobe call in identify_kernel_nvmf.sh will load lpfc
  as a side effect of loading nvmet. When this happens, you
  can't unload nvmet until lpfc is unloaded.

Change-Id: I2cf63ea7d20b7dc15d73c7a8c8502fb05bef29f8
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/405518
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-30 17:39:53 -04:00
Seth Howell
8c5de263a1 test: move lib/nvme up one directory
Change-Id: I40c29b30c7098e34f2aa860612eeb82f2fb01ff3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404974
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-27 00:46:52 -04:00
Seth Howell
f9d5ed28ca test: move the bdev directory up one level
Change-Id: I6e291c3361b9b8529e4ad44c4bc41bdb4b3b2b47
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404957
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-23 19:45:09 -04:00
Pawel Niedzwiecki
b96cf2ef2a test/common: Separate failing nightly tests
Introduce RUN_NIGHTLY_FAILING flag for nightly tests
that are always or periodically failing.
A new cron job will be added to run test with this flag.

RUN_NIGHTLY_FAILING is set for:
test/vhost/readonly/readonly.sh
test/nvmf/multiconnection/multiconnection.sh
a fio job in test/lib/bdev/blockdev.sh

Change-Id: I32640c0d4b916156c2ee996a9847c7c9e64941f8
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/403985
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2018-03-21 12:52:10 -04:00
Seth Howell
f1bf28de41 test: set all coremasks to use 8 or fewer cores.
This will allow us to reduce core assignments for build pool vms to 8.

Change-Id: I405a12f2c1041f77f90add0b5d27abd75f7b948d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/403559
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:51:37 -04:00
GangCao
8f1f9137b1 test/nvme-cli: use the macro instead of hard-coded value
Change-Id: Iee2ae343d5e6a292a6c0e188903d80c794202dde
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/403246
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-09 13:10:32 -05:00
wenzhong wu
370bc8ea53 autotest: Add spdk/nvme-cli main commands test
Cover spdk/nvme-cli main commands(Porting from DTS)

Change-Id: I3afa71c5180a0143bc6c55f70b18c45bc098ec6e
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/392607
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-02 14:08:31 -05:00
Changpeng Liu
d9321520ce nvmf: add Namespace deletion RPC support
Change-Id: I1c5adcce861b8a1fc8f8c96a3a237c4c2dae61af
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/401559
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-02 13:39:23 -05:00
Seth Howell
a562812dcf autotest: add test completion tracking
Change-Id: I1ca0578a010db2ff8535505bfd981cd1c368e403
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/392240
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-01 17:13:41 -05:00
Ziye Yang
f370026edc test/nvmf: Enable the multicore test.
Purpose: This test will be helpful to find more
issues when running nvmf_tgt with multiple core
configuration.

Change-Id: I06b6bec7a258084a30677356cdf89eb7f61c4ed8
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401543
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-28 10:05:59 -05:00
Seth Howell
c9e5d2a6d0 autotest_common.sh: move to test/common
This is the first step in reorganizing the spdk test heirarchy.

Change-Id: I83467653af2da2a53251649092bed6902d6cb86e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-27 20:37:27 -05:00
Ben Walker
6285e36e5a nvmf: Add RPC methods to manage allowed hosts
Three new RPC methods are added to allow modification of the NVMe-oF
subsystem allowed host whitelist at runtime:
- nvmf_subsystem_add_host
- nvmf_subsystem_remove_host
- nvmf_subsystem_allow_any_host

Change-Id: I5c98658f949dad013165c04497cca49867022ba0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/396063
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-02-26 11:25:03 -05:00
Daniel Verkamp
1023ca7b46 nvmf: allow configuration of ns NGUID and EUI64
Add optional parameters to namespace creation to let the user pick the
namespace globally unique identifier and EUI-64.

Change-Id: Ia3eebaf22f8a64733a00a83f90cafb4977c2d07a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/399531
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-02-20 12:01:47 -05:00
Daniel Verkamp
8af4b6c40f nvmf: fix potential use-after-free in hot remove
The subsystem->ns array may be resized with realloc(), so old ns
pointers can become invalid.

To fix this, allocate each ns as a separate object, and change the
subsystem->ns[] array to point to the namespaces rather than containing
them.

Change-Id: I873502fa90cf840e4eaa9b1abd94a95afe0f737f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/399726
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-16 13:06:11 -05:00
Pawel Wodkowski
c0021d08ce test/nvmf: don't use SoftRoCE with bridges
Bridges are not working with SoftRoCE.

Change-Id: I4c600efb3b7bf85386658fd050cd2755dfc542b4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/400009
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-15 11:23:22 -05:00
Daniel Verkamp
dc6f9571c1 pep8: re-enable E302 (2 blank lines between functions)
This isn't a significant effort to fix, so let's just enable it to move
closer to the official Python PEP 8 guidelines.

Fix up the existing instances where we didn't already have two lines
between functions, and re-enable the pep8 warning.

Change-Id: I9cf5e7e32b9c6dfedbd1b0f9bc92951cbb2c8a0d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/399949
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-15 11:10:41 -05:00
Ben Walker
47b17299a4 nvmf: Add an rpc to add a namespace to a subsystem
Change-Id: I351c7bda1b32dc161c49d47fb2887595099e4be6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/396696
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-07 23:22:57 -05:00
Ben Walker
6336217e16 nvmf: Add rpc to add listeners to subsystems
The construct_nvmf_subsystem method's "listen_addresses" parameter is
now optional, and new listen addresses may be configured at runtime
using the "nvmf_subsystem_add_listener" method.

Change-Id: Ie0217c5d112e278cc0491a561753f50ed877d842
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/395556
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-06 10:29:42 -05:00
xuhuagen
43016e0328 nvmf: fix a variable name error.
Change-Id: I28b3e07c680eeb4654b5432c0f61c3477ad24ab9
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/398367
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-05 14:52:18 -05:00
wenzhong wu
52c773ce64 autotest:Add fio_plugin with nvmf lvol backend(Porting from DTS)
To cover fio_plugin as host with nvmf lvol backend.

Change-Id: I5c602d95421f1ab6d2dde660c1833c953c2e5c75
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/390381
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-25 13:44:18 -05:00