Commit Graph

105 Commits

Author SHA1 Message Date
Chen Wang
9e8415c688 autotest: vhost_filesystem_test (porting from nightly to autotest)
Add vhost-scsi and vhost-blk filesystem test cases with
lvol and nvme back-end in nightly test

Change-Id: Id2cccd9a45aaa995bef90415855835b93447f2e9
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/390923
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-24 15:51:03 -05:00
Seth Howell
52bd445367 fio_jobs: add fsync_on_close to fio args
This is to help facilitate the update of the fio_ubuntu binary to fio-3.3

Change-Id: I4c896dc60255f821a5cf66af818396f210304f07
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/395394
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-19 15:37:08 -05:00
Chen Wang
8fdea55ef2 test/vhost: fix typo and increase the sleep time
Fix the nightly vhost readonly test case issue
in physical machine.

Change-Id: Ie0799f06268bcef4a230b162bc70266ce4aae8cd
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/395014
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-17 17:49:31 -05:00
Jim Harris
d1c4502b19 test/vhost: remove extra quote in readonly.sh
This was causing failures in the test pool.

Test run shows there are still issues with this script
that need to be debugged.

Fixes e6e2fc5b07 (test/vhost: don't call vm_setup.sh helper script to setup VM)

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

Reviewed-on: https://review.gerrithub.io/394592
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-16 19:09:19 -05:00
Pawel Niedzwiecki
9a723c1a48 test/virtio: Add vhost initiator tests for multiqueue
We define 'size' and 'offset' parameter as % of device so on nvme
devices the tests are run with big files and small on malloc so we
can remove the 4G test case

Change-Id: I4840e859732696dd981ab0ab11e5270c025ff248
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391838
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
37fd86f0f7 test/virtio: Add vhost initiator tests for multitarget.
test virtio devices created from scsi controller with multiple targets

Change-Id: Ibef135c4dc6fdb324bec6b42c9e532add92e656a
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391836
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
8d57f4da2a test/virtio: Add vhost initiator tests for multisocket
test multiple devices simultaneously instead each device
individually

Change-Id: I514ee080a2a585a87c7bcfc2a10da89456b285a4
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393944
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Niedzwiecki
b251ebdd9d test/virtio: Refactor existing code
- replace generating job files with pre-existent fio job file
- construct vhost scsi controllers with rpc
- replace generating path to vhost socket in bdev.conf with
static path
- add function usage

Change-Id: I44dedb7fd9a3d96e3d348450c4351cfae6d20116
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391827
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2018-01-11 14:28:42 -05:00
Pawel Wodkowski
29e017f406 test/vhost: silence some very noisy loops and better checking for ssh
key file

When using '-x' option some loops produce huge amount of useless debug
logs. It would be good to have different log levels but for now let
silence those places.

Use 'readlink -e' while checking default ssh keyfile path. This ensure
to fail if keyfile is invalid link.

Change-Id: I1e24fe02a3e1a1646b710e5e3d8c2ee2c1abf2a4
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393799
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-09 19:30:21 -05:00
Pawel Wodkowski
db6d5f0e7b test/vhost: don't forward http/https in VM
Forwarding http/https might increase boot time in some distros (like
Ubuntu). Test don't use it so might be removed.

Change-Id: Ia9f07bbae03c37888bcf06fec480577ae79e78cd
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393176
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-09 14:56:37 -05:00
Pawel Wodkowski
e6e2fc5b07 test/vhost: don't call vm_setup.sh helper script to setup VM
vm_setup.sh is a proxy script for vm_setup function which should
be called directly.

Change-Id: If9cd70a9bf67a743144142ea75887dfbd539b38a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393160
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 14:56:37 -05:00
Pawel Wodkowski
a862d1cdd6 scsi: remove lun_db
Change-Id: Icc40b66cd0c6f63242bc3d3f26b34f323450c570
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393501
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-01-09 13:56:00 -05:00
Pawel Wodkowski
61ba62bdae test/vhost: don't call vm_run.sh helper script to start VM
vm_run.sh is a proxy script for vm_run function which should
be called directly.

Change-Id: Ia7ac242fe8c24b9ce76e6d5483bd52f84225b0bb
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393159
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
aa0f44b53b test/vhost: don't call run_vhost.sh to start vhost app
run_vhost.sh is a proxy script for spdk_vhost_run function which should
be called directly.

Change-Id: I6ca3e049e812bf05c9251e16c75f6ff90c3b0f0a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393145
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
ac021a2e7d test/vhost: make FIO be configurable through env variable
Change-Id: I45b366ed39964514a8d409fe894ca941e8895b73
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393057
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Pawel Wodkowski
575a291fa3 test/vhost: introduce notice, warning, error and fail message
helpers

So we can better trace what failed.
notice - just echo to stdout
warning - just echo to stderr
error - echo to stderr and return false, so trap ERR can catch this
fail - like err but call 'exit 1' at the end so if no trap ERR is used
it will exit anyway.

Change-Id: I5c7b3682fd6c0d81c07c58a5ec965155c7593407
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/392218
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-01-08 18:01:33 -05:00
Karol Latecki
6d8dc5239e test/vhost: keep fio config file name for log output
Copy fio config to guest VM with the same name instead of
renaming to /root/fio.job.
Use the same file name for creating log file in desired directory.

Remove not needed ls command in common/run_fio while at it.

Change-Id: I9e13d8cd6f7892a77d89afb99f7d57ef79f7b11f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393469
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-01-04 02:15:53 -05:00
Dariusz Stojaczyk
e7885a9a05 test/vhost: send SIGABRT on vhost shutdown failure
There's a bug lurking somewhere in vhost
shutdown path causing intermittent
failures. Sending a SIGABRT instead of SIGKILL
will make the process dump core. We could use
it to speed up debugging.

Change-Id: I0825deecbf26e32ff073fdbcdfe42640c52453b9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:22:49 -05:00
Daniel Verkamp
f0c2093477 scripts: factor out iter_pci helper functions
Add a new file, scripts/common.sh, that can be shared between not only
autotest scripts, but also scripts/setup.sh, scripts/gen_nvme.sh, etc.,
and move the PCI iteration functions there.

The iterators are also expanded to work identically for both dev_id and
class_code on Linux and FreeBSD.

Change-Id: I98423cd06242e78535f5da4fce82166812ea96a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393416
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-03 14:09:22 -05:00
Karol Latecki
122c7db7bf test/vhost: use full path in spdk_vhost.sh
Current relative work dir path caused problems with downstream
test scripts when running spdk_vhost.sh using relative path

Change-Id: Ifd47bd37650a6328cb0f548a03cb4de010093320
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392744
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-26 11:17:12 -05:00
Karol Latecki
08a7e4f4f8 test/vhost: change mask for ctrl construct negative test
Tests need adjustments due to patch:
https://review.gerrithub.io/#/c/392587/

Change-Id: I098aca99fe22a9e01246da74b4b9fbf25f4b5b99
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392745
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-22 13:19:23 -05:00
Karol Latecki
90aca6641d test/vhost: add trap to lvol test
Change-Id: Ibd3e485085793260ca4bb2bfa3da6025b2c997aa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392450
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-21 14:21:52 -05:00
Pawel Wodkowski
b5207c4488 test/vhost: remove obsolete parameters 'qemu-src' and 'dpdk-src'
This was removed some time ago.

Change-Id: I5e4b588fb881793d750999ff73e8bf891cb58fc0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391952
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-21 11:28:09 -05:00
Pawel Wodkowski
3911366d66 test/vhost: make run_fio.py to just run fio
Make shell scripts prepare fio jobs and just call run_fio.py to run
those jobs. This way run_fio.py don't need to know anything about test
environment configuration.

Change-Id: I10b6954011855e9139ff7b5372070ec553009d33
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391929
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-21 11:28:09 -05:00
Karol Latecki
233c5189ab test/vhost: refactor lvol test
- Removing hardcoded lvol bdevs and blk controller sizes
Lvol bdevs will now be created with roughly equal size based on
size of used NVMe backend
- Create lvol structures and VMs setup independently

Change-Id: Ib1cfe1b60033200a9896fa0c8d1b17af41ea0eb1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/390983
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-20 11:39:34 -05:00
Jim Harris
df03f9d119 test: add timing calls to vhost/initiator/blockdev.sh
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e19266d5d418e1b356308d2b9efa419c1b22232

Reviewed-on: https://review.gerrithub.io/392002
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-19 11:10:57 -05:00
Pawel Niedzwiecki
30dbca865b test/vhost: test for the vhost-blk readonly feature.
Change-Id: I5dde0555bd7d0e03dea3779dfd59c13ece92696a
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/382835
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-08 14:08:58 -05:00
Chen Wang
1594b13993 test/vhost: Fix the lvol bdev name
The lvol bdev which used to create nested lvol store
should be $lb_name.

Change-Id: Ic8d68f8d18bcb0c1d4bca0b4612a4a07ed8b974d
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/390350
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-08 14:06:19 -05:00
Karol Latecki
7c13831f39 test/vhost: replace remove_vhost_scsi_dev with _target
Change-Id: Ibf243d4e9804acda8ee712253722c963bb0120fc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/390997
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-12-08 11:36:32 -05:00
Sebastian Basierski
0709cc48c9 vhost: Switch "Dev" keyword to "Target"
Added new keyword 'Target' that will replace 'Dev'.
'Dev' is still usable, but deprecated and will be removed.

Change-Id: Iafd6114ef2cc5b2f8d58497e9fb454a3a237ed16
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/388568
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-12-08 09:25:49 -05:00
Daniel Verkamp
5f0c99c018 test/vhost/initiator: specify RPC address via -r
Remove the [Rpc] section of the vhost initiator bdev.conf file and use
the bdev_svc -r parameter to set the RPC address instead.

Change-Id: Iaa5f6947b49679082f00d4c30d625ab2e5db8441
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390327
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-05 13:16:57 -05:00
Karol Latecki
d07df58419 test/vhost: common.sh fixes for listing VMs
Add nullglob options where appropriate

Change-Id: If55b0b2e19a7834eaf2efc86b2c23fcc71d8b05f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/389292
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-04 12:48:54 -05:00
Pawel Kaminski
70643bf2a3 test/vhost: Remove ip address from rpc command
Change-Id: I552c46b2bfb01640dd19a6478b56d69574044e70
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/389845
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-01 12:55:35 -05:00
Pawel Wodkowski
2bbe6a8021 test/vhost: remove COMMON_DIR from common.sh
Change-Id: Id6bb86151ec3a90298c135acb45c5cc259975348
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387799
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-28 12:45:28 -05:00
Chen Wang
93848f4114 test/vhost: Remove the repetitive work about kill the vm
When the ((timeo-=1)) value equal to zero, it will cause
the trap in main script to start "error_exit" function
which already does kill the vm.

Change-Id: I30fb7dfa0c3b1a5faa6a88e9743164137b376bef
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/386208
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-27 14:23:37 -05:00
Dariusz Stojaczyk
1a2c100332 Revert "test/vhost/initiator: temporarily disable fio test"
This reverts commit bc5f86e3e9 .

Change-Id: I0cfd05d9b8b05d8607c9ba67cd9ce34f5edcc0de
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/388836
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-27 12:18:24 -05:00
Daniel Verkamp
b81550158d test/vhost: fix vhost_blk RPC tests
Commit c63d9de433 replaced
remove_vhost_blk_controller with remove_vhost_controller, but test
wasn't updated to match.  The test had already been broken before that
point, because the RPC method name was incorrectly spelled using "block"
instead of "blk".  This hadn't been caught because this particular test
is expecting a failure, just not the particular failure that is being
caused by the incorrect method name.

Additionally, the "create block controller with incorrect name" test was
actually using the construct_vhost_scsi_controller RPC rather than
construct_vhost_blk_controller, so fix it while we're here.

Change-Id: Ib60f51639e0a3f65b09e2663186aa259be407ee4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388060
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-22 14:12:12 -05:00
Pawel Wodkowski
b1e850cd10 test/vhost: small fixes to common.sh file
Change-Id: I7dd452a3e9535ad8e2612d8e9d99cf4f7f41b7d5
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387798
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-22 11:30:16 -05:00
Pawel Wodkowski
ac176c7e87 test/vhost: remove outdated README
It is outdated and not really usefull.

Change-Id: Ifcfd1c987467448cb6f827457de215922a701d77
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387797
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-22 11:30:16 -05:00
Pawel Wodkowski
45caa6f859 test/vhost: don't use global VHOST_APP in spdk_vhost_run
This is inconsisten with local variable deffining the same path. We need
also to move negative vhost app tests from run_vhost.sh since VHOST_APP
will not be available anymore.

Change-Id: I21cee58c545357ca7e7997cb529b15d436cfed57
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387561
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-11-22 11:30:16 -05:00
Daniel Verkamp
136e7d13c8 test/vhost/initiator: temporarily disable fio test
Until the fio_plugin unload crash is fixed, disable the fio portion of
the tests so that we can re-enable the rest of the bdev/virtio testing.

Change-Id: I8d18fff729262fa88cbc66fce914cf1ff92db83e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388307
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-11-21 16:33:55 -05:00
Daniel Verkamp
ec1551c598 test/vhost/initiator: fix discover_bdevs usage
discover_bdevs previously took a port number for the RPC service, but
after commit 6bef902ca5 ("rpc: add default UNIX domain socket listen
address"), running rpc.py with just a -p (port) parameter doesn't have
the expected effect, since the default server_addr is now a UNIX domain
socket path, and the port is ignored.

Change discover_bdevs to accept a socket path instead of a port number
to fix the issue for the vhost/initiator test; no other callers use the
disover_bdevs rpc_port argument, so this is the only instance that needs
to change.

Change-Id: I4e290f175ccc79caa3c4ef76c062641b9fe489a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388283
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-21 16:33:55 -05:00
Karol Latecki
5764d85c09 test/vhost: fix typo in spdk_vhost.sh
Typo caused lvol blk test to not run.

Change-Id: I1e26b96757450a3ea860e0b74a0b7d976c86bdf2
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/388413
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-21 13:20:13 -05:00
Karol Latecki
8175e30229 test/vhost: Remove norandommap from vhost initiator tests
Removing norandommap as it is not correct to use with
verify-enabled tests

From fio man:
Normally fio will cover every block of the file when doing
random I/O. If this parameter is given, a new offset will be
chosen without looking at past I/O history.
This parameter is mutually exclusive with verify.

Change-Id: I739642461b3dbe9ab8698836aa120bfb14c2b79e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/385431
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-16 18:26:35 -05:00
Pawel Wodkowski
f7476d444b vhost/test: remove code that build SPDK and QEMU
qemu_build_and_install and spdk_build_and_install are unused for long
time so lets remove them.

As we are here also also remove unused VM_CNT.

Change-Id: I23368b2f2036b9eb82f9ac8e6880242748352e49
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387560
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-15 17:53:19 -05:00
Pawel Wodkowski
32408765d5 test/vhost: small cleanup of spdk_vhost.sh
Fix indentations, rework help message, parametrize VM image.

Change-Id: I4a24c840ae2fec1e77c0e53e2ef6dc227272744b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387138
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-15 17:53:19 -05:00
Jim Harris
6bef902ca5 rpc: add default UNIX domain socket listen address
RPC is a default feature required for almost all usages,
so enable RPC by default, but with a UNIX domain socket
for security reasons.

-r can now be used from the command line to specify
an alternative RPC listen address from the default
/var/tmp/spdk.sock.

Remove the Enable parameter from the Rpc config section
but still allow specifying an alternative listen address
using the Listen parameter as an alternative to the
command line option.  This keeps backward compatibility
for this release for anyone using the configuration file
still.

Remove the Rpc sections from all configuration files
that were using them, except for those that specified
alternate TCP ports for multi-process test cases.  We
can fix these later to use an alternate UNIX domain
socket and to use the command line instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife0d03fcab638c67b659f1eb85348ddc2b55c4c4
Reviewed-on: https://review.gerrithub.io/386561
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-13 14:57:49 -05:00
Piotr Pelplinski
511adde02f lvol: add lvs name in rpc calls
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ic6770371d9d62cbdd40ae0612eb4f7dceccd507f
Reviewed-on: https://review.gerrithub.io/383771
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:10:21 -04:00
Pawel Wodkowski
fb0b17a19f test/vhost: always print command output
In case of error the message is command output and is confusing:

	ERROR! While executing FIO jobs - RC: 1, Err message:
	hostname=VM-11-0xC0000000, be=0, 64-bit, os=Linux, arch=x86-64,
	fio=fio-2.2.10, flags=1
	19:04:59 hostname=VM-10-0x30000000, be=0, 64-bit, os=Linux,
	arch=x86-64, fio=fio-2.2.10, flags=1

So change this to always print command output then error message.

Change-Id: Iee4b25a00438c153a0d4d250ae43fc0d283faf33
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/383596
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:06:40 -04:00
Pawel Wodkowski
d02bfbd3af test/vhost: print backtrace in failure handler
Change-Id: Ic42b54ba502259b73b8110d75dd5ab032f1f0928
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/383490
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:06:40 -04:00