* [PATCH] KVM test: Add new subtest iozone_windows
@ 2010-05-03 22:03 Lucas Meneghel Rodrigues
2010-05-05 10:17 ` Michael Goldish
0 siblings, 1 reply; 3+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-05-03 22:03 UTC (permalink / raw)
To: autotest; +Cc: jes.sorensen, kvm
Following the new IOzone postprocessing changes, add a new
KVM subtest iozone_windows, which takes advantage of the
fact that there's a windows build for the test, so we can
ship it on winutils.iso and run it, providing this way
the ability to track IO performance for windows guests also.
The new test imports the postprocessing library directly
from iozone, so it can postprocess the results right after
the benchmark is finished on the windows guest.
I'll update winutils.iso on the download page soon.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/tests/iozone_windows.py | 40 ++++++++++++++++++++++++++++++
client/tests/kvm/tests_base.cfg.sample | 7 ++++-
2 files changed, 46 insertions(+), 1 deletions(-)
create mode 100644 client/tests/kvm/tests/iozone_windows.py
diff --git a/client/tests/kvm/tests/iozone_windows.py b/client/tests/kvm/tests/iozone_windows.py
new file mode 100644
index 0000000..86ec2c4
--- /dev/null
+++ b/client/tests/kvm/tests/iozone_windows.py
@@ -0,0 +1,40 @@
+import logging, time, os
+from autotest_lib.client.common_lib import error
+from autotest_lib.client.bin import utils
+from autotest_lib.client.tests.iozone import postprocessing
+import kvm_subprocess, kvm_test_utils, kvm_utils
+
+
+def run_iozone_windows(test, params, env):
+ """
+ Run IOzone for windows on a windows guest:
+ 1) Log into a guest
+ 2) Execute the IOzone test contained in the winutils.iso
+ 3) Get results
+ 4) Postprocess it with the IOzone postprocessing module
+
+ @param test: kvm test object
+ @param params: Dictionary with the test parameters
+ @param env: Dictionary with test environment.
+ """
+ vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
+ session = kvm_test_utils.wait_for_login(vm)
+ results_path = os.path.join(test.resultsdir,
+ 'raw_output_%s' % test.iteration)
+ analysisdir = os.path.join(test.resultsdir, 'analysis_%s' % test.iteration)
+
+ # Run IOzone and record its results
+ c = command=params.get("iozone_cmd")
+ t = int(params.get("iozone_timeout"))
+ logging.info("Running IOzone command on guest, timeout %ss", t)
+ results = session.get_command_output(command=c, timeout=t)
+ utils.open_write_close(results_path, results)
+
+ # Postprocess the results using the IOzone postprocessing module
+ logging.info("Iteration succeed, postprocessing")
+ a = postprocessing.IOzoneAnalyzer(list_files=[results_path],
+ output_dir=analysisdir)
+ a.analyze()
+ p = postprocessing.IOzonePlotter(results_file=results_path,
+ output_dir=analysisdir)
+ p.plot_all()
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index f1104ed..e21f3c8 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -214,6 +214,11 @@ variants:
dst_rsc_dir = "C:\"
autoit_entry = "C:\autoit\stub\stub.au3"
+ - iozone_windows: unattended_install
+ type = iozone_windows
+ iozone_cmd = "D:\IOzone\iozone.exe -a"
+ iozone_timeout = 3600
+
- guest_s4: install setup unattended_install
type = guest_s4
check_s4_support_cmd = grep -q disk /sys/power/state
@@ -417,7 +422,7 @@ variants:
variants:
# Linux section
- @Linux:
- no autoit
+ no autoit iozone_windows
shutdown_command = shutdown -h now
reboot_command = shutdown -r now
status_test_command = echo $?
--
1.7.0.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] KVM test: Add new subtest iozone_windows
2010-05-03 22:03 [PATCH] KVM test: Add new subtest iozone_windows Lucas Meneghel Rodrigues
@ 2010-05-05 10:17 ` Michael Goldish
2010-05-05 10:28 ` Lucas Meneghel Rodrigues
0 siblings, 1 reply; 3+ messages in thread
From: Michael Goldish @ 2010-05-05 10:17 UTC (permalink / raw)
To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm, jes.sorensen, dlaor
On 05/04/2010 01:03 AM, Lucas Meneghel Rodrigues wrote:
> Following the new IOzone postprocessing changes, add a new
> KVM subtest iozone_windows, which takes advantage of the
> fact that there's a windows build for the test, so we can
> ship it on winutils.iso and run it, providing this way
> the ability to track IO performance for windows guests also.
> The new test imports the postprocessing library directly
> from iozone, so it can postprocess the results right after
> the benchmark is finished on the windows guest.
>
> I'll update winutils.iso on the download page soon.
>
> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
> ---
> client/tests/kvm/tests/iozone_windows.py | 40 ++++++++++++++++++++++++++++++
> client/tests/kvm/tests_base.cfg.sample | 7 ++++-
> 2 files changed, 46 insertions(+), 1 deletions(-)
> create mode 100644 client/tests/kvm/tests/iozone_windows.py
>
> diff --git a/client/tests/kvm/tests/iozone_windows.py b/client/tests/kvm/tests/iozone_windows.py
> new file mode 100644
> index 0000000..86ec2c4
> --- /dev/null
> +++ b/client/tests/kvm/tests/iozone_windows.py
> @@ -0,0 +1,40 @@
> +import logging, time, os
> +from autotest_lib.client.common_lib import error
> +from autotest_lib.client.bin import utils
> +from autotest_lib.client.tests.iozone import postprocessing
> +import kvm_subprocess, kvm_test_utils, kvm_utils
> +
> +
> +def run_iozone_windows(test, params, env):
> + """
> + Run IOzone for windows on a windows guest:
> + 1) Log into a guest
> + 2) Execute the IOzone test contained in the winutils.iso
> + 3) Get results
> + 4) Postprocess it with the IOzone postprocessing module
> +
> + @param test: kvm test object
> + @param params: Dictionary with the test parameters
> + @param env: Dictionary with test environment.
> + """
> + vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
> + session = kvm_test_utils.wait_for_login(vm)
> + results_path = os.path.join(test.resultsdir,
> + 'raw_output_%s' % test.iteration)
> + analysisdir = os.path.join(test.resultsdir, 'analysis_%s' % test.iteration)
> +
> + # Run IOzone and record its results
> + c = command=params.get("iozone_cmd")
'command=' looks unnecessary here.
> + t = int(params.get("iozone_timeout"))
> + logging.info("Running IOzone command on guest, timeout %ss", t)
> + results = session.get_command_output(command=c, timeout=t)
Does IOzone produce any output while it's running or only when it's
done? If the former is true, we might want to print that output as it's
being produced:
results = session.get_command_output(command=c, timeout=t,
print_func=logging.debug)
> + utils.open_write_close(results_path, results)
> +
> + # Postprocess the results using the IOzone postprocessing module
> + logging.info("Iteration succeed, postprocessing")
> + a = postprocessing.IOzoneAnalyzer(list_files=[results_path],
> + output_dir=analysisdir)
> + a.analyze()
> + p = postprocessing.IOzonePlotter(results_file=results_path,
> + output_dir=analysisdir)
> + p.plot_all()
> diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
> index f1104ed..e21f3c8 100644
> --- a/client/tests/kvm/tests_base.cfg.sample
> +++ b/client/tests/kvm/tests_base.cfg.sample
> @@ -214,6 +214,11 @@ variants:
> dst_rsc_dir = "C:\"
> autoit_entry = "C:\autoit\stub\stub.au3"
>
> + - iozone_windows: unattended_install
> + type = iozone_windows
> + iozone_cmd = "D:\IOzone\iozone.exe -a"
> + iozone_timeout = 3600
> +
> - guest_s4: install setup unattended_install
> type = guest_s4
> check_s4_support_cmd = grep -q disk /sys/power/state
> @@ -417,7 +422,7 @@ variants:
> variants:
> # Linux section
> - @Linux:
> - no autoit
> + no autoit iozone_windows
> shutdown_command = shutdown -h now
> reboot_command = shutdown -r now
> status_test_command = echo $?
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] KVM test: Add new subtest iozone_windows
2010-05-05 10:17 ` Michael Goldish
@ 2010-05-05 10:28 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 3+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-05-05 10:28 UTC (permalink / raw)
To: Michael Goldish; +Cc: autotest, jes.sorensen, kvm
On Wed, 2010-05-05 at 13:17 +0300, Michael Goldish wrote:
> On 05/04/2010 01:03 AM, Lucas Meneghel Rodrigues wrote:
> > Following the new IOzone postprocessing changes, add a new
> > KVM subtest iozone_windows, which takes advantage of the
> > fact that there's a windows build for the test, so we can
> > ship it on winutils.iso and run it, providing this way
> > the ability to track IO performance for windows guests also.
> > The new test imports the postprocessing library directly
> > from iozone, so it can postprocess the results right after
> > the benchmark is finished on the windows guest.
> >
> > I'll update winutils.iso on the download page soon.
> >
> > Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
> > ---
> > client/tests/kvm/tests/iozone_windows.py | 40 ++++++++++++++++++++++++++++++
> > client/tests/kvm/tests_base.cfg.sample | 7 ++++-
> > 2 files changed, 46 insertions(+), 1 deletions(-)
> > create mode 100644 client/tests/kvm/tests/iozone_windows.py
> >
> > diff --git a/client/tests/kvm/tests/iozone_windows.py b/client/tests/kvm/tests/iozone_windows.py
> > new file mode 100644
> > index 0000000..86ec2c4
> > --- /dev/null
> > +++ b/client/tests/kvm/tests/iozone_windows.py
> > @@ -0,0 +1,40 @@
> > +import logging, time, os
> > +from autotest_lib.client.common_lib import error
> > +from autotest_lib.client.bin import utils
> > +from autotest_lib.client.tests.iozone import postprocessing
> > +import kvm_subprocess, kvm_test_utils, kvm_utils
> > +
> > +
> > +def run_iozone_windows(test, params, env):
> > + """
> > + Run IOzone for windows on a windows guest:
> > + 1) Log into a guest
> > + 2) Execute the IOzone test contained in the winutils.iso
> > + 3) Get results
> > + 4) Postprocess it with the IOzone postprocessing module
> > +
> > + @param test: kvm test object
> > + @param params: Dictionary with the test parameters
> > + @param env: Dictionary with test environment.
> > + """
> > + vm = kvm_test_utils.get_living_vm(env, params.get("main_vm"))
> > + session = kvm_test_utils.wait_for_login(vm)
> > + results_path = os.path.join(test.resultsdir,
> > + 'raw_output_%s' % test.iteration)
> > + analysisdir = os.path.join(test.resultsdir, 'analysis_%s' % test.iteration)
> > +
> > + # Run IOzone and record its results
> > + c = command=params.get("iozone_cmd")
>
> 'command=' looks unnecessary here.
Funny, only realized that I left this variable now that you've
mentioned :) Will fix it
> > + t = int(params.get("iozone_timeout"))
> > + logging.info("Running IOzone command on guest, timeout %ss", t)
> > + results = session.get_command_output(command=c, timeout=t)
>
> Does IOzone produce any output while it's running or only when it's
> done? If the former is true, we might want to print that output as it's
> being produced:
>
> results = session.get_command_output(command=c, timeout=t,
> print_func=logging.debug)
Good point, it generates output while it's running, that just haven't
occurred to me.
Fixed all in r4467
http://autotest.kernel.org/changeset/4467
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-05 10:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 22:03 [PATCH] KVM test: Add new subtest iozone_windows Lucas Meneghel Rodrigues
2010-05-05 10:17 ` Michael Goldish
2010-05-05 10:28 ` Lucas Meneghel Rodrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox