All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Michael Goldish <mgoldish@redhat.com>
Cc: dlaor@redhat.com, autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [Autotest] [KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample
Date: Tue, 21 Jul 2009 14:33:34 -0300	[thread overview]
Message-ID: <20090721173334.GD6959@amt.cnet> (raw)
In-Reply-To: <1087317287.753791248172869339.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>

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

  reply	other threads:[~2009-07-21 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090721173334.GD6959@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=dlaor@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mgoldish@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.