* Re: [Autotest] [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample Michael Goldish
@ 2009-07-21 9:47 ` Dor Laor
0 siblings, 0 replies; 3+ messages in thread
From: Dor Laor @ 2009-07-21 9:47 UTC (permalink / raw)
To: Michael Goldish; +Cc: autotest, kvm
On 07/20/2009 06:07 PM, Michael Goldish wrote:
> Currently the test will only run on Windows.
> It should be able to run on Linux just as well, but if I understand correctly,
> testing time drift on Linux is less interesting.
Linux is interesting too. The problem is more visible on windows since
it uses 1000hz frequency when it plays multimedia. It makes timer irq
injection harder.
Does the test fail without the rtc-td-hack?
>
> Also make some tiny cosmetic changes (spacing), and move the stress_boot test
> before the shutdown test (shutdown should be last).
>
> Signed-off-by: Michael Goldish<mgoldish@redhat.com>
> ---
> client/tests/kvm/kvm_tests.cfg.sample | 46 ++++++++++++++++++++++++++------
> 1 files changed, 37 insertions(+), 9 deletions(-)
>
> diff --git a/client/tests/kvm/kvm_tests.cfg.sample b/client/tests/kvm/kvm_tests.cfg.sample
> index 1288952..2d75a66 100644
> --- a/client/tests/kvm/kvm_tests.cfg.sample
> +++ b/client/tests/kvm/kvm_tests.cfg.sample
> @@ -92,20 +92,33 @@ variants:
> test_name = disktest
> test_control_file = disktest.control
>
> - - linux_s3: install setup
> + - linux_s3: install setup
> type = linux_s3
>
> - - shutdown: install setup
> + - timedrift: install setup
> + type = timedrift
> + extra_params += " -rtc-td-hack"
> + # Pin the VM and host load to CPU #0
> + cpu_mask = 0x1
> + # Set the load and rest durations
> + load_duration = 20
> + rest_duration = 20
> + # Fail if the drift after load is higher than 50%
> + drift_threshold = 50
> + # Fail if the drift after the rest period is higher than 10%
> + drift_threshold_after_rest = 10
> +
> + - stress_boot: install setup
> + type = stress_boot
> + max_vms = 5
> + alive_test_cmd = ps aux
> +
> + - shutdown: install setup
> type = shutdown
> kill_vm = yes
> kill_vm_gracefully = no
>
>
> - - stress_boot:
> - type = stress_boot
> - max_vms = 5
> - alive_test_cmd = ps aux
> -
> # NICs
> variants:
> - @rtl8139:
> @@ -121,6 +134,7 @@ variants:
> variants:
> # Linux section
> - @Linux:
> + no timedrift
> cmd_shutdown = shutdown -h now
> cmd_reboot = shutdown -r now
> ssh_status_test_command = echo $?
> @@ -303,8 +317,6 @@ variants:
> md5sum=bf4635e4a4bd3b43838e72bc8c329d55
> md5sum_1m=18ecd37b639109f1b2af05cfb57dfeaf
>
> -
> -
> # Windows section
> - @Windows:
> no autotest
> @@ -318,6 +330,21 @@ variants:
> migration_test_command = ver&& vol
> stress_boot:
> alive_test_cmd = systeminfo
> + timedrift:
> + # For this to work, the ISO should contain vlc (vlc.exe) and a video (ED_1024.avi)
> + cdrom = windows/vlc.iso
> + time_command = "echo TIME: %date% %time%"
> + time_filter_re = "(?<=TIME: \w\w\w ).{19}(?=\.\d\d)"
> + time_format = "%m/%d/%Y %H:%M:%S"
> + guest_load_command = 'cmd /c "d:\vlc -f --loop --no-qt-privacy-ask --no-qt-system-tray d:\ED_1024.avi"'
> + # Alternative guest load:
> + #guest_load_command = "(dir /s&& dir /s&& dir /s&& dir /s)> nul"
> + guest_load_stop_command = "taskkill /F /IM vlc.exe"
> + guest_load_instances = 2
> + host_load_command = "bzip2 -c --best /dev/urandom> /dev/null"
> + # Alternative host load:
> + #host_load_command = "dd if=/dev/urandom of=/dev/null"
> + host_load_instances = 8
>
> variants:
> - Win2000:
> @@ -582,5 +609,6 @@ variants:
> only qcow2.*ide.*default.*up.*Ubuntu-8.10-server.*(autotest.sleeptest)
> only rtl8139
>
> +
> # Choose your test list
> only fc8_quick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Autotest] [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample
[not found] <925924498.753771248172831899.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
@ 2009-07-21 10:41 ` Michael Goldish
2009-07-21 17:33 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: Michael Goldish @ 2009-07-21 10:41 UTC (permalink / raw)
To: dlaor; +Cc: autotest, kvm
----- "Dor Laor" <dlaor@redhat.com> wrote:
> On 07/20/2009 06:07 PM, Michael Goldish wrote:
> > Currently the test will only run on Windows.
> > It should be able to run on Linux just as well, but if I understand
> correctly,
> > testing time drift on Linux is less interesting.
>
> Linux is interesting too. The problem is more visible on windows
> since
> it uses 1000hz frequency when it plays multimedia. It makes timer irq
> injection harder.
If I understand correctly, most Linuxes don't use RTC at all (please
correct me if I'm wrong). This means there's no point in testing
time drift on Linux, because even if there's any drift, it won't get
corrected by -rtc-td-hack. And it's pretty hard to get a drift on
RHEL-3.9 for example -- at least it was very hard for me.
> Does the test fail without the rtc-td-hack?
The problem with the test is that it's hard to decide on the drift
thresholds for failure, because the more load you use, the larger the
drift you get.
-rtc-td-hack makes it harder to get a drift -- you need to add more load
in order to get the same drift.
However, in my experiments, when I got a drift, it was not corrected when
the load stopped. If I get 5 seconds of drift during load, and then I
stop the load and wait, the drift remains 5 seconds, which makes me think
I may be doing something wrong. I never got to see the cool fast rotating
clock either.
Another weird thing I noticed was that the drift was much larger when the
VM and load were NOT pinned to a single CPU. It could cause a leap from 5%
to 30%. (my office desktop has 2 CPUs.)
I used Vista with kvm-85 I think. I tried both video load (VLC) and dir /s.
Even if I did something wrong, I hope the test itself is OK, because its
behavior is completely configurable.
> >
> > Also make some tiny cosmetic changes (spacing), and move the
> stress_boot test
> > before the shutdown test (shutdown should be last).
> >
> > Signed-off-by: Michael Goldish<mgoldish@redhat.com>
> > ---
> > client/tests/kvm/kvm_tests.cfg.sample | 46
> ++++++++++++++++++++++++++------
> > 1 files changed, 37 insertions(+), 9 deletions(-)
> >
> > diff --git a/client/tests/kvm/kvm_tests.cfg.sample
> b/client/tests/kvm/kvm_tests.cfg.sample
> > index 1288952..2d75a66 100644
> > --- a/client/tests/kvm/kvm_tests.cfg.sample
> > +++ b/client/tests/kvm/kvm_tests.cfg.sample
> > @@ -92,20 +92,33 @@ variants:
> > test_name = disktest
> > test_control_file = disktest.control
> >
> > - - linux_s3: install setup
> > + - linux_s3: install setup
> > type = linux_s3
> >
> > - - shutdown: install setup
> > + - timedrift: install setup
> > + type = timedrift
> > + extra_params += " -rtc-td-hack"
> > + # Pin the VM and host load to CPU #0
> > + cpu_mask = 0x1
> > + # Set the load and rest durations
> > + load_duration = 20
> > + rest_duration = 20
> > + # Fail if the drift after load is higher than 50%
> > + drift_threshold = 50
> > + # Fail if the drift after the rest period is higher than
> 10%
> > + drift_threshold_after_rest = 10
> > +
> > + - stress_boot: install setup
> > + type = stress_boot
> > + max_vms = 5
> > + alive_test_cmd = ps aux
> > +
> > + - shutdown: install setup
> > type = shutdown
> > kill_vm = yes
> > kill_vm_gracefully = no
> >
> >
> > - - stress_boot:
> > - type = stress_boot
> > - max_vms = 5
> > - alive_test_cmd = ps aux
> > -
> > # NICs
> > variants:
> > - @rtl8139:
> > @@ -121,6 +134,7 @@ variants:
> > variants:
> > # Linux section
> > - @Linux:
> > + no timedrift
> > cmd_shutdown = shutdown -h now
> > cmd_reboot = shutdown -r now
> > ssh_status_test_command = echo $?
> > @@ -303,8 +317,6 @@ variants:
> >
> md5sum=bf4635e4a4bd3b43838e72bc8c329d55
> >
> md5sum_1m=18ecd37b639109f1b2af05cfb57dfeaf
> >
> > -
> > -
> > # Windows section
> > - @Windows:
> > no autotest
> > @@ -318,6 +330,21 @@ variants:
> > migration_test_command = ver&& vol
> > stress_boot:
> > alive_test_cmd = systeminfo
> > + timedrift:
> > + # For this to work, the ISO should contain vlc
> (vlc.exe) and a video (ED_1024.avi)
> > + cdrom = windows/vlc.iso
> > + time_command = "echo TIME: %date% %time%"
> > + time_filter_re = "(?<=TIME: \w\w\w ).{19}(?=\.\d\d)"
> > + time_format = "%m/%d/%Y %H:%M:%S"
> > + guest_load_command = 'cmd /c "d:\vlc -f --loop
> --no-qt-privacy-ask --no-qt-system-tray d:\ED_1024.avi"'
> > + # Alternative guest load:
> > + #guest_load_command = "(dir /s&& dir /s&& dir /s&&
> dir /s)> nul"
> > + guest_load_stop_command = "taskkill /F /IM vlc.exe"
> > + guest_load_instances = 2
> > + host_load_command = "bzip2 -c --best /dev/urandom>
> /dev/null"
> > + # Alternative host load:
> > + #host_load_command = "dd if=/dev/urandom of=/dev/null"
> > + host_load_instances = 8
> >
> > variants:
> > - Win2000:
> > @@ -582,5 +609,6 @@ variants:
> > only
> qcow2.*ide.*default.*up.*Ubuntu-8.10-server.*(autotest.sleeptest)
> > only rtl8139
> >
> > +
> > # Choose your test list
> > only fc8_quick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Autotest] [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample
2009-07-21 10:41 ` [Autotest] [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample Michael Goldish
@ 2009-07-21 17:33 ` Marcelo Tosatti
0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2009-07-21 17:33 UTC (permalink / raw)
To: Michael Goldish; +Cc: dlaor, autotest, kvm
On Tue, Jul 21, 2009 at 06:41:09AM -0400, Michael Goldish wrote:
>
> ----- "Dor Laor" <dlaor@redhat.com> wrote:
>
> > On 07/20/2009 06:07 PM, Michael Goldish wrote:
> > > Currently the test will only run on Windows.
> > > It should be able to run on Linux just as well, but if I understand
> > correctly,
> > > testing time drift on Linux is less interesting.
> >
> > Linux is interesting too. The problem is more visible on windows
> > since
> > it uses 1000hz frequency when it plays multimedia. It makes timer irq
> > injection harder.
>
> If I understand correctly, most Linuxes don't use RTC at all (please
> correct me if I'm wrong). This means there's no point in testing
> time drift on Linux, because even if there's any drift, it won't get
> corrected by -rtc-td-hack. And it's pretty hard to get a drift on
> RHEL-3.9 for example -- at least it was very hard for me.
https://bugzilla.redhat.com/show_bug.cgi?id=507834 for example.
Also we'd like to test different clocks. For example with RHEL5 you can
choose, via a kernel boot parameter the following clocks:
clock= [BUGS=IA-32, HW] gettimeofday clocksource override.
[Deprecated]
Forces specified clocksource (if avaliable) to be used
when calculating gettimeofday(). If specified
clocksource is not avalible, it defaults to PIT.
Format: { pit | tsc | cyclone | pmtmr }
>From Documentation/kernel-parameters.txt file of the 2.6.18 kernel.
Passing options to the guest kernel is also required for other things,
and perhaps there should be a generic mechanism to do it.
> > Does the test fail without the rtc-td-hack?
>
> The problem with the test is that it's hard to decide on the drift
> thresholds for failure, because the more load you use, the larger the
> drift you get.
> -rtc-td-hack makes it harder to get a drift -- you need to add more load
> in order to get the same drift.
> However, in my experiments, when I got a drift, it was not corrected when
> the load stopped. If I get 5 seconds of drift during load, and then I
> stop the load and wait, the drift remains 5 seconds, which makes me think
> I may be doing something wrong. I never got to see the cool fast rotating
> clock either.
> Another weird thing I noticed was that the drift was much larger when the
> VM and load were NOT pinned to a single CPU. It could cause a leap from 5%
> to 30%. (my office desktop has 2 CPUs.)
> I used Vista with kvm-85 I think. I tried both video load (VLC) and dir /s.
> Even if I did something wrong, I hope the test itself is OK, because its
> behavior is completely configurable.
>
> > >
> > > Also make some tiny cosmetic changes (spacing), and move the
> > stress_boot test
> > > before the shutdown test (shutdown should be last).
> > >
> > > Signed-off-by: Michael Goldish<mgoldish@redhat.com>
> > > ---
> > > client/tests/kvm/kvm_tests.cfg.sample | 46
> > ++++++++++++++++++++++++++------
> > > 1 files changed, 37 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/client/tests/kvm/kvm_tests.cfg.sample
> > b/client/tests/kvm/kvm_tests.cfg.sample
> > > index 1288952..2d75a66 100644
> > > --- a/client/tests/kvm/kvm_tests.cfg.sample
> > > +++ b/client/tests/kvm/kvm_tests.cfg.sample
> > > @@ -92,20 +92,33 @@ variants:
> > > test_name = disktest
> > > test_control_file = disktest.control
> > >
> > > - - linux_s3: install setup
> > > + - linux_s3: install setup
> > > type = linux_s3
> > >
> > > - - shutdown: install setup
> > > + - timedrift: install setup
> > > + type = timedrift
> > > + extra_params += " -rtc-td-hack"
> > > + # Pin the VM and host load to CPU #0
> > > + cpu_mask = 0x1
> > > + # Set the load and rest durations
> > > + load_duration = 20
> > > + rest_duration = 20
> > > + # Fail if the drift after load is higher than 50%
> > > + drift_threshold = 50
> > > + # Fail if the drift after the rest period is higher than
> > 10%
> > > + drift_threshold_after_rest = 10
> > > +
> > > + - stress_boot: install setup
> > > + type = stress_boot
> > > + max_vms = 5
> > > + alive_test_cmd = ps aux
> > > +
> > > + - shutdown: install setup
> > > type = shutdown
> > > kill_vm = yes
> > > kill_vm_gracefully = no
> > >
> > >
> > > - - stress_boot:
> > > - type = stress_boot
> > > - max_vms = 5
> > > - alive_test_cmd = ps aux
> > > -
> > > # NICs
> > > variants:
> > > - @rtl8139:
> > > @@ -121,6 +134,7 @@ variants:
> > > variants:
> > > # Linux section
> > > - @Linux:
> > > + no timedrift
> > > cmd_shutdown = shutdown -h now
> > > cmd_reboot = shutdown -r now
> > > ssh_status_test_command = echo $?
> > > @@ -303,8 +317,6 @@ variants:
> > >
> > md5sum=bf4635e4a4bd3b43838e72bc8c329d55
> > >
> > md5sum_1m=18ecd37b639109f1b2af05cfb57dfeaf
> > >
> > > -
> > > -
> > > # Windows section
> > > - @Windows:
> > > no autotest
> > > @@ -318,6 +330,21 @@ variants:
> > > migration_test_command = ver&& vol
> > > stress_boot:
> > > alive_test_cmd = systeminfo
> > > + timedrift:
> > > + # For this to work, the ISO should contain vlc
> > (vlc.exe) and a video (ED_1024.avi)
> > > + cdrom = windows/vlc.iso
> > > + time_command = "echo TIME: %date% %time%"
> > > + time_filter_re = "(?<=TIME: \w\w\w ).{19}(?=\.\d\d)"
> > > + time_format = "%m/%d/%Y %H:%M:%S"
> > > + guest_load_command = 'cmd /c "d:\vlc -f --loop
> > --no-qt-privacy-ask --no-qt-system-tray d:\ED_1024.avi"'
> > > + # Alternative guest load:
> > > + #guest_load_command = "(dir /s&& dir /s&& dir /s&&
> > dir /s)> nul"
> > > + guest_load_stop_command = "taskkill /F /IM vlc.exe"
> > > + guest_load_instances = 2
> > > + host_load_command = "bzip2 -c --best /dev/urandom>
> > /dev/null"
> > > + # Alternative host load:
> > > + #host_load_command = "dd if=/dev/urandom of=/dev/null"
> > > + host_load_instances = 8
> > >
> > > variants:
> > > - Win2000:
> > > @@ -582,5 +609,6 @@ variants:
> > > only
> > qcow2.*ide.*default.*up.*Ubuntu-8.10-server.*(autotest.sleeptest)
> > > only rtl8139
> > >
> > > +
> > > # Choose your test list
> > > only fc8_quick
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-21 17:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <925924498.753771248172831899.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-07-21 10:41 ` [Autotest] [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample Michael Goldish
2009-07-21 17:33 ` Marcelo Tosatti
2009-07-20 15:07 [KVM-AUTOTEST PATCH 0/17] kvm_subprocess, guestwizard improvements, timedrift and other small things Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 05/17] Remove kvm_spawn and run_bg() from kvm_utils.py Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 06/17] kvm_guest_wizard: rename output_dir to debug_dir in barrier_2() Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 07/17] kvm_guest_wizard: pass 'params' directly to barrier_2() Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 08/17] kvm_guest_wizard: allow keeping screendump history for debugging purposes Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 09/17] kvm_tests.cfg.sample: add 'keep_screendump_history = yes' to step file tests Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 10/17] KVM test: optionally convert PPM files to PNG format after test Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 11/17] KVM test: kvm_tests.cfg.sample: convert PPM files to PNG by default Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 12/17] KVM test: add simple timedrift test (mainly for Windows) Michael Goldish
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 13/17] KVM test: fix a parsing problem in kvm_config.py Michael Goldish
[not found] ` <d9af4f5a921c7e0f1a04d33de8a5a e84324e0057.1248102188.git.mgoldish@redhat.com>
2009-07-20 15:07 ` [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample Michael Goldish
2009-07-21 9:47 ` [Autotest] " Dor Laor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox