[Autotest] [KVM-AUTOTEST][PATCH V2] Patch to install cygwin and run autotest in windows

2010-09-27 Thread Yogananth Subramanian
Hello Lucas,
I like to resubmit this patch, in the previous patch i had hard coded it for
 doing local installation and had missed the remote installation part. So in 
this patch i have fixed it,  'cyg_param' take different vlaues for local and 
remote install, to avoid the error in previous patch.
Have also altered the commit message, to make it more lucid. 

Thanks
yogi
  
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Autotest] [KVM-AUTOTEST] Patch to install cygwin and run autotest in windows

2010-09-13 Thread yogi
Hello Lucas,

I like to submit patch to do unattended install of cygwin and run
autotest test case on Windows guests using cygwin. 
Cygwin enable running some of test like stress, lmbench, bonnie,
compilebench and netperf directly under windows, but most of the tests
need to be patched before they could run on Windows. So this patch
introduces a new parameter 'test_patch_file' in tests_config  to
indicate the patch file. Two new files are added related to patching
autotest, 'autotest.patch' which is like base patch for autotest, needed
to run autotest in windows and 'iozone.patch' which to used run iozone
on windows. Similar patches could be developed for test cases like
'dacapo'  and sysbench which would enable running tests related to java
and  mysql/postgresql, i will be happy to write patches for them too.

This patch also adds two new files 'scripts/cyg_install.py' and
'tests/cyg_install'. 'scripts/cyg_install.py' is used to do unattended
install on cygwin. The parameter 'cyg_path' indicates the path of the
setup file. Installation can be done either local, using
'cyg_install.local' or remotly,using cyg_install.remote'.
Local installation requires both the cygwin setup and packages files to
be present locally at the path indicated by  'cyg_path'. The parameter
'cyg_param' is used to pass the command line options for cygwin setup.
So it can contain options for packages to be installed, proxy server to
be used to do remote installation and so on. An iso image cyg.iso
containing the setup and packages in case of local install and just the
setup in case of remote install, is created on the fly. Installation is
started using telnet.

This patch acts as complement to the existing support for running tests
using Autoit.I will be happy to re-implement or modify the patch based
to your comments and also write patch for other test cases like
sysbench, dacapo.

From 745d87681a33cc14431dc1b6b35cd977112b0fee Mon Sep 17 00:00:00 2001
From: Yogananth Subramanian anant...@linux.vnet.ibm.com
Date: Fri, 10 Sep 2010 20:40:16 +0530
Subject: [PATCH] This patch enables installing cygwin and running
autotest in windows guests

The patch creates two new files 'scripts/cyg_install.py' and
'tests/cyg_install'. 'scripts/cyg_install.py' is used to install cygwin
in
unattended mode. This patch also introduces a new parameter
'patch_file'to
run_autotest() in kvm_test_utils.py file, to install patch for autotest
to
run in windows. The file 'autotest_control/autotest.patch' is base patch
to
run any autotest test cases in windows and file
'autotest_control/iozone.patch'
is a patch to run iozone on windows.

Signed-off-by: Yogananth Subramanian anant...@linux.vnet.ibm.com
---
 client/tests/kvm/autotest_control/autotest.patch |   15 
 client/tests/kvm/autotest_control/iozone.patch   |   12 +++
 client/tests/kvm/kvm_test_utils.py   |   10 ++-
 client/tests/kvm/scripts/cyg_install.py  |   98
++
 client/tests/kvm/tests/autotest.py   |   21 -
 client/tests/kvm/tests/cyg_install.py|   36 
 client/tests/kvm/tests_base.cfg.sample   |   43 +-
 7 files changed, 231 insertions(+), 4 deletions(-)
 create mode 100644 client/tests/kvm/autotest_control/autotest.patch
 create mode 100644 client/tests/kvm/autotest_control/iozone.patch
 create mode 100755 client/tests/kvm/scripts/cyg_install.py
 create mode 100644 client/tests/kvm/tests/cyg_install.py

diff --git a/client/tests/kvm/autotest_control/autotest.patch
b/client/tests/kvm/autotest_control/autotest.patch
new file mode 100644
index 000..f562f95
--- /dev/null
+++ b/client/tests/kvm/autotest_control/autotest.patch
@@ -0,0 +1,15 @@
+diff -aurpN client/bin/job.py client-new/bin/job.py
+--- client/bin/job.py   2010-08-25 01:42:27.0 -0400
 client-new/bin/job.py   2010-09-07 09:54:30.0 -0400
+@@ -296,7 +296,10 @@ class base_client_job(base_job.base_job)
+
+ # extract console= and other args from cmdline and add them
into the
+ # base args that we use for all kernels we install
+-cmdline = utils.read_one_line('/proc/cmdline')
++if os.path.exists('/proc/cmdline'):
++cmdline = utils.read_one_line('/proc/cmdline')
++else:
++return
+ kernel_args = []
+ for karg in cmdline.split():
+ for param in copy_cmdline:
diff --git a/client/tests/kvm/autotest_control/iozone.patch
b/client/tests/kvm/autotest_control/iozone.patch
new file mode 100644
index 000..6229205
--- /dev/null
+++ b/client/tests/kvm/autotest_control/iozone.patch
@@ -0,0 +1,12 @@
+diff -aurpN client/tests/iozone/iozone.py
client-new/tests/iozone/iozone.py
+--- client/tests/iozone/iozone.py   2010-08-25 01:42:27.0
-0400
 client-new/tests/iozone/iozone.py   2010-09-02 11:38:42.0
-0400
+@@ -43,7 +43,7 @@ class iozone(test.test):
+ elif (arch == 'x86_64'):
+ utils.system('make linux-AMD64')
+ 

Re: [Autotest] [KVM-AUTOTEST] Patch to install cygwin and run autotest in windows

2010-09-13 Thread Lucas Meneghel Rodrigues
On Mon, 2010-09-13 at 15:01 +0530, yogi wrote:
 Hello Lucas,
 
 I like to submit patch to do unattended install of cygwin and run
 autotest test case on Windows guests using cygwin. 
 Cygwin enable running some of test like stress, lmbench, bonnie,
 compilebench and netperf directly under windows, but most of the tests
 need to be patched before they could run on Windows. So this patch
 introduces a new parameter 'test_patch_file' in tests_config  to
 indicate the patch file. Two new files are added related to patching
 autotest, 'autotest.patch' which is like base patch for autotest, needed
 to run autotest in windows and 'iozone.patch' which to used run iozone
 on windows. Similar patches could be developed for test cases like
 'dacapo'  and sysbench which would enable running tests related to java
 and  mysql/postgresql, i will be happy to write patches for them too.

Hi Yogi,

The idea is very interesting! However, your mail client chewed the
patch, you apparently pasted the diffs generated by git format-patch
into your mail client window, not an optimal way to do things.

Please refer to http://autotest.kernel.org/wiki/GitWorkflow for a quick
guide on how to configure git to use git send-email, so your patches
will be perfectly mailed to the mailing list.

Your patches touch some core infrastructure of autotest, I'll have to
review the strategy used very carefully, so please be patient.

Thanks for your contribution,

Lucas


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Patch to install cygwin and run autotest in windows

2010-09-13 Thread Yogananth Subramanian
Hello Lucas,
Submitting the patch again using git send-email, there was some issue with 
git config, its resolved now.Thanks for the link.

I tried not to make any drastic change to the kvm-autotest infrastructure, 
run_autotest() accepts an additonal parameter, other then that rest of the
patch does not make any  major change to existing code. 

Pasting below the contents of my previous mail, for reference.
Autotest part of the patch: 
This patch introduces a new parameter 'test_patch_file' in tests_config  to
indicate the patch file. Two new files are added related to patching
autotest, 'autotest.patch' which is like base patch for autotest, needed
to run autotest in windows and 'iozone.patch' which to used run iozone
on windows. Similar patches could be developed for test cases like
'dacapo'  and sysbench which would enable running tests related to java
and  mysql/postgresql, i will be happy to write patches for them too.

Cygwin installtion part of the patch:
This patch also adds two new files 'scripts/cyg_install.py' and
'tests/cyg_install'. 'scripts/cyg_install.py' is used to do unattended
install on cygwin. The parameter 'cyg_path' indicates the path of the
setup file. Installation can be done either local, using
'cyg_install.local' or remotly,using cyg_install.remote'.
Local installation requires both the cygwin setup and packages files to
be present locally at the path indicated by  'cyg_path'. The parameter
'cyg_param' is used to pass the command line options for cygwin setup.
So it can contain options for packages to be installed, proxy server to
be used to do remote installation and so on. An iso image cyg.iso
containing the setup and packages in case of local install and just the
setup in case of remote install, is created on the fly. Installation is
started using telnet.

This patch acts as complement to the existing support for running tests
using Autoit.I will be happy to re-implement or modify the patch based
to your comments and also write patch for other test cases like
sysbench, dacapo.

Thanks
yogi
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html