Commit Graph

360 Commits

Author SHA1 Message Date
Ziye Yang
5c0160263c bdev/rbd: Revise bdev_rbd_create rpc function.
Revise bdev_rbd_create rpc call to add an optional
parameter "--cluster-name", e.g., "--cluster-name Rados".

Then users can create a rbd bdev with registered
Rados Cluster. This shared strategy can be used to
remove the thread creation overhead if multiple rbds
are connected to the same Ceph cluster.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ide5800f8fc6b2074805272a59731c666fe279b9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7584
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-05-19 08:08:39 +00:00
Tomasz Zawadzki
1c9125e78e test: add bdev_wait_for_examine to static JSON configs
Runtime RPCs such as bdev creation has no chance to wait for
bdev examination to finish. To handle this case commit below
introduced bdev_wait_for_examine RPC, and built it into all newly
saved JSON configurations:
(e57bb1af)lib/bdev: build bdev_wait_for_examine into subsystem

Some tests generate the configuration by hand, rather than
saving it from an existing application.
This patch embeds this RPC into the test configs.

Fixes #1760

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I79f998d722a2d19aa98b78333c64dbd2c1151444
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7861
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-05-13 10:07:07 +00:00
Tomasz Zawadzki
d69b16dac8 test/iscsi: remove comma from initiator_json_config
Function initiator_json_config is never called with
additional arguments that would fill up the subsystem
JSON.

Handling for the comma is removed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6ce5648a0eac29cb0f45d210696edf7977dfe89d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7860
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-05-13 10:07:07 +00:00
Michal Berger
19f0c9a0d0 autotest: Replace fio.py with a bash wrapper in tests
fio.py simply wraps itself around fio and doesn't do anything that
would require python to be in use. Having it in a simple bash form
makes it easier to integrate it with autotest's common sh tooling
and to debug any potential issues with the underlying tests.

This also fixes #1919 by making sure only proper nvme devices are
selected for the nvmf targets.

Fixes: #1919.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I111d00df3c7b2517f431cae865e258a665c2ecb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7684
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-05-12 08:48:10 +00:00
Tomasz Zawadzki
8c3e71f0f9 script/gen_nvme: do not generate legacy configuration
gen_nvme.sh will no longer generate the legacy configuration.
"--json" option will still work for any current users of the script.

Tests were modified to no longer use the "--json" option.
Meanwhile others were simplified with switch to "--json-with-subsystems".

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8450be98660e54c64c27d8401fc40d649f9403ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4802
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: Paul Luse <paul.e.luse@intel.com>
2020-10-22 17:08:41 +00:00
Ben Walker
2d03b8ac44 test/iscsi: In ip_migration.sh, use 'ip' to add and remove IP addresses
This eliminates the only known use of the net_interface_* RPCs.
These RPCs are also undocumented.

Change-Id: I92e2dd9ebd59a80518aed5a77aa7f3ccf0371c9a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4304
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-06 09:36:30 +00:00
Ben Walker
2c379bdabf test/iscsi: In ip_migration.sh, eliminate loop to start targets
The code is actually shorter without the loop

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I872d0bcd6be0945220cfddba61034bd26cbb82f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4303
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-06 09:36:30 +00:00
Ben Walker
06d2863a67 test/iscsi: In ip_migration.sh, eliminate rpc_validate_ip
This was testing the net_interface_* RPCs, which are about to
be eliminated.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I903eb73c72f5d7cf5ffa322e39296e4692adf008
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4302
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-06 09:36:30 +00:00
Ben Walker
c8a5b48c44 test/iscsi: In ip_migration.sh, eliminate rpc_config function
Two line function called from one spot. Simpler to inline it.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I82818945a672b8c5603f45b6f2b4f072ff2098e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4301
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-06 09:36:30 +00:00
Ben Walker
e8c7327533 test/iscsi: In ip_migration.sh, don't run both targets on the same core
This fixes a 3+ year old TODO

Change-Id: I2516586d120b0f6f8d3d0fc54a5ebdd93aae6bc2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4300
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-10-06 09:36:30 +00:00
Ben Walker
4eec36511d test/iscsi: In ip_migration.sh, put starting the target into a function
This makes it a bit clearer.

Change-Id: I3e9bcc8d5cff3c4cf85ec774114f84a59a9c0f16
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4299
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-10-06 09:36:30 +00:00
Ben Walker
fcc187e3cf test/iscsi: In ip_migration.sh, don't pass -i to iscsi_tgt
The goal is to make each one start in a different shared memory
group, which is the default behavior. This test is very old and
may predate that being the default behavior.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id7bb38cf4f54e8844d5e76046a19c56003855519
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4298
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-25 11:30:09 +00:00
Shuhei Matsumoto
a6b43f82b4 test/iscsi_tgt: Test login redirection
Run two iSCSI target applications, the first application has a
public portal 10.0.0.1:3260 and the second application has a private
portal 10.0.0.3:3260.

Each application creates a target which has the corresponding portal
and a NULL bdev. The NULL bdev has the same configuration between
two applications.

By using NULL bdev, we do not have to worry about shared storage.

Then move between two portals by using temporary login redirection
function.

We tried to differentiate only TCP port but such idea did not work
with the popular iSCSI initiator, open-iscsi.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I578f3b57d738ade6da74a0ec3d7fbb140139669d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3440
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-31 15:22:44 +00:00
Shuhei Matsumoto
25359fb900 test/iscsi_tgt: Virtual network made of three interfaces using veth and bridge
To test iSCSI login redirection feature, we need multiple IP addresses
for target application. Furthermore, it is nice if multiple iSCSI
target applications run.

This patch creates such network virtually using veth device and
ether bridge but keeps compatibility even after this patch.

Create three veth interface pairs and one bridge. One pair is for
initiator and two pairs are for targets, and all pairs are
added to the same bridge.

Create two network namespaces for targets and add one pair to
the first namespace and add another pair to the second namespace.
Namespace is not created for initiator.

Necessary connectivity is tested using ping after creation.

iSCSI login redirection test code will follow.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If0ca7b4a7af652602f3d6a7ea5669a06ce41a5f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3887
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-08-31 15:22:44 +00:00
Tomasz Zawadzki
99dd44e8da test/iscsi: remove VPP tests
All VPP tests were the same tests as usual posix iSCSI tests.
TEST_TYPE was used to direct which tests to run and in some cases
with what parameter.

Since VPP is deprecated, this type of selection is no longer needed.
All tests will run with default socket abstraction.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I292f1b5141ec8c4dacb4a43c6f51e4d30501a92a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3730
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
7d6e0802a3 test/iscsi: remove SPDK_TEST_VPP test flag
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f8366337591a990bda4af60ea5e15d92b07b61c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3731
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
4eda51a0c0 test/iscsi: only test rpc_config with posix
Since VPP is deprecated, this is no longer required.
rpc_config tests will work for posix and uring
the same for this test.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibc7bd76ea47ca137f3eb4484782cc64ff748fe22
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3729
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
a9b5d7af5a test/vpp: remove vpp interface preparation
Enviroment for VPP and posix tests was prepared differently.
Since VPP is no longer tested this patch removes path for
starting VPP application and configuring interfaces there.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie55646207d07bbbd7edddd3caf2f2cc23bf27e23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3728
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:52:36 +00:00
Tomasz Zawadzki
af7a9194c0 test/iscsi: inherit TEST_MODE from autotest_common.sh
Other common scripts for nvmf and vhost already used
TEST_MODE set by autotest_common.sh.
Meanwhile iscsi was processing it for each test script
separately.

This patch simplifies iscsitestinit/iscsitestfini
functions to just use TEST_MODE.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iacbdb552207eff72b41f2adb505e83348567df57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3727
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:52:36 +00:00
Shuhei Matsumoto
89ae0e3c62 lib/iscsi: Manage free connections not by array but by TAILQ
Previously free connections had been managed by g_conns_array,
and allocate_conn() gets the lowest free connection. This had worked
almost as LIFO, and the just freed connection had been reused
immediately to the new connection.

Using TAILQ makes management of free connections FIFO, and this will
be more intuitive and simpler, and avoid potential issues due to the
fact that we do not know the state INVALID is the current connection
or the current connection is exited and the new connection is allocated.

This patch includes following updates.

Remove the test condition that the connection ID should be zero.
Connection ID is used as Target Transfer Tag (TTT) and TTT is opaque
number. Hence requiring connection ID to be zero is not meaningful.

iscsi_conn_free() calls free_conn() while holding g_conns_mutex, but
iscsi_conn_construct() does not call free_conn() without holding
g_conns_mutex. Hence add g_conns_mutex to the latter.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I204f66469f0bf54845c773da5b4ac86f3c8dca60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3089
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-13 08:39:50 +00:00
Karol Latecki
784553b681 test/iscsi: remove nvme bdev controller test case
Removing verify_add_nvme_bdev_rpc_methods test from
rpc_config.py.

bdev_nvme_attach_controller RPC call is frequently used in
a lot of other low-level test cases. Also this test case
fails when run on a VM with multiple NVMe disks containing
0-namespace and OCSSD emualted NVMes, which is most
probably a result of a very generic regex used to obtain
NVMe BDFs.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I091cc7fa4b426784136cda7423f829dc4a82eae0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3111
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-01 07:51:29 +00:00
Ben Walker
85bdd43b40 build: Example applications build to build/example
This mirrors build/bin and build/lib

Change-Id: Ide1d17dfc8b425adfbe67f381c93c236653bd301
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2380
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2020-06-15 15:27:16 +00:00
Ben Walker
6b9b448e53 build: Output executables from the app directory to build/bin
Automatically place binaries produced from the app directory
into build/bin. This matches with the output in build/lib
that already exists.

Change-Id: I13cd2da71d2f88592e22308fe8a907bf458458b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2379
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-06-15 15:27:16 +00:00
Ziye Yang
41219b2b9e iscsi: Add DataSequenceInOrder in discovery_ignored_param
The implementation of Calsoft case tc_login_29_1
is wrong. We should return "Irrelevant" to the initiator
when Session type is discovery.

Also also update the known failure test cases of
Calsoft.

Fixes 958.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I38cd2cf39bf80fd025ab74bc9dfe6ac412d01328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2846
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-06-11 19:51:04 +00:00
Ziye Yang
687a9ab516 iscsi migration test: Extend the execution time of fio.
When we conduct the ip migration test (i.e., switch the iSCSI target
process from to first process to
second). This time may exceed the 5s in some cases, so
FIO process will exit with error and make the test fail.
Because The total FIO execution time is 10s, and we sleep 5s
in the script. So propose the following approach:

1 Change the sleep from 5s to 3s, we do not need to sleep
it too long for FIO.
2 Extend the FIO execution time from 10s to 12s.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I07d488c6e8a94733534acc1acd2ba8778c4d2eb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2801
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:55:40 +00:00
Ziye Yang
d0818a2cbb test/iscsi: fix wait for iscsi devices in ip migration test
We should wait until login fully performs before fio tests
to avoid intermittent failures.
(Suggested by Shuhei according to the rbd issue fixed previously)

Fixes 1313

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I331bf6d69bf0a5c9ef6e36c4325334159062f949
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2815
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:55:40 +00:00
Darek Stojaczyk
6f5b39115d test/iscsi_tgt: silence shellcheck SC2029
This is detected by some shellcheck versions.
The wiki for this error tells us we should ignore it if we
know what we're doing.

Change-Id: I461dcceace652bc9abd1cfb9f6a2794b98016e96
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2429
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-02 09:49:06 +00:00
Michal Berger
844c8ec383 check_format: Reformat the Bash code in compliance with shfmt
Change-Id: I93e7b9d355870b0528a0ac3382fba1a10a558d45
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1718
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00
Liang Yan
6a29c6a906 bdev/rbd: add ceph rbd resize function.
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Change-Id: Id7f24f1f5e0789ee6d4c07ae7f59cc2d98983e98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1766
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 07:28:10 +00:00
Michal Berger
d3f04b6463 test/iscsi_tgt: Drop .ini config in favor of json
Change-Id: I7c6d9b01176526a3c255846891d48fe2745ab313
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1335
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-04-20 14:28:56 +00:00
Seth Howell
4f7f0f0986 autotest_common: move config_params to a function.
This accomplishes a couple of things:

1. Now we don't perform these checks every single time
we source autotest_common.sh (some 140 times)

2. We have some flexibility in changing parameters either
during a test or when trying to do a specific compilation
and calling this function to get the updated parameters.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibbe2dc9113a56f651d41216e8557708824652442
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1784
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-15 07:39:00 +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
Karol Latecki
dbb84dd5d6 test/iscsi: run cleanup once before running the tests
Run iscsicleanup once before running the tests. This is
to ensure we delete any stale entries or files if they
were not removed properly in previous test runs.

Fixes #1311

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Idb415adddfaa7cbb443377a292fae357c1707e79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1539
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-03-31 07:58:11 +00:00
Karol Latecki
db43b387ba test: do not use iter_pci_class_code in tests
Do not use iter_pci_class_code function in tests to
iterate over NVMe drives. This function can return
drives which at the moment of execution can not be
whitelisted for use.

This can result in test errors (such as simply
bdev_nvme_attach_controller RPC command failing) or
even using and deleting data from NVMe drive which
was not meant to be used in tests.

Fixes #1235

Change-Id: I82b9935fc88605b636c2096be6c71d4880a567c8
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1309
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-18 08:03:21 +00:00
Darek Stojaczyk
bad71510cb test/iscsi/fuzz: remove unnecessary delete_tmp_files()
This function removes leftover fio files, but fio is
not run in this test. Remove it.

