From patchwork Mon Dec 27 16:01:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 434571 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBRKCV9k025997 for ; Mon, 27 Dec 2010 20:16:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754420Ab0L0QCi (ORCPT ); Mon, 27 Dec 2010 11:02:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53309 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754395Ab0L0QCh (ORCPT ); Mon, 27 Dec 2010 11:02:37 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBRG2aTU029461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Dec 2010 11:02:37 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBRG2ata030699; Mon, 27 Dec 2010 11:02:36 -0500 Received: from moof.tlv.redhat.com (dhcp-1-185.tlv.redhat.com [10.35.1.185]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id oBRG1rGC017175; Mon, 27 Dec 2010 11:02:35 -0500 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 24/28] KVM test: whql.client_install: setup auto logon for DTMLLUAdminUser Date: Mon, 27 Dec 2010 18:01:51 +0200 Message-Id: <1293465715-16599-24-git-send-email-mgoldish@redhat.com> In-Reply-To: <1293465715-16599-1-git-send-email-mgoldish@redhat.com> References: <1293465715-16599-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Dec 2010 20:16:58 +0000 (UTC) diff --git a/client/tests/kvm/tests/whql_client_install.py b/client/tests/kvm/tests/whql_client_install.py index 8e63d10..c2616c6 100644 --- a/client/tests/kvm/tests/whql_client_install.py +++ b/client/tests/kvm/tests/whql_client_install.py @@ -13,6 +13,9 @@ def run_whql_client_install(test, params, env): 5) Move the client machine into the server's workgroup 6) Reboot the client machine 7) Install the DTM client software + 8) Setup auto logon for the user created by the installation + (normally DTMLLUAdminUser) + 9) Reboot again @param test: kvm test object @param params: Dictionary with the test parameters @@ -29,6 +32,8 @@ def run_whql_client_install(test, params, env): "Microsoft Driver Test Manager\\Studio") server_username = params.get("server_username") server_password = params.get("server_password") + client_username = params.get("client_username") + client_password = params.get("client_password") dsso_delete_machine_binary = params.get("dsso_delete_machine_binary", "deps/whql_delete_machine_15.exe") dsso_delete_machine_binary = kvm_utils.get_path(test.bindir, @@ -115,4 +120,16 @@ def run_whql_client_install(test, params, env): logging.info("Installing DTM client (timeout=%ds)", install_timeout) install_cmd = r"cmd /c \\%s\%s" % (server_name, install_cmd.lstrip("\\")) session.cmd(install_cmd, timeout=install_timeout) + + # Setup auto logon + logging.info("Setting up auto logon for user '%s'", client_username) + cmd = ('reg add ' + '"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\winlogon" ' + '/v "%s" /d "%s" /t REG_SZ /f') + session.cmd(cmd % ("AutoAdminLogon", "1")) + session.cmd(cmd % ("DefaultUserName", client_username)) + session.cmd(cmd % ("DefaultPassword", client_password)) + + # Reboot one more time + session = kvm_test_utils.reboot(vm, session) session.close() diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample index c765463..302c3d8 100644 --- a/client/tests/kvm/tests_base.cfg.sample +++ b/client/tests/kvm/tests_base.cfg.sample @@ -375,6 +375,12 @@ variants: # (the final cmd will be something like \\servername\DTMInstall\...) install_cmd = \DTMInstall\Client\Setup.exe /passive install_timeout = 3600 + # The test will setup auto logon on the client machine using the + # following username and password: + client_username = DTMLLUAdminUser + client_password = Testpassword,1 + # (These are created by the DTM client installer and should probably not + # be changed.) variants: - @original: - support_vm: