Commit Graph

4011 Commits

Author SHA1 Message Date
Seth Howell
19260848f6 nvme: publicly declare spdk_nvme_transport
This will be useful in the upcoming spdk_nvme_poll_group api.

Change-Id: Id83340a2ce9887817312f5aac38db4de8c588974
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/577
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:05:08 +00:00
Ziye Yang
c515a7cab7 sock ut: enable the posix_ut testing in auto test.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1c3e68430c44d54ccdc2d42f6c59b1df265f96e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/917
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>
2020-02-18 08:05:00 +00:00
Karol Latecki
71efe5db24 Fix Markdown MD026 linter warnings - trailing punctuation in header
MD026 Trailing punctuation in header

This rule is triggered on any header that has a
punctuation character as the last character in the line

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
93be26a51d Fix Markdown MD022 linter warnings - headers blank lines
MD022 Headers should be surrounded by blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I768324b00fc684c254aff6a85b93d9aed7a0cee5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/656
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
a41c031609 Fix Markdown MD012 linter warnings - multiple blank lines
MD012 - Multiple consecutive blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3f48cdc54b1587c9ef2185b88f608ba8420f738b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/654
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>
2020-02-17 10:07:21 +00:00
Shuhei Matsumoto
aefe3fe23c lib/iscsi: Remove dry run processing from portal config file parsing
Dry run processing in iscsi_parse_portal() now only checks if
portal string is not NULL. Portals are managed not by fixed size
array but linked list now. Hence dry run processing is not needed
itself now.

So remove the dry_run parameter from iscsi_parse_portal() and
the dry run loop in iscsi_parse_portal_grp().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib7cb444b51581b8ee603388aad34bc58d1cc9023
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
5adeda4807 lib/iscsi: Send message to add connection to poll group even at startup
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI configuration management will be done by
different thread from these poll group threads.

Hence send message explicitly to add connection to poll group even
at startup. We can do this for the current master branch.

Remove some code related with SPDK thread framework from unit tests
for iSCSI portal group because thread management is moved to
connection.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I40cacdb2066f65866f7ef83cf3b3e4e8b8cd322e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/489
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>
2020-02-17 10:06:47 +00:00
Alexey Marchuk
c3ba9127d0 nvme: Store NVMEoF ioccsz and icdoff in ctrlr structure
This allows to avoid calculation of ioccsz bytes on each request
and removes access to "cold" ctrlr structures in data path.
Add UT to check validness of calculation

Change-Id: I55ceff99eb924156155e69a20f587a4f92b83f0b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/519
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: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Tomasz Kulasek
5b3c4b8783 test/nvme: nvme_rpc add test for bdev_nvme_apply_firmware
This patch introduces tests for basic RPC commands not used in
other tests:

	bdev_nvme_apply_firmware

Change-Id: I3a7aff1720108548b03d581fa7664d1ff5498be5
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/533
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:00 +00:00
richael zhuang
94b04d4f2c test: solve error about uninitialised data_buf
When running sock_ut in fedora29 with memcheck, there is an error
"Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised
byte(s)".

Signed-off-by: richael zhuang <richael.zhuang@arm.com>
Change-Id: Iaddb85ed2da2f45e200569c936f05174bc89c99b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/874
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>
2020-02-17 10:05:18 +00:00
Darek Stojaczyk
8e7d6e1b0c app: added --json-ignore-init-errors
If set, SPDK will continue loading the JSON config even if
some commands caused an error. This can be useful when loading
RPC config from spdk_tgt into e.g. bdevperf, which supports
only a subset of RPC commands and would usually fail with
"Method not found" message.

Resolves #840

Change-Id: I070fea862fd99e5882d870e11e6a28dc9d0c8ba6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:53:02 +00:00
Ziye Yang
17cdadf5a9 test/hello_sock: Refactor the program and add -N option
This option is used to make hello_sock can use the
designated sock implementations. We need this patch
since we will provide another uring implementation.

So better to pass the name. Otherwise if the users have
many different implementations, VPP implementation
could not be the highest priority for test.

Change-Id: Ibb3862e9e6588743ec9c01074904ed4f7c9c06a5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/478
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-13 09:51:46 +00:00
Tomasz Zawadzki
01f2a6e0b1 test/nvmf: make check_ip_is_soft_roce() more generic
Sample output from rxe_cfg:
  Name        Link  Driver  Speed  NMTU  IPv4_addr        RDEV  RMTU
  eno1        yes   tg3            1500  192.168.100.1    rxe0  1024  (3)
  eno2        no    tg3            1500  192.168.100.2    rxe1  1024  (3)
  eno3        no    tg3            1500  192.168.100.3    rxe2  1024  (3)

Sample output from other systems rxe_cfg:
  Name  Link  Driver  Speed  NMTU  IPv4_addr  RDEV  RMTU
  ens3  yes   e1000                           rxe0  1024  (3)
  ens4  yes   e1000                           rxe1  1024  (3)

Looking at the above output, amount of columns after greping particular line
varies between systems and configurations.

Meanwhile "rxe_cfg status" is an equivalent command, but allows to add
argument that will be matched to RDEV name.

With this patch we no longer depend on awk to select columns, but instead
printout all soft roce enabled devices and grep for particular dev name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id4483c58f0fdcef2f38abdf56257658643a3069f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/619
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-13 09:51:38 +00:00
Tomasz Zawadzki
17d9050f5f test/nvmf: remove unnecessary check for soft_roce in nvmf_lvol
It is a leftover from previous structure of this test.
Since then usage of SUBSYS_NR was removed and this part
was left unused.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia1f6f8046f82370e793182b47920b4bf4d3231a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/618
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:51:38 +00:00
Shuhei Matsumoto
e038e096e3 lib/thread: Fail spdk_thread_exit() if thread has active I/O channel
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

The comment in the header file has already said that all associated
I/O channels must be released before calling spdk_thread_exit().
This patch actually checks if it is satisfied in spdk_thread_exit().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56ac50b561c6ca91d3dc2d60c21c8d91d38f081b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/823
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
648d6cd5dd lib/thread: Fail spdk_thread_exit() if thread has any registered poller
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EBUSY if the thread has any
registered poller. We enforce all pollers including paused poller
are unresitered before the thread is marked as exited.

By this change, a bug was found in reactor_perf test tool. Fix it
by adding spdk_poller_unregister() and add the g_ prefix to avoid
future potential errors.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7f40357c9a6f4101b3998ea0da3cc46cc435031
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
70ec72871e lib/thread: Fail spdk_thread_exit() if thread is already exiting
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EINVAL if the thread is already
marked as exited.  This will be helpful to detect wrong call sequence
of voluntary thread termination.

Besides, update reactor shutdown and unit test framework shutdown
to incorporate this change accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2296c61e273bf4d9580656dcbc2da0e8a8f3bcf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
13595495a1 lib/thread: Stop new I/O channel after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

By the last patch, the asynchronous release of I/O channel will
complete even after spdk_thread_exit() because pending messages will
be reaped.

Then this patch stops new allocation of I/O channel after
spdk_thread_exit().

Hence we will be able to release all I/O channels for exiting
thread within finite time.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I48a45bcba7c4b2c62d8c9d398ac35a584b533627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
d7393e2e4f lib/thread: Stop and reap pending messages after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Previously, the exiting thread had discarded all pending mesasges.

We change this to stop accepting any new message in spdk_thread_send_msg()
and reap pending messages in _spdk_msg_queue_run_batch().

Add unit test case for the new behavior. Adding g_ prefix to global
variables for clarification is done together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida78e7bb1b86357602aea6938dd514897b67edd6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
f2576eb05b ut/thread: Fix bugs in test case for_each_channel_remove()
The test case for_each_channel_remove() did not have any
assertion and the count was not incremented correctly.

This patch fixes several issues in for_each_channel_remove()
by counting spdk_get/put_io_channel() and spdk_for_each_channel()
correctly and achieves what we wanted to do in this test case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iceffd924f8887452bd7dad48e30d121874ab0b05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:51:15 +00:00
paul luse
93bb4fe598 script: update pmem test script
remove revs to a gerrithub review and a test plan doc
that no longer exist

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I05f4466181e27f60e1e717c42649726ad46f0cac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/453
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>
2020-02-12 12:07:30 +00:00
Michal Berger
a8d016910a test/common: Make sure that extdebug is enabled as soon as possible
if given script, which executes under the debug tracer, fails before
xtrace_restore() is called, the BASH_ARGC[] will miss all the arguments
which were passed down till that very point. Similar case can be
experienced after tracer is disabled as then all the arguments hold by
BASH_ARG{C,V}[] become unavailable (i.e. until tracer is enabled again).

Since there's no actual benefit from toggling the extdebug (in fact, it
could break DEBUG|RETURN traps if ever used), enable it once when
autotest_common.sh is sourced and keep it enabled throughout entire
execution of given script.

Change-Id: I01001ead1570967a2e550d993f85f12b9f62553e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/477
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>
2020-02-11 08:38:08 +00:00
Shuhei Matsumoto
5780ad9638 bdevperf: Change return type of bdevperf_test() to void and include its error handling
Subsequent patches will call bdevperf_test() as callback to
bdevperf_construct_targets(). Changing return type of bdevperf_test()
to void and including its error handling will make the code cleaner.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30fe38cfb73fbc593d079d5b66a540c0ce96fe19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/636
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>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
3673217aa3 bdevperf: Move target management functions close to the caller
_end_target() is an exception, and move just above bdevperf_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2197a3b7ceb36ab29f0b69e31f3babd4e996f193
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/635
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>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
9226dcce43 bdevperf: Put RPC main handler next to command line main handler
Put rpc_perform_tests() next to bdevperf_run(). This will improve
readability a little.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8816a88be13e794f39ded3ff12e9a76e40c8282a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/514
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
00f1443eb7 bdevperf: Move down help command / usage functions in a file
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I326b3c7e60a7aacce9a692c41dcfd0fc19825444
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/513
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:26:28 +00:00
Shuhei Matsumoto
f7f504cf42 bdevperf: Delete g_min_alignment and g_buf_size and use per target variables instead
Remove two global variables and use variables per target instead.

g_min_alignment:

Bdevperf creates task on a target after creating the target, and
we has removed any limitation about alignment described in the comment.

Remove g_min_alignment and use each bdev's alignment to call
spdk_zmalloc() instead.

g_buf_size:

We had set the size of task->buf by not g_buf_size but g_io_size
by mistake.  We have not used any global buffer pool and can use
buffer size per io_target instead.

Delete g_buf_size and add buf_size to struct io_target.  Then
initialize target->buf_size in bdevperf_construct_target() and use it
instead of g_buf_size including the fix in
bdevperf_construct_task_on_target().

Besides, as a minor cleanup, remove duplicated initialization of
global variables in this patch. Global variables are already
initialized at their definition. Remove duplicated initialization
from main() function. It is ensured that global variables are
automatically zeroed but write initialized value expilcitly for
compatibility and clarification.

These will be helpful to parallelize targets and tasks management among
multiple threads.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iba23dec3e1da8810da7523da09bae858eb4484a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/512
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:26:28 +00:00
Alexey Marchuk
63c50be82e test/nvme: correct nvme controller version
nvme_ctrlr_identify_active_ns checks ctrlr.vs bits but not ctrlr.cdata.ver

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I2d2e4e81de7308dc275f48fda52d7d3ab0cdb74d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/505
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:25:38 +00:00
Alexey Marchuk
93988db982 test/nvme: add tests to cover spdk_nvme_wait_for_completion
Change-Id: I5dc600b6ae7993d93494092d5fb4a81f840a06a9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:25:38 +00:00
Pawel Kaminski
1fd96c85b4 test/vhost: Replace old style config with json in initiator test
Change-Id: I622448dcd1de960793894395d7da55ebd612dcc7
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/529
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:25:11 +00:00
Wojciech Malikowski
97f3ad2d8b lib/ftl: Change _ZONE_STATE_CLOSED to _ZONE_STATE_FULL
Ftl should operate on SPDK_BDEV_ZONE_STATE_FULL instead
SPDK_BDEV_ZONE_STATE_CLOSED.

Change-Id: I9ede78e3a1097490c1eb924f9e009fa166a7f3d6
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/553
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-02-10 10:24:38 +00:00
Michal Berger
83086b5973 test/blobfs: Refactor exit behavior
The on_error_exit() function was being called via the local ERR trap
to cleanup after the tests in case any failure occurred during the
execution. However, this was masking the backtrace trap so the
on_error_exit() had to also call print_backtrace() to compensate -
this was resulting in an additional function being unnecessarily
placed onto the stack and included in the actual backtrace.

Avoid the above by refactoring on_error_exit() into simple cleanup()
function called upon exit()ing from the script. The rationale is that
cleanup has to happen regardless if the script failed or not and
elements like $conf_file are always created from the very scratch by
the script itself anyway prior running the tests.

Change-Id: I6bb8f4155525037624f0bd5aab288f8c502141f6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/456
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:24:01 +00:00
Michal Berger
a11aab73e8 test/common: Check if igb_uio is loaded before removing it
igb_uio doesn't necessarily have to be loaded into the kernel as SDPK
still may be built with support for it but only particular set of
tests is actually using it. If such a condition is met then rmmod will
fail the entire test run since it always exits with != 0 if given
module is not found.

Avoid this by checking first if igb_uio is actually in use.

Change-Id: Ib97488797c657f810b588a0b427e578807ebe6c6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/625
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:23:39 +00:00
Karol Latecki
3d8a0b19b0 doc: Fix Markdown MD032 linter warnings
"MD032 Lists should be surrounded by blank lines"
Fix this markdown linter error by inserting newlines or
adjusting text to list points using spaces.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I09e1f021b8e95e0c6c58c393d7ecc11ce61c3132
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-02-06 09:46:06 +00:00
Seth Howell
a9a472b99b scripts: update to point to review.spdk.io
Change-Id: I10c79cd421bd735ced2e17919cfa38abec74edf2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/451
Reviewed-by: Jim Harris
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: <sys_sgci@intel.com>
2020-02-04 23:05:51 +00:00
Michal Berger
9ba80de0dd test/nvme: Don't wait for spdk_stub0 if stub dies prematurely
If stub terminates right after execution, e.g. due to lack of system
resources (requested number of cpu cores to run on, right amount of
memory, etc.) start_stub() would end up blocking forever since there
wouldn't be any entity around that would mknod spdk_stub0 for it to
break the loop.

Avoid the above scenario by checking if $stubpid is still visible
under procfs and return if it goes missing.

To make sure kill_stub() is still called to clean up after start_stub()
declare proper trap prior the call to start_stub().

Additionally, avoid potential stderr noise in case kill|wait are told
to act on a PID that's not visible in the ns anymore.

Change-Id: Ief41200c57957f84b4f96a54baabc8da1f27dd43
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482653
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>
2020-02-04 20:22:23 +00:00
Michal Berger
4b1dbc948b test/common: Don't take randomize_va_space default setting for granted
Currently, kill_stub() doesn't gracefully handle this particular sysctl
since it overwrites it with assumed default that doesn't necessarily
have to be a part of kernel's config on a given system.

Don't presume what the setting should be, instead, read and save the
current value and try to restore it whenever kill_stub() is called.

Change-Id: I1f1ee85c29d5e2ec2f442a54f700e3bc45ee2437
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482652
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>
2020-02-04 20:22:23 +00:00
Tomasz Zawadzki
16cc6464db lib/log: do not put trailing whitespace in fdump
fdump puts out buffer in following format:
"00000000  76 61 6c 00                                        val.            "

Each buffer is displayed with hex values up to maximum, then
followed up with a value. This is done to keep starting value
with the same alignment between each consecutive line.
Value contents should end at its length instead of
adding trailing whitespace.

After this patch, output is changed to:
"00000000  76 61 6c 00                                        val."

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I26b327e83f296ba3865f1a337f4a70764a80e2b0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483706
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>
2020-02-04 20:08:02 +00:00
Tomasz Zawadzki
2d687618f3 test/match: do not ignore all input when passing \n
Match script before this change ignored all input
when passing just a new line in ignore file.
This was because \n symbol was stripped from that
particular line (chop()) leaving empty string.
This always matched all of the input when using index().

Now when comparing the input line and ignore line,
we check that ignore line is not empty.

Besides that, to still allow ignoring new lines
we check and compare both strings directly.

Changed chop() to chomp() to prevent further breakage,
difference is that chomp() only strips new line characters.
As that was the original intention anyway.

The loop changed so we exit on first instance of ignored
line matching, rather than mention particular line
multiple times for each matched ignore.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I62d48e1130c600ffff6713d2748239cc955bbe9e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483834
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>
2020-02-04 20:08:02 +00:00
Tomasz Zawadzki
dc06a06d12 test/blob: fix match tool with blobcli
Empty line in ignore file caused all output from the match
tool to be ignored. This made the test to always pass,
regardless of changes made.

Next patch in series will be fixing the match tool,
meanwhile this patch focuses on making the blobstore
test match and ignore files right.

This patch adjusts match file in following ways:
- keep EAL and crypto output up to date
- use $(N) to match any blob id
- adjust out of date xattr value print

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia0a2312d9691487acbdd06dc08451232171cc46d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483705
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>
2020-02-04 20:08:02 +00:00
Darek Stojaczyk
a531e9d70c test/lvol: rewrite destroy_lvol_store_nonexistent_lvs_uuid to bash
Again, smuggle it into one of the existing test case
to create more opportunities for this test to fail.
We'll now trying to remove an inexistent lvolstore
when there's a valid lvolstore present.

Change-Id: I64a72a8ffe38ba6939d0818d2c6c81e49748a33c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462468
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: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
0fa664624c test/lvol: rewrite delete_lvol_store_underlying_bdev to bash
This test case is about hotremoving a malloc with
an empty lvolstore on top. We rewrite it to bash,
but also introduce one more similar test case but
with a single lvol in the lvs.

Change-Id: Iea9666080fe5e73befd97ec5e0b2898d8b30ecd6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462467
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: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
9751011fa9 test/lvol: rewrite destroy_multi_logical_volumes_positive to bash
Change-Id: Ia9e2bc269c4c7ee77afca3b001a6ef52612c5264
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462466
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: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
e9c4aaf260 test/lvol: rewrite bdev_lvol_delete_lvstore_with_lvol_bdev_positive to bash
Those test cases were basically testing hotremove, so
that's how we're going to name them now.

Change-Id: Ib79ab7e50e3022df981f7092436b0a0991d5c9b9
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462189
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>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
713a14bd2e test/lvol: rewrite destroy_lvol_store_use_name_positive to bash
The test case covers destroying the lvolstore using its
human-friendly name instead of uuid. We destroy lvolstores
all over the basic construct tests, so we just smuggle
one removal by name into one of those existing test cases.

Change-Id: I5027382f727be226f601573367bfcd214baf474a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462190
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>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
26b840163c test/lvol: verify the same lvs can't be deleted twice
We didn't really test it so far.

Change-Id: I58e57a47465e3c4bc409d497706a56c7aa5cdaa1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462465
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
a551ad8756 test/lvol: remove destroy_lvol_store_positive
We already perform the same steps as a part of different
test case in basic.sh.

Change-Id: I0e1931307b3de69df95b2a2994b87147028677e1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462464
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
cf628b09d0 test/lvol: test resizing lvols using their names
We did not test it so far.

Change-Id: I0769c31691535b5d8f9c49e07899f035208efebb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462188
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
9d044f25f1 test/lvol: test resize with ongoing I/O traffic
Resize tests were extremely basic so far, extend them
with a test case that actually tries to do some I/O
before and after the resize.

I would like to keep it as a separate test case,
because it uses NBD which used to be quite buggy at
some point. If the resize tests fail on this new test
case, it means the previous very basic resize tests
have passed and the lvol resize functionality itself
doesn't show any failures - this might potentially
simplify some root causing later on.

Change-Id: I7ee45243ee4fc025fc71f6eee4c946211c07a78a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462187
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>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
4c945d2332 test/lvol: rewrite negative resize tests to bash
Change-Id: I8f8daa5e1afd747712f8d562966486b7618ba047
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462186
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00