Change-Id: I1522a018c9cc3093bd1bcb1c2361dd7b31deacbe
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1292
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-03-18 08:03:13 +00:00
Michal Berger
053c15b32b fio: Remove hardcoded path to fio repo
The hardcoded path is replaced with $CONFIG_FIO_SOURCE_DIR as defined
during the compile time.

Additionally, all checks which determine if fio is available are now
based on $CONFIG_FIO_PLUGIN=y knob instead of the presence of the fio
repo.

Change-Id: Ie469747f3863c9561f53d32e8c3f29778afaaf74
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1108
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-17 14:44:20 +00:00
Tomasz Kulasek
6f98b0946a test/iscsi_tgt: fix wait for iscsi devices in rdb test
We should wait until login fully performs before fio tests
to avoid intermittent failures.


Change-Id: I55862f5e9c7b9fbdf225036caed92c0ac935f1b1
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1251
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-16 08:45:28 +00:00
Tomasz Kulasek
7b7e97604b test/vpp: fix error handling in vppctl non-interactive mode
On Fedora 30 we have noticed VPP 19.04 related issues:

  1) Error values returned by vppctl in non-interactive mode
     are not relevant to the success/fail of command.
     Vppctl ALWAYS returns 0, so "-e" bash option is unable
     to detect any errors.
  2) We have intermittent pipefail errors (error 141) returned
     by vppctl on disconnect from vpp, even though commands are
     executed succesfully.

Change-Id: Ie22ea24f7e81017089b899111724d338eeb81113
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1214
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-16 08:45:07 +00:00
Hailiang Wang
bb5567496f test/iscsi: add application for target fuzz testing.
Enables us to test randomized data against the iSCSI target interface.

Change-Id: I56bd5bcd936b92ba152d4d5678d7124b3165c03c
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/509
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-13 08:53:46 +00:00
Karol Latecki
996248fd86 test/iscsi_tgt: do not silently skip rbd.sh tests
Remove if/exit steps from rbd.sh and move the condition
to parent script iscsi_tgt.sh.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I86c9c659e0f8b4f544296e2ef8a861b25fd4f424
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1081
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-11 11:35:33 +00:00
Karol Latecki
6817babfa4 test/iscsi_tgt: do not silently skip calsoft tests
Remove if/exit steps from calsoft.sh and move the condition
to parent script iscsi_tgt.sh. This still to run iscsi_tgt.sh
on systems which don't have Calsoft installed but still allows
CI to detect missed tests thanks to autorun_post.py.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0eb186fe80b377f0c023774adf8ff321af7dfa81
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1075
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>
2020-03-04 10:05:26 +00:00
Michal Berger
b4c5509c6e test/common: Source *_APP from a common place
Instead of declaring each app in the actual test, source their default
declarations from a single location. Additionally, use them as arrays
now instead for easier cmdline management.

Change-Id: I0ea39403f070dc57987065ebb800e91c35de643a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/690
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>
2020-02-27 10:15:40 +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 Kulasek
327668c8c9 test/common: make gdb_attach global
Change-Id: Ib73bd9513681360f22251b54a2d15ca9807b72c2
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478807
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-01-27 17:39:52 +00:00
Jim Harris
12ae64f863 Revert "test/iscsi: add application for target fuzz testing."
This reverts commit 4700ef0fa6.

This has merge conflicts with the iSCSI async write patch
series that was merged.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5a27460a369ef5f13bf490a287603e566071be40
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482482
2020-01-23 06:19:00 +00:00
Hailiang Wang
4700ef0fa6 test/iscsi: add application for target fuzz testing.
Enables us to test randomized data against the iSCSI target interface.

Change-Id: I9ff9a06c11bb16b315686156b27855664f21bd48
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470925
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-23 02:32:28 +00:00
Pawel Kaminski
13c6c8db6e test: shellcheck - apply rule SC2002
SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

Minor fix in test_converter: don't use python3 as
    config_converter.py is executable.

Change-Id: I250e893b48fa95e94778dcc31deb91e6ac0b39c0
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481600
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 14:07:39 +00:00
Seth Howell
a571eb03e9 test: move report_test_completion into run_test
This also requires us to change the create_test_list function to rely on
the run_test function for creating the canonical test list.

Change-Id: Ib35e7752935a3ac83de2702b6dfbd42539027f6a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476962
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-14 07:49:08 +00:00
Seth Howell
9f9f120cac test/iscsi: use run_test semantics in filesystem test.
Change-Id: Ie58dfb5e6147437d325439fca9bbcaebbb4ccebb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476946
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-01-07 12:15:34 +00:00
Seth Howell
cb90136c33 test: eliminate case and suite from run_test
We will be able to distinguish case and suite in the post process
scripts based on if they have any internal tests.

Change-Id: Iff2aa5caa251924d8a842085d87eb2a17aca45d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478522
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00