From: Michael Goldish Subject: [KVM-AUTOTEST PATCH 28/28] KVM test: whql_submission.py: log in using all NICs before running tests Date: Mon, 27 Dec 2010 18:01:55 +0200 Message-ID: <1293465715-16599-28-git-send-email-mgoldish@redhat.com> References: <1293465715-16599-1-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1293465715-16599-1-git-send-email-mgoldish@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org This will make sure all NICs are up before beginning testing. Useful for network tests. For other tests it should be harmless as they only use a single NIC. Signed-off-by: Michael Goldish --- client/tests/kvm/tests/whql_submission.py | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests/whql_submission.py b/client/tests/kvm/tests/whql_submission.py index e40e369..2d01e30 100644 --- a/client/tests/kvm/tests/whql_submission.py +++ b/client/tests/kvm/tests/whql_submission.py @@ -25,6 +25,13 @@ def run_whql_submission(test, params, env): vms.append(kvm_test_utils.get_living_vm(env, vm_name)) sessions.append(kvm_test_utils.wait_for_login(vms[-1], 0, 240)) + # Make sure all NICs of all client VMs are up + for vm in vms: + nics = kvm_utils.get_sub_dict_names(vm.params, "nics") + for nic_index in range(len(nics)): + s = kvm_test_utils.wait_for_login(vm, nic_index, 600) + s.close() + # Collect parameters server_address = params.get("server_address") server_shell_port = int(params.get("server_shell_port")) @@ -68,6 +75,13 @@ def run_whql_submission(test, params, env): sessions = kvm_utils.parallel((kvm_test_utils.reboot, (vm, session)) for vm, session in zip(vms, sessions)) + # Check the NICs again + for vm in vms: + nics = kvm_utils.get_sub_dict_names(vm.params, "nics") + for nic_index in range(len(nics)): + s = kvm_test_utils.wait_for_login(vm, nic_index, 600) + s.close() + # Run whql_pre_command and close the sessions if params.get("whql_pre_command"): for session in sessions: -- 1.7.3.3