Commit Graph

106 Commits

Author SHA1 Message Date
Tomasz Zawadzki
6a8d00949b test/bdevio: setup separate suites for each target
With this patch each target has separate suite,
tests are ran just once for all setup suites.

Suite init/fini functions were added that move
current g_current_io_target ahead for next suite.

Results what works for particular bdev are of more use
rather than combination for all bdevs.
This will come useful when we want to perform RPC for only
select targets.

In case of CUnit library error, application is stopped without
returning number of failures. This is because at that point
its numbers are not reliable.

Change-Id: Ie82b6e33374841bf829da09a16a401fddd1fd81c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455199
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-27 07:48:16 +00:00
Tomasz Zawadzki
3c45798173 test/bdevio: enable RPC listening socket
Previously it was explcitly set to NULL, so that
the application didn't even setup up the socket.

Change-Id: I2174fe0ff5790efd6578807f17702978cd9cf451
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455197
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-22 15:51:36 +00:00
Tomasz Zawadzki
3f1cda12e4 test/bdevio: enable every kind of RPC to the app
Adding app_rpc and bdev_rpc allowing every kind of RPC
interaction with the app.

Change-Id: I738095686dc8ad61101a998b473df63cddc490a2
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455196
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-22 15:51:36 +00:00
Tomasz Zawadzki
84429e7bbb test/bdevio: add function to create target from single bdev
Adding ability to create targets from single bdev,
will allow to create set of targets (not all) to run tests.

Idea is for bdevio to no longer run tests on all bdevs and
shutdown right after. Rather await RPC for configuring bdevs
then start test suite on select targets via RPC.
This is first patch in that direction.

Change-Id: I8645a3c22150e8611ff8a59f740e2ebf4edb4c1f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454622
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>
2019-05-16 20:33:49 +00:00
Tomasz Zawadzki
1cb299addc test/bdevio: return failure when unable to open a bdev
Tests shouldn't disregard when opening a bdev fails.

Change-Id: I5211e9d7bcb48ed3e7e22f7480106ceeea12c23a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454621
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>
2019-05-16 20:33:49 +00:00
Tomasz Zawadzki
42cefebe1d test/bdevio: exit with error when no bdevs were configured
Tests shouldn't report success when no actual tests were ran.
Using bdevio without any bdevs configured, does not serve
any purpose and should report failure.

Change-Id: I489a0d03f5b5c2482dede56cad92befd97d24057
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454620
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-05-16 20:33:49 +00:00
Jim Harris
0f1ce06deb test/bdevio: move reset test earlier in the list
This makes sure we do some I/O after the reset.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453941
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-14 13:49:19 +00:00
Tomasz Zawadzki
9011f2401b test/raid: switch from config file to RPC
bdev_raid.sh was using configuration file (bdev.conf.in)
made for blockdev.sh. Changes in that config file affected
the raid tests.

Since the test actually only used two malloc devices as
raid bases, switching to RPC makes it simpler clearer
to understand what is used in tests. Additionally
making raid tests standalone from blockdev.sh.

Fixes issue #777

Change-Id: Ia4c5858852241a9fd8212690aefbf015c98d1b57
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453644
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-08 14:43:59 +00:00
Tomasz Zawadzki
a394f62868 test/raid: always call rpc_py with correct socket
Previously the socket was only used in single rpc call,
upcoming patch will use of the $rpc_py.
Moving socket to $rpc_py simplifies calling it in multiple
parts of the script.

Change-Id: Id1ba86740237c32a6f0259562c0b5c11d917bbcf
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453643
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-08 14:43:59 +00:00
Jim Harris
4460761f22 test/bdevio: allow reset test to fail on NVMe
NVMe-oF target doesn't support reset yet - but we want
to use bdevio to test other NVMe-oF target functionality
in the next patch.

An issue will be filed against the reset support so
that it gets added.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452935
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-05-07 05:23:31 +00:00
Jim Harris
460796a60a test/bdevio: add another nvme passthrough test
This sends a known invalid opcode.  This is useful
for NVMe-oF target testing, since the target will
decode READ and WRITE opcodes and we want to exercise
its passthrough code path.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452932
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>
2019-05-06 23:01:49 +00:00
Jim Harris
a529ff946f test/bdevio: add test for NVMe passthrough read/write
This uses the bdev nvme passthrough API to do a write
followed by a read, checking for final data integrity.
It helps verify the passthrough API is working correctly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I25fe685b0bdcb88c7537c165cc60f8df31823b24
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452931
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>
2019-05-06 23:01:49 +00:00
paul luse
47097a3fe4 test: only run hello_world bdev test nightly
May not be the long pole in the tent right now but it is 11 secs
to make sure our example app is working, it adds no nvme coverage
so move it to nightly instead of per patch.

Change-Id: I779a9f2a6951b3c51a82403c8cf085a251fb955c
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452801
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>
2019-05-06 17:54:34 +00:00
WangHaiLiang
2237e0e72d bdev/raid: Print a message indicating that RAID tests were skipped
RAID tests are skipped when the OS is not Linux or if nbd isn't available.

Change-Id: I141a01603f849d38a1772686a0747beb08f7c265
Signed-off-by: WangHaiLiang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451723
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@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-05-01 17:44:21 +00:00
Jim Harris
196b8e6f27 test/crypto: move gen_crypto.sh to test directory
This script is not general purpose like gen_nvme.sh,
so move it to the test directory at least for now.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451785
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-04-26 11:18:09 +00:00
Jim Harris
629c109282 test/crypto: always test aesni, even if qat is available
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I138de9ef2b4e1b7f6e228c159fe447d6135e63d0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451784
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
2019-04-25 05:36:13 +00:00
Ben Walker
14bf912df9 bdevperf: Use new zcopy API for reads
Change-Id: I71023d56f9023f46ff65291d22b1b8d31595a7b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/416579
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: Jim Harris <james.r.harris@intel.com>
2019-04-23 18:38:39 +00:00
Xiaodong Liu
efdd6edba2 nbd: optional nbd_device in start_nbd_disk
Enhance RPC method start_nbd_disk to take nbd_device as
one optional parameter. If it is not assigned, automaticly
choose an available nbd device path from /dev/nbd0 to
/dev/nbdN.
For github issue #324:
https://github.com/spdk/spdk/issues/324

Change-Id: I72c064d8bd476df342f5aa0af4d6120eb021c7ed
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/440453
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>
2019-04-04 08:35:50 +00:00
Piotr Pelplinski
de5f53220c notify: add notification library
This patch adds library that will provide ability to notify about
events. On one side each spdk library can specify what kind of
notification it can produce and on the other side libraries can fetch
those notifications.

Example is bdev module, which lib notify about added or removed bdev.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Change-Id: Ia95e564a8a43400b2745d9de8217b9cc84cd1b16
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-29 21:15:14 +00:00
Ben Walker
deb8ee5c33 event: spdk_app_start now takes spdk_msg_fn
This callback type takes 1 argument instead of 2.

Change-Id: Ic3710fafb2828f08fc064f7658849b3d20521092
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446997
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>
2019-03-19 15:54:34 +00:00
Ben Walker
362879570a event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where
the start up action is a thread message instead

Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Xiaodong Liu
3d951cd321 bdev/raid: enable unmap support
Change-Id: If0e3c483ce16680ecea0252c389e134c59b2793e
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441309
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-28 04:22:39 +00:00
Jim Harris
af46393e1d bdevio: fix opts.name
This utility used to be called "bdevtest" so that's
what opts.name was set to for spdk_app_opts_init().
Change it to the new name "bdevio".

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

Reviewed-on: https://review.gerrithub.io/c/445800
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-02-25 07:06:04 +00:00
Shuhei Matsumoto
8696cd4288 dif: Add seed value for guard to avoid 0 in case of all zero data.
Allow user to add seed value for guard compuation to DIF context.
This will avoid the guard being zero in case of all zero data.

NVMe controller doesn't support seed value for guard computation
explicitly, and hence if we want to use such a seed value in
NVMe controller, we have to format metadata more than 8 byte,
and add seed value into the reserved metadata field.

But some popular iSCSI/FC HBAs and SAS controllers have supported
seed value for guard computation, and so supporting seed value
in the SPDK DIF library is very helpful for some use cases.

Hence this patch makes the DIF library possible to specify seed
value for those use cases.

Change-Id: I7e9e87cb441bf263e64605c7820409fdc22dd977
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444334
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>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
2019-02-22 17:52:51 +00:00
Shuhei Matsumoto
8ad0935b81 bdevperf: Fix incorrect error detection and log for IO size
g_io_size is already verified not to be zero when args are originally parsed,
and if g_io_size < data_block_size, then g_io_size % data_block_size != 0.

So current error log is not correct and just testing if IO size is multiples
of block size will be correct.

Change-Id: I5d32425e251773f1c96740c674b4d238dfb80f8d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444310
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-02-13 06:42:11 +00:00
Shuhei Matsumoto
3c3510a2fd bdevperf: Support DIF enabled bdevs
Extract DIF check type settings from the bdev and hold them
in the target, then generate DIF for write I/O based on them.

Change-Id: Ice85121423b6b8545e45d7def1aabed59ed6ce8e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
ee23785130 bdevperf: Enlarge data buffer to include metadata
Enlarge data buffer to include metadata if md_size is not 0 and
md_interleave is true of target bdev. Then generate and verify
data pattern by skipping metadata field.

If md_size is not 0 but md_interleave is false, return immediately
until bdev supports APIs with separate metadata.

Change-Id: Ia3c2ae5fbcc5b7612585f1dfeb5d30e821d48acf
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443356
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
530ae91505 bdevperf: Factoring out construct task on target operation into a function
The possible reason of failure of task construction is out of memory.
Hence it's OK to return pointer to the constructed task simply.

Change-Id: If6e270caefb61192c8f0055506d957c3c5d07016
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443355
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
fdf7e1bcb2 bdevperf: Factoring out construct target operation into a function
Bdevperf have returned immediately if -ENOMEM, continued if failure
due to other reasons, and registered the created target otherwise.

So, keep this behavior by passing the reference to the pointer to
struct io_target, and check both return code and the value of the
reference.

And this refactoring will clarify the logic related with target
assigment to cores.

Change-Id: I24593f7b4523daf4395643bdc8886499c36ea3c7
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443354
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-13 06:42:11 +00:00
Shuhei Matsumoto
14c18abb7a bdevperf: Add the prefix "g_" to coremap
Coremap is a global variable in bdevperf, and add the prefix "g_" to
it.

Change-Id: Ia22802ce2152d8748cffc6916197be4ddd615618
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444013
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: Jim Harris <james.r.harris@intel.com>
2019-02-12 17:57:25 +00:00
Jim Harris
d593193fd3 bdevperf: fix -S in usage message
-S takes a parameter for how many seconds to wait
between each stats output - that was missing in the
usage message.

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

Reviewed-on: https://review.gerrithub.io/c/443282
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-05 17:25:31 +00:00
Pawel Niedzwiecki
2240a8b2ef test/nightly: Add tests to RUN_NIGHTLY_FAILING.
Test case in blockdev.sh is causing nightly tests to fail
so put it back to nightly_failing list.
Put vhost read-only test on the list to check if it passes
on qemu 3.0.0. Bring back vhost live migration test since it
is missing vhost.sh.

Change-Id: Ic8b5341808cdf843850d22fb6a22a64e92dccafa
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/436840
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-02-01 13:16:35 +00:00
Jim Harris
ab696ae1cf bdevperf: remove extra blockdev_heads_destroy() in failure path
The stop handler already calls blockdev_heads_destroy(), so we
don't need to call it if bdevperf_construct_targets_tasks()
fails.  Calling it twice actually results in double-frees and
other types of memory corruption.

Fixes #592.

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

Reviewed-on: https://review.gerrithub.io/c/442628
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: Changpeng Liu <changpeng.liu@intel.com>
2019-01-30 06:37:49 +00:00
Shuhei Matsumoto
b78e763c1a string: spdk_strtol to delegate additional error checking
Error check of strtol is left to users of it. But some use cases
of strtol in SPDK do not have enough error check yet.

For example, strtol returns 0 if there were no digits at all.

It should be avoided for each use case to add enough error checking
for strtol.

Hence spdk_strtol and spdk_strtoll do additional error checking
according to the description of manual of strtol.

Besides, there is no use case of negative number now, and to keep
simplicity, spdk_trtol and spdk_strtoll allows only strings that
is positive number or zero.

As a result of this policy, callers of them only have to check if
the return value is not negative.

Subsequent patches will replace atoi to spdk_strtol because atoi
does not have error check.

Change-Id: If3d549970595e53b1141674e47710fe4dd062bc5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-29 00:10:57 +00:00
Piotr Pelplinski
0656ba9437 histograms: tests for bdev histograms
This patch adds tests for bdev histograms using bdevperf.

Patch also adds bdev_rpc dependency in bdevrpc Makefile
to enable histograms RPC calls in bdevperf.


Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I1e0e94933936864df441e49f0016f9aa7705a7e2

Reviewed-on: https://review.gerrithub.io/c/437640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-01-24 21:50:18 +00:00
GangCao
316cb3b150 QoS/Bdev: add the Read/Write separate bandwidth rate limits
This patch adds the support of read and write separate
bandwidth rate limits control with the configuration file.

Below is the example (in MiB) for the configuration section:

[QoS]
  Limit_Read_BPS Malloc0 100
  Limit_Write_BPS Nvme0n1 200

Change-Id: I0221516ce70c3fbb07b9e80c1c814ed5ba271c88
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/416672
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: Ben Walker <benjamin.walker@intel.com>
2019-01-22 23:21:43 +00:00
Chunyang Hui
35cdee26ad bdevperf: add check functions for input parsing
Change-Id: I71f927bb809f3465a70f0329c2c5609088ec60b4
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440829
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-01-22 14:05:57 +00:00
Chunyang Hui
26979c50c7 app/parse: add default return value for app parse function
Change-Id: Icae46bb96502c7edf3a453e0fff1d8560241c5ab
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441277
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-01-22 01:03:39 +00:00
Chunyang Hui
01e5610da8 parse: add return value to app_parse callback
Need to check user input and return status of parsing
to prevent app or target from crashing.
Input checking function will be added in the future.

Change-Id: I8167ac13306ae4f81e2cacb80edd9dcf9382c374
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439479
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>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-18 10:08:09 +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
Jim Harris
5b16c18d17 build: move app rules to spdk.app.mk
This removes a ton of duplicate from a lot of
Makefiles.  Note that spdk.unittest.mk still keeps
its own app rules, and now just includes
spdk.app_vars.mk instead.  Fixing Makefiles that
include this .mk file requires more work that is
deferred for now.  We do need to add the
"install: all" rule explicitly to this .mk files.

Note that Makefiles need to include spdk.app.mk
now at the end of the file, so that things like
APP and SPDK_LIB_LIST are defined before including
it.

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

Reviewed-on: https://review.gerrithub.io/434283
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-12 22:35:21 +00:00
Jim Harris
20c69bbc30 env: remove default pre-reserved memory size
Much of this was originally applied by Darek in
6f5840d22 but then had to be reverted due to NVMe-oF
MR issues in a817ccf5.  Now that the NVMe-oF MR issues
have been resolved, we can reapply these changes.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I58d603523901c78dbc81279078a09b2a24c091e6

Reviewed-on: https://review.gerrithub.io/436547
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>
2018-12-12 11:00:57 +00:00
Pawel Niedzwiecki
7d9ed0cf42 test/nightly: Update RUN_NIGHTLY_FAILING list.
remove from the list test cases from rocksdb.sh
add vhost live migration tc1 and tc2

Change-Id: I2e7beff62e9c54ea86481832c29c613357e19c99
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/429480
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2018-12-11 00:03:31 +00:00
Jim Harris
5704be8987 build: remove xx_MODULES_LINKER_ARGS and xx_MODULES_FILES
Application Makefiles can now just add xx_MODULES_LIB_LIST
to SPDK_LIB_LIST.  This is possible now since all
SPDK libraries are linked with --whole-archive, so there
is no need to differentiate between "modules" libraries
and other SPDK libraries.

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

Reviewed-on: https://review.gerrithub.io/434277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 16:43:01 +00:00
Jim Harris
0cc8f76225 build: remove unused LINKER_MODULES
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I944a2cd3fb646ce96c58412c72fdd299651ca148

Reviewed-on: https://review.gerrithub.io/434276
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>
2018-11-28 16:43:01 +00:00
Jim Harris
42b6771f40 build: add ALL_MODULES_* variables to spdk.modules.mk
This allows a lot of simplification to SPDK application
makefiles.

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

Reviewed-on: https://review.gerrithub.io/434274
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-28 10:21:45 +00:00
Jim Harris
3da5847023 build: add ENV_LINKER_ARGS to LINK_C and LINK_CXX
This allows us to remove $(ENV_LINKER_ARGS) from all of the
application Makefiles.

Modify spdk.unittest.mk to explicitly set ENV_LINKER_ARGS
to nothing, to avoid DPDK libraries from getting linked
into unit tests.  This seems better than creating separate
LINK_C rules for unit tests.  Provide a UNIT_TEST_LINK_ENV
flag to allow select unit tests to override this behavior -
it's needed for some of the env unit tests.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I647f2c848cf434023cf5a1f3a45869bbc4fc8102
Reviewed-on: https://review.gerrithub.io/434145
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 10:21:45 +00:00
Jim Harris
0b5fa082db build: remove sock from SOCK_MODULES_LIST
The various *_MODULES_LIST are intended for the modules
that implement the specific interface - not for the
associated core library itself.

For example, BLOCKDEV_MODULES_LIST doesn't contain bdev,
it contains all of the bdev modules.  Similar for
COPY_MODULES_LIST and copy.

So make SOCK_MODULES_LIST consistent.  This is a real
pain because we have to add sock explicitly to a bunch
of individual Makefiles, but I have plans to clean that
up in some future patches.

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

Reviewed-on: https://review.gerrithub.io/434125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-28 08:13:46 +00:00
Jim Harris
50656e7a07 test: modprobe nbd at the start of autotest
This helps avoid issues with nbd not being ready when
we need it.

Still keep various "modprobe nbd" in different test
files - this ensures these test files can still be
run in isolation.  But remove the various "rmmod nbd"
to ensure that nbd always stays loaded.  There is no
harm in just keeping nbd loaded all the time.

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

Reviewed-on: https://review.gerrithub.io/434838
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-26 18:17:28 +00:00
Pawel Wodkowski
bf9dbae56b tests: wait for each start and stop nbd disk RPC
This workaround is needed to stop EBUSY errors from NBD ioctls(). This
can be fixed in NBD bdev code but till that point lets merge this
workaround.

Change-Id: Ic1546963538beda4d4409cef93062103e2a23e34
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/434040
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-21 07:28:31 +00:00