diff --git a/test/vhost/migration/migration-tc1.sh b/test/vhost/migration/migration-tc1.sh index 6c4e2e5df0..9bf54e0d64 100644 --- a/test/vhost/migration/migration-tc1.sh +++ b/test/vhost/migration/migration-tc1.sh @@ -119,5 +119,3 @@ function migration_tc1() notice "Migration TC1 SUCCESS" } - -migration_tc1 diff --git a/test/vhost/migration/migration-tc2.sh b/test/vhost/migration/migration-tc2.sh index 421c1e568b..05f153d4f6 100644 --- a/test/vhost/migration/migration-tc2.sh +++ b/test/vhost/migration/migration-tc2.sh @@ -204,5 +204,3 @@ function migration_tc2() migration_tc2_cleanup_vhost_config notice "Migration TC2 SUCCESS" } - -migration_tc2 diff --git a/test/vhost/migration/migration.sh b/test/vhost/migration/migration.sh index 4180ef337e..884f9404e1 100755 --- a/test/vhost/migration/migration.sh +++ b/test/vhost/migration/migration.sh @@ -4,6 +4,9 @@ testdir=$(readlink -f $(dirname $0)) rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/vhost/common.sh +source $testdir/migration-tc1.sh +source $testdir/migration-tc2.sh + vms=() declare -A vms_os @@ -13,7 +16,6 @@ declare -A vms_ctrlrs_disks # By default use Guest fio fio_bin="" -test_cases="" MGMT_TARGET_IP="" MGMT_INITIATOR_IP="" RDMA_TARGET_IP="" @@ -26,8 +28,6 @@ function usage() echo echo " --os ARGS VM configuration. This parameter might be used more than once:" echo " --fio-bin=FIO Use specific fio binary (will be uploaded to VM)" - echo " --test-cases=TESTS Coma-separated list of tests to run. Implemented test cases are: 1" - echo " See test/vhost/test_plan.md for more info." echo " --mgmt-tgt-ip=IP IP address of target." echo " --mgmt-init-ip=IP IP address of initiator." echo " --rdma-tgt-ip=IP IP address of targets rdma capable NIC." @@ -43,7 +43,6 @@ for param in "$@"; do ;; --os=*) os_image="${param#*=}" ;; --fio-bin=*) fio_bin="${param}" ;; - --test-cases=*) test_cases="${param#*=}" ;; --mgmt-tgt-ip=*) MGMT_TARGET_IP="${param#*=}" ;; --mgmt-init-ip=*) MGMT_INITIATOR_IP="${param#*=}" ;; --rdma-tgt-ip=*) RDMA_TARGET_IP="${param#*=}" ;; @@ -58,8 +57,6 @@ done vhosttestinit -[[ -n "$test_cases" ]] || fail "Need '--test-cases=' parameter" - trap 'error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT function vm_monitor_send() @@ -139,19 +136,8 @@ function is_fio_running() return $ret } -for test_case in ${test_cases//,/ }; do - assert_number "$test_case" - notice "===============================" - notice "Running Migration test case ${test_case}" - notice "===============================" - - timing_enter migration-tc${test_case} - source $testdir/migration-tc${test_case}.sh - timing_exit migration-tc${test_case} -done - -notice "Migration Test SUCCESS" -notice "===============" +run_test "case" "vhost_migration_tc1" migration_tc1 +run_test "case" "vhost_migration_tc2" migration_tc2 trap - SIGINT ERR EXIT diff --git a/test/vhost/vhost.sh b/test/vhost/vhost.sh index d75a24db0f..84bf390125 100755 --- a/test/vhost/vhost.sh +++ b/test/vhost/vhost.sh @@ -100,7 +100,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then echo 'Running migration suite...' run_test case "vhost_migration" $WORKDIR/migration/migration.sh -x \ - --fio-bin=$FIO_BIN --os=$VM_IMAGE --test-cases=1,2 + --fio-bin=$FIO_BIN --os=$VM_IMAGE fi echo 'Running lvol integrity suite...'