Commit Graph

4280 Commits

Author SHA1 Message Date
Ben Walker
ded0c2d146 bdevperf: Break code for running a job into a separate function
This will make some refactoring later a bit clearer.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iae2c36d1c298377cd20cf3226b3b8dfe712484ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-14 11:32:35 +00:00
Ben Walker
5dfd4f261f test/nvmf: Restart target between shutdown tests
For RDMA, it seems we may have to wait out some timeouts to
reset all of the connections to make this test work reliably. Instead,
just restart the target for each test.

If there's a way to force close all of the connections properly in the
future we can go back to running these all on a single target.

Change-Id: If79257349007765dc16bacebf810312a025d70a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1609
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-14 11:32:35 +00:00
Michal Berger
64cfaf3f16 test/lvol: Add function to handle output from simple jq queries
This function exposes assoc array which consits of fields extracted
out of the parsed jq output.

Change-Id: I189c5c01e6efd60d6f2010df90093920a5d37690
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/778
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:56:21 +00:00
Darek Stojaczyk
eb33c9a659 test/lvol: rewrite construct_lvol_store_with_all_clear_methods to bash
Change-Id: Iaafa521f420d677834f01fd13f56b3aa9e9cf49d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/709
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-04-10 07:56:21 +00:00
Michal Berger
a317fccab7 test/lvol: rewrite thin_provisioning_filling_disks_less_than_lvs_size to bash
Change-Id: Iec5277f86e2f663eafd2c4c32515c2bf30a1e068
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/708
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
0e6ee49e3c test/lvol: rewrite thin_overprovisioning to bash
Change-Id: I0cef2a609c2c57708f1cb62ff17025d4643b0ac4
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/707
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
e4442af984 test/lvol: rewrite thin_provisioning_resize to bash
Change-Id: I0241a4c435a3b28951edcdd7f4aa6a5120a7dc8a
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/706
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
661adc77c3 test/lvol: rewrite thin_provisioning_data_integrity_test to bash
Change-Id: I9a955143917ecad991a16429d6c7f4aff55acacf
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-04-10 07:56:21 +00:00
Pawel Kaminski
7d0cd374b3 test/lvol: rewrite thin_provisioning_read_empty_bdev to bash
Change-Id: Id4609dbd3ac196dca13395007831b11e01af70b9
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/704
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-04-10 07:56:21 +00:00
Michal Berger
42fc807f47 test/nvmf: Don't let nvmfcleanup() to fail upon finishing the test
If this function fails due to, e.g. modprobe not being able to unload
kernel modules, the errexit will prevent nvmftestfini() from killing
target applications.

Avoid this scenario by ignoring nvmfcleanup()'s es when called from
nvmftestfini().

Change-Id: I3a05261f71d3dcc6ed06f786b4cc1988fd733ffc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1377
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Broadcom CI
2020-04-10 07:08:43 +00:00
Michal Berger
b8805882fc test/ftl: Drop .ini config in favor of json
Change-Id: I962ce508a03aee35b44da512492ef0a483cceb59
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1358
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:08:43 +00:00
Michal Berger
9f815a839d test/openstack: Drop .init config in favor of json
Change-Id: I2cbc31c13df4c0ab75846a262fd50c1769fea5a3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:08:43 +00:00
Michal Berger
ddc069c5be test/openstack: Don't trigger errexit from within finish_test()
If, e.g., the rpc call fails the remaining parts of the function
won't be called, resulting in lingering processes tainting the
testing environment.

Avoid the above scenario by intercepting single es from the entire
list.

Change-Id: Ie591935a3d868a1efa2890d1bb14776b0bdb6620
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1356
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:08:43 +00:00
Jacek Kalwas
55e0ec894f nvme: fix identify active ns
NVMe ctrlr init state machine shall be async whenever possible so it
is not blocking other code from processing. It can result in deadlock
when cmd producer and consumer are sharing the same thread.

This patch is making identify active ns async by introducing new
state to wait for completions.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I346d35bab4733d3941e023602854fdd5b1ef23b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1463
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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
2020-04-10 07:08:09 +00:00
Jacek Kalwas
842ae79aa6 nvme: refactor identify active ns
It is a prework for changes related to ctrlr init state machine.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If289580f65ae27468b659a7ea07a4e4298876e77
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1489
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI
2020-04-10 07:08:09 +00:00
Tomasz Zawadzki
9db8040738 autopackage: remove SPDK_BUILD_PACKAGE flag
Remove SPDK_BUILD_PACKAGE flag, since it was not set
on any of the CI jobs. The default value "0" was always used.

Only indicator whether second part of the script executed,
was handled by RUN_NIGHTLY flag.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1c5a660ed86bb520972c630118f8499966bdb6d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1607
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: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:21 +00:00
Tomasz Zawadzki
e8c42ef37c raid_ut: initialize ch_ctx in test_multi_raid_with_io
Lack of this initialization cause compilation error on release builds.

bdev_raid_ut.c: In function ‘test_multi_raid_with_io’:
bdev_raid_ut.c:2007:3: error: ‘ch_ctx’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 2007 |   verify_io(bdev_io, g_max_base_drives, ch_ctx, pbdev,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2008 |      g_child_io_status_flag);
      |      ~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2221aa1d78d640439d5876a781a0d173a370e2a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1626
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: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:21 +00:00
Shuhei Matsumoto
b32411ddaa ut/thread: Test creating and destroying nested I/O channels
This patch creates a test case to simulate nested I/O channels by
generic bdev layer and bdev modules. The nested level of I/O
channels is two at a maximum now but the nested level of the test
case is three.

Besides, any poller registered on the nested I/O channel is not
visible to the upper layer. So include such pollers into the test
case.

By combining thread termination, test the fix for the github issue
is correct.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6a04d753e462cdaba7364678b5118c45b09708ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1390
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-04-09 13:44:14 +00:00
Shuhei Matsumoto
a12aae4c85 lib/thread: Add timeout to wait until exiting thread is exited
Set 5 seconds timeout to wait until exiting thread is exited into
spdk_thread_poll(). After the timeout, collect error log and then
move the thread to exited forcefully.

Add necessary unit test case accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ied8f58a2023a3bbe098530810fd3288bef93c3e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1644
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-09 13:44:14 +00:00
Shuhei Matsumoto
e9aec6746a lib/thread: thread_poll() polls until the exiting thread is exited
Extract _spdk_thread_exit() from spdk_thread_exit() and
_spdk_thread_poll() calls _spdk_thread_exit() if the thread is in
the exiting state. spdk_thread_exit() changes to move the state to
the exiting state. The spdk_thread_poll() loop will end after the
thread moves to the exited state because the caller of
spdk_thread_poll() will check if the thread is in the exited state,
and break the loop if true.

If the user does not call spdk_thread_exit() explicitly, the reactor
has to terminate all existing threads at its shutdown. In this case,
multiple threads may have some dependency to release I/O channels or
unregister pollers. So the reactor has the large two loops, the first
loop calls spdk_thread_exit() on all threads, the second loop calls
spdk_thread_destroy() if exited or spdk_thread_poll() otherwise for
each thread until all threads are destroyed.

Besides, change the return value of spdk_thread_exit() to return
always 0. Keep it for ABI compatibility. Change ERRLOG to INFOLOG
for _spdk_thread_exit() because it is called repeatedly now. Remove
the check of I/O reference count from _spdk_thread_exit() because
_free_thread() cannot free I/O channel. Refine the unit test
accordingly.

Fixes issue #1288.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee5fb984a96bfac53110fe991dd994ded31dffa4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1423
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:14 +00:00
Richael Zhuang
13d6d00347 examples/blob: skip '\0' when dump xattr's value
In show_blob(), value_len of xattr contains terminator '\0',
which is printed as '.' when calling spdk_log_dump().
For example, we set key/value pair as <key1,xattr value>, we get
"xattr value." but not "xattr value" when showing blob info.
Skip '\0' will fix this.

And "data[BUFSIZE]" seems redundant here, remove it.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I4e7c3276e51f14badf43b660b80b24ae85bb0900
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1745
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-09 08:08:07 +00:00
yidong0635
97e345002b test/nvme_poll_group: Fix uninitialized value in unittest.
Compiling with warning:
nvme_poll_group_ut.c: In function ‘test_spdk_nvme_poll_group_add_remove’:
nvme_poll_group_ut.c:268:8: warning: ‘tgroup’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  qpair = STAILQ_FIRST(&tgroup->active_qpairs);

tgroup may can't be initialized as:
                if (tmp_tgroup->transport == &t1) {
                        tgroup = tmp_tgroup;
                } else {
                        CU_ASSERT(STAILQ_EMPTY(&tmp_tgroup->active_qpairs));
                }

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Id915e651f73ca3814a7e8d3f95c8793b8b880990
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1738
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-09 08:07:50 +00:00
Shuhei Matsumoto
a91d650245 test/bdevperf: fix 4 issues with the outstanding bit array
fix #1: fix issue when setting outstanding bit array

In the case where spdk_bit_array_get() is false after selecting
an offset, we'd fail to set the outstanding bit in the array for
that location based as it was included inside of the conditional
that would have us try another. Switched the logic up to avoid
needing a second check on g_verify.

fix #2: fix offset_in_ios to be relative with the range of the job

offset_in_ios was absolute but size of bit map array was the
range of the job. The comment in the source file said it was
relative, but did not match the code.

Change offset_in_ios to be relative with the range of the
job and use it for spdk_bit_array_set, spdk_bit_array_get, and
spdk_bit_array_clear.

fix #3: fix bit was not cleared when submission failed

When bdevperf_submit_task() failed to submit, the corresponding
bit was not cleared from job->outstanding.

fix #4: fix bit was not cleared when submitted I/O failed.

bdevperf_complete() had cleared bit only if the I/O succeeded.

This bug is apparaent only when -C option is enabled.

fixes issue #1329

Signed-off-by: paul luse <paul.e.luse@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5b7e1d0b2e489b807906a94ed5d05da65067e6ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1736
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>
2020-04-09 08:07:31 +00:00
Michal Berger
a195335f7a test/nvme_perf: Drop .ini config in favor of json
Change-Id: I60ba7acd3c3b56563dbce8055aad125f47a2a346
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1291
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:44:22 +00:00
Michal Berger
8a41d97c6e test/nvme: Make sure that $rootdir is declared
perf/common.sh uses autotest's common tooling which depends on this
variable to be set. Without it, execution of the run_perf.sh simply
fails.

Change-Id: Ib68d565b1d38c80df3d3f1a09f5fa7bef6eaaffd
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1290
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-08 06:44:22 +00:00
Michal Berger
524b0ddb46 test/vhost_perf: Drop .ini config in favor of json
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ida15585aa2c16e03f000ca115babc8a5a3629fe8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1284
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-04-08 06:44:22 +00:00
Seth Howell
9cb8c2387a autobuild: optimizations around compiling tests.
This commit combines a couple of small optimizations to
help make the unittest scan-build checks more comprehensive
while not taking extra time to compile examples when we are
doing functional tests that don't require them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1d3af0026b4be6e799516ef52e9414790eab85e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1270
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:44:15 +00:00
Karol Latecki
91407607e5 test/vm_setup.sh: add parted for Arch Linux
Parted is not installed in the system by default and
is needed by number of spdk tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5d8628be2e328d528a8aa47a8084d33fbb63b187
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:44:03 +00:00
Tomasz Zawadzki
4faa7b5837 test: remove RUN_NIGHTLY_FAILING flag
Purpose of this flag is sketchy at best.
Failing tests should be either fixed or disabled/removed.
Running separate job in hopes of it fixing itself,
might not bring the expected outcome.

Case in point - test case in this patch
was added to this flag over a year ago.

This is last remaining test case under this flag.
So there is no need for it to exist.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8481ac7102245889047dde083b34276d22271a03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-04-08 06:43:31 +00:00
Shuhei Matsumoto
e7ead00b53 lib/thread: Wait until thread_is_exited() is true by thread_poll() after thread_exit()
Following patches will require thread termination so that thread_exit()
will move thread to exiting, thread_poll() will move thread from
exiting to exited, thread_is_exited() will detect the threadis exited,
and then call thread_destroy().

So change all places as a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b2e8aee5ed7cd160a88b4c9aaed7d90bd9dac07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1640
Community-CI: Broadcom CI
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-04-08 06:43:05 +00:00
Shuhei Matsumoto
c9da0aecdc lib/thread: Ignore spdk_thread_exit() call after moving exited
Previously the caller had to check if thread is not exited when
it calls spdk_thread_exit().

Subsequent patches will change return type of spdk_thread_exit()
to void, and so include the check int spdk_thread_exit() in this
patch.

If spdk_thread_exit() is called when the thread is already exited,
collect INFOLOG and return normally.

This will make the next patch a little easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8b94261575e770485b33c0b37e76e770b77b417c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1639
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-08 06:43:05 +00:00
Shuhei Matsumoto
78accbf4e5 lib/event: Count reactor CPU stats (idle/busy tsc)
Following the idea of thread CPU stats, add reactor CPU stats.

Reactor CPU stats accumulates run time of spdk_thread_poll() calls
to idle TSC or busy TSC according to their return codes.

Add necessary unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1a1391e79d74387c68f1651a61c8900e4c6faf66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1501
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-08 06:43:05 +00:00
Ben Walker
49826b36cf iscsi: Properly size the receive buffer
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id736c8a6d9a2cb8bd23017f61eeeccca8a882c03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:42:55 +00:00
Alexey Marchuk
24d61956ab nvme: Init the status object when tracking the req completion
Currently nvme_completion_poll_status object is allocated using
malloc, so it may cotnain some garbage. In some scenarious
nvme_completion_poll_cb can be triggered before we enter
spdk_nvme_wait_for_completion_*. In that case status object
will be freed by nvme_completion_poll_cb if it contains a
garbage in `timed_out` field. Later spdk_nvme_wait_for_completion
will work with already freed memory.
Fix - allocate nvme_completion_poll_status object using
calloc and explicitly zerofy it before usage

Fixes #1292

Change-Id: Iac39653a6cd102471de16e65814f0760bbeda7d9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1373
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-04-07 08:38:58 +00:00
Seth Howell
b9a187977d nvme: add poll group handling to qpair path.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9116cdcb5bbeb16ee74decee5586bda9a42090aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/633
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-07 08:38:40 +00:00
Seth Howell
ccf0fd4e39 test/unit: add poll_group unit tests.
Change-Id: Ibcf2d5a3e6d5a27d1ff430ae6a896cb072f151f0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/661
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-07 08:38:40 +00:00
Tomasz Zawadzki
0c7aeea925 test/mkfs: provide common function to create filesystem
There are tests which create a filesystem on a device.
Each one could use a timeout and retries for each mkfs.
Otherwise following error could appear due to not test
related system activities:
'mkfs.xfs: cannot open /dev/sdb1: Device or resource busy'

References #1141

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7307b085ada42200995d8bd2fcfd0469ee60a732
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1178
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-07 08:37:49 +00:00
WANGHAILIANG
ba909d9930 test/iscsi: add README.md for iscsi fuzz testing
Add a readme file.

Change-Id: I6187fd365fc2488ee7e9e5941278c8f7c1b53a03
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1078
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-04-06 07:56:07 +00:00
Vitaliy Mysak
d713b99c3a test/scripts: remove OCF from vm_setup script
Since we have OCF as a submodule, we do not need to
install it separately.
vm_setup.sh was used to install dependencies for testing SPDK,
so remove all references to OCF in the vm_setup.sh.

This is related to issue #1279

Change-Id: I616dd6e72101c78c6902603ef077eb7992809ab9
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1496
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-06 07:49:41 +00:00
Darek Stojaczyk
6fa52a2b3e test/spdkcli/tcp: use socat for listening for RPC on a TCP port
`-r` command line param in SPDK won't accept a TCP port soon.
Instead, we can make SPDK listen on a unix domain socket, then
expose the socket on a TCP port using socat.

Change-Id: Iea52a5f21d845eac6888d343ce03c7e7caf19617
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1332
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-04-06 07:48:43 +00:00
Darek Stojaczyk
5db247abfc test/spdkcli/tcp: don't override the ERR trap
That test used to call an inexistent function in its
ERR trap. That's for one. Second, none of the SPDK tests
should set the ERR trap themselves - it's set once in
autotest_common.sh and prints the backtrace. What test
scripts should do is setting SIGINT/EXIT traps - fix it now.

Change-Id: I46c82651be78eeaec16ac52396c5e80a0405e5ff
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1331
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-06 07:48:43 +00:00
Darek Stojaczyk
df9660df7b lib/event: fix printing non-null-terminated strings
%*s prints at least * characters and may add padding to the string.
%.*s prints at most * characters.

In a few places we used the first instead of the second and
printed some garbage to screen (in the best case...).

Change-Id: I97a862be61a5e43aa61e8230044dbd64a9db33bd
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1569
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-06 07:48:37 +00:00
Richael Zhuang
e9063d4da1 test/blobfs: rocksdb building error with gcc9
There's a small error when building rocksdb in blobfs db_bench
with gcc9:
"strncpy output truncated before terminating nul copying as many
bytes from a string as its length [-Werror=stringop-truncation]"

It's not a real bug for in the code "strncpy" truncates the null
terminator but set it later, which has been reported here:
https://github.com/facebook/rocksdb/issues/4017
Just adding "-Wno-error=stringop-truncation" to silent the compiler.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I95993605f0376f5c101fb487596721b384319bcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1594
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-04-06 07:48:25 +00:00
Shuhei Matsumoto
3af1adb8aa ut/compress: Use SPDK thread library
Use SPDK thread library in unit tests for compress bdev. This will
enable us to write unit tests for refactoring.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iac3867cca460b998c9b3953aae5241ffddc3168b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-03 06:31:10 +00:00
Shuhei Matsumoto
e92a77b148 ut/compress: Remove unused MOCK for spdk_bdev_io_get_io_channel()
Removing MOCK for spdk_bdev_io_get_io_channel() caused no difference.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic91bff0f163ff5ad607abc8fa4d5eef10215b043
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1450
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-03 06:31:10 +00:00
Karol Latecki
9fc706f4b6 test/vhost: improve run_fio --local option
When using --local acutally wait for fio processes
to finish and then gather results back to the host
system.

--local allows to run independent fio instances
on guest systems, avoiding fio client-server mode.
This will come in handy when trying to run fio bdev
plugin with virtio bdevs in guest systems.
At the moment fio plugin does not work in client-
server mode, so "local" must be used"

Change-Id: I2020c1b636fbf4ab1fe8ef590639e0dbfd905414
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1533
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-02 14:51:48 +00:00
Pawel Kaminski
7cf4602d11 test/vm_setup: Add module dependency for freebsd
Change-Id: Ied1da9dba02f9ff735ce603fee95aacd2981930d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1140
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-02 14:51:24 +00:00
Maciej Wawryk
ae22c0019a test/vm_setup: Change cloning qemu submodule via git to https for avoiding proxy issues
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I4dab0b15234f0772356f79884867ac23fb319837
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1414
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-02 14:51:24 +00:00
Maciej Wawryk
9f6acc9a75 test/vm_setup: Update spdk git repository url
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1f0f191ccbaa3e9464cd1b788599935d1bc994c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1413
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-02 14:51:24 +00:00
Maciej Wawryk
051d3fe016 test/vm_setup: Fix permision error in Centos7
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic704e9ae97bb68d96401818fb52940e86eaa36a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1409
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>
2020-04-02 14:51:24 +00:00