Permalink
Commits on Oct 21, 2010
  1. job.py: check mounted partitions across reboots by uuid

    lmr
    lmr committed Oct 21, 2010
    On my system, when I booted from a 2.6.29 kernel to a 2.6.30 kernel, the
    scan order of devices changed, and what was sda became sdc.  This
    confused autotest, which then printed out the following error and failed
    the job:
    
    ABORT   build   reboot.verify_config    timestamp=1287536803
    localtime=Oct 19 21:06:43       mounted partitions are different after
    reboot (old entries: set([('/dev/sdc3', '/'), ('/dev/sdc1', '/boot'),
    ('/dev/sdc2', None)]), new entries: set([('/dev/sda3', '/'),
    ('/dev/sda1', '/boot'), ('/dev/sda2', None)]))  END ABORT
    
    I modified job.py to check the uuids of the mounted file systems instead
    of the devices themselves.  This resolved the issue in my environment.
    
    Changes from v1:
    - Refactored the steps to get the mount info
    - Replaced the subprocess call with autotest API
    
    Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4876 592f7852-d20e-0410-864c-8624ca9c26a4
  2. KVM test: Only change cdrom_cd1/floppy when it's assigned in config file

    lmr
    lmr committed Oct 21, 2010
    When 'cdrom_cd1' or 'floppy' is not assigned in config file,
    self.cdrom_cd1 or self.floppy would become $KVM_TEST_DIR, it causes
    unattend.py fail when calling clean_old_image(..)
    
    Signed-off-by: Amos Kong <akong@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4875 592f7852-d20e-0410-864c-8624ca9c26a4
  3. KVM test: kvm_monitor.py: fix cmd_qmp()'s docstring

    lmr
    lmr committed Oct 21, 2010
    Signed-off-by: Michael Goldish <mgoldish@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4874 592f7852-d20e-0410-864c-8624ca9c26a4
  4. KVM test: kvm_monitor.py: use select whenever possible

    lmr
    lmr committed Oct 21, 2010
    As suggested by Luiz Capitulino, use select() whenever possible to minimize
    delays.
    
    (_data_available() is a wrapper for select().)
    
    Signed-off-by: Michael Goldish <mgoldish@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4873 592f7852-d20e-0410-864c-8624ca9c26a4
Commits on Oct 19, 2010
  1. server/frontend.py: Add support for passing in a kernel command line

    lmr
    lmr committed Oct 19, 2010
    Signed-off-by: Gregory Smith <gps@google.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4872 592f7852-d20e-0410-864c-8624ca9c26a4
  2. Add some site-specific parsing utilities

    lmr
    lmr committed Oct 19, 2010
    Add some site-specific parsing utilities.
    
    Signed-off-by: James Ren <jamesren@google.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4871 592f7852-d20e-0410-864c-8624ca9c26a4
  3. Allow file system partition tests to optionally defer post-test fsck

    lmr
    lmr committed Oct 19, 2010
    Allow file system partition tests to optionally defer post-test fsck's to a slightly later point in the test script, for more control over container memory during the fsck.
    
    Signed-off-by: Duane Sand <duanes@google.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4870 592f7852-d20e-0410-864c-8624ca9c26a4
  4. Introduce QMP basic test-suite

    lmr
    lmr committed Oct 19, 2010
    This commit introduces a suite which checks that QMP conforms to its
    specification (which is file QMP/qmp-spec.txt in QEMU's source tree).
    
    It's important to note that this suite does _not_ do command or
    asynchronous messages testing, as each command or asynchronous message
    has its own specification, and thus should be tested separately.
    
    This suite is limited to test that the basic protocol works as specified,
    that is, to ensure that the greeting message, success and error responses
    contain the basic information the spec says they do. Additionally,
    several errors conditions at the protocol level are also tested.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4869 592f7852-d20e-0410-864c-8624ca9c26a4
  5. QMPMonitor: Introduce the get_greeting() method

    lmr
    lmr committed Oct 19, 2010
    It returns the QMP's greeting message as sent by the monitor.
    
    Please, note that this commit also changes the QMPMonitor's constructor
    to store the full greeting message (it currently stores only its
    contents).
    
    This new method is going to be used by the QMP test-suite, which fully
    checks the greeting message.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4868 592f7852-d20e-0410-864c-8624ca9c26a4
Commits on Oct 18, 2010
  1. KVM test: kvm_monitor.py: add __str__() method to QMPCmdError exception

    lmr
    lmr committed Oct 18, 2010
    Signed-off-by: Michael Goldish <mgoldish@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4867 592f7852-d20e-0410-864c-8624ca9c26a4
  2. KVM test: kvm_monitor.py: refactor _get_command_output()

    lmr
    lmr committed Oct 18, 2010
    Instead of _get_command_output() and friends, introduce the following methods:
    
    * QMP:
      - _send(): send raw data without waiting for a response
      - _get_response(): get the response to a previously sent command
      - cmd(): send a command with arguments, return response, raise an exception
               if the command fails
      - cmd_raw(): send a raw string, return response dict without postprocessing
      - cmd_obj(): send a Python object (converted to JSON), return response dict
                   without postprocessing
      - cmd_qmp(): send a command with arguments, return response dict without
                   postprocessing
    
      cmd() is useful for common monitor usage.  cmd_raw(), cmd_obj() and
      cmd_qmp() are required by Luiz Capitulino's test suite.  The difference
      between cmd() and cmd_qmp() is that the latter does not perform any checks
      on the response dict.  Note that cmd_raw() is functionally equivalent to
      send() from Luiz's patch.  I propose that we use the name cmd_raw() because
      send() implies sending data without caring about the response, whereas
      cmd_raw() implies doing exactly what cmd_obj() and cmd_qmp() do, but using
      raw data.
    
    * Human monitor:
      - _send(): send raw data without waiting for a response
      - cmd(): send a command, return response
    
    Signed-off-by: Michael Goldish <mgoldish@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4866 592f7852-d20e-0410-864c-8624ca9c26a4
  3. client/bin/kernel.py: Fix incorrect parameter passed to function

    lmr
    lmr committed Oct 18, 2010
    Working on the Red Hat kernel fixes, I've spotted a bug on
    the kernel code: on the function build_timed, there's a
    call to kernel.clean() with a logged parameter, which doesn't
    exist on the actual function. Let's fix it.
    
    Changes from v1:
     * Fixed kernel_unittest.py
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4865 592f7852-d20e-0410-864c-8624ca9c26a4
  4. Return a better error message when job create fails due to a deps check

    lmr
    lmr committed Oct 18, 2010
    Return a better error message when job create fails due to a deps check.
    
    Signed-off-by: Gregory Smith <gps@google.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4864 592f7852-d20e-0410-864c-8624ca9c26a4
  5. Add indices on the tko_tests.start_time and afe_jobs.created_on

    lmr
    lmr committed Oct 18, 2010
    Add indices on the tko_tests.start_time and afe_jobs.created_on
    columns.  We query on these to process data for generating custom
    dashboards.
    
    Signed-off-by: Gregory Smith <gps@google.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4863 592f7852-d20e-0410-864c-8624ca9c26a4
  6. Have the HttpFetcher in the packaging system check for HTTP repo by c…

    lmr
    lmr committed Oct 18, 2010
    …omplete base url
    
    Have the HttpFetcher in the packaging system check for HTTP repository
    connectivity using the full repository base URL rather than just the server
    name.
    
    Signed-off-by: James Ren <jamesren@google.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4862 592f7852-d20e-0410-864c-8624ca9c26a4
  7. KVM test: kvm_subprocess.py: reset _thread_kill_requested in kill_tai…

    lmr
    lmr committed Oct 18, 2010
    …l_threads()
    
    Reset the flag only after all relevant child threads have been joined.
    
    Resetting the flag in one of the child threads causes a race condition, where
    the other child threads will not detect that the flag was set and will
    therefore not terminate.
    
    Signed-off-by: Michael Goldish <mgoldish@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4861 592f7852-d20e-0410-864c-8624ca9c26a4
  8. KVM test: whql_client_install: fix retrieval of server_dns_suffix

    lmr
    lmr committed Oct 18, 2010
    Currently REG_SZ is incorrectly used if no dns suffix is set.
    
    Signed-off-by: Michael Goldish <mgoldish@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4860 592f7852-d20e-0410-864c-8624ca9c26a4
  9. Scheduler notification e-mail: Handle job begin and/or end types not set

    lmr
    lmr committed Oct 18, 2010
    In some occasions, the job end time might not be set (job stuck that
    had to be aborted, for example). If that happens, the operation
    t_end - t_begin used to get the job execution time will fail with an
    IndexError, since t_end is None. Handle that case properly.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4859 592f7852-d20e-0410-864c-8624ca9c26a4
  10. Scheduler notification e-mail: Order failures by reason

    lmr
    lmr committed Oct 18, 2010
    Ordering by reason makes it easy to group failures and
    easily identifying them.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4858 592f7852-d20e-0410-864c-8624ca9c26a4
  11. KVM test: Refactor Koji/Brew package download code

    lmr
    lmr committed Oct 18, 2010
    This patch creates a convenience KojiDownloader class, that
    downloads rpm packages from either brew or koji (the RHEL/Fedora
    build systems). This way other parts of the code can benefit
    from downloading rpm packages from the build system, such
    as the host kernel install code on the control file.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4857 592f7852-d20e-0410-864c-8624ca9c26a4
  12. boottool: Handle Red Hat/Fedora boot once more properly

    lmr
    lmr committed Oct 18, 2010
    Instead of resorting to the horrible 2 hacks I had submitted
    before, take a little more time and write support in boottool
    to handle OS specific exceptions. This way we supersede the
    2 previous patches and provide a better and more integrated
    approach to solve the problem:
    
    Geez, why isn't boottool --boot-once working for Fedora/RHEL ?
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4856 592f7852-d20e-0410-864c-8624ca9c26a4
  13. client/bin/kernel.py: Match kernel version string with actual lib dir

    lmr
    lmr committed Oct 18, 2010
    If we fail to do so, we'll end up creating a bogus initramfs
    file. So look inside /lib/modules for directories that
    match that particular kernel version before we proceed
    to create the initramfs file. Also, in RHEL/Fedora systems,
    use dracut if available.
    
    Changes from v1: Fix kernel_unittest.py
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4855 592f7852-d20e-0410-864c-8624ca9c26a4
  14. client/bin/kernel.py - loosen up initrd/initramfs match expression

    lmr
    lmr committed Oct 18, 2010
    By using '/boot/init' we allow to match the new initramfs style
    of files used by more recent rpm based distributions, such as Fedora.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4854 592f7852-d20e-0410-864c-8624ca9c26a4
  15. When no tag is provided, make job.bootloader.boot_once() a no-op

    lmr
    lmr committed Oct 18, 2010
    According to own TODO comment previously found for the
    method, it doesn't make sense to boot once using the
    default kernel. So, turn it into an explicit no-op.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4853 592f7852-d20e-0410-864c-8624ca9c26a4
  16. Add a method add_to_bootloader to job.kernel()

    lmr
    lmr committed Oct 18, 2010
    The SourceKernel class located on server/source_kernel.py creates
    a host control file that references the method add_to_bootloader(),
    which doesn't exist for source kernels. A little refactoring can
    solve this problem and make this class, and the GitKernel class
    functional.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4852 592f7852-d20e-0410-864c-8624ca9c26a4
  17. client/bin/kernel.py: default kernel arguments shall be kept

    lmr
    lmr committed Oct 18, 2010
    When adding a new kernel to bootload we want the arguments of
    the default entry to be kept in the new entry, otherwise that
    entry might not boot (example, if we disregard LVM parameters
    and the root is on an LVM volume, the entry won't boot).
    
    So, instead of setting the arguments while the kernel entry
    is being created (doing this with boottool will completely
    disregard any arguments of the default entry), create the
    new entry *then* add the additional arguments, one by one.
    In every new addition, if the arg is already on the arg list,
    the arg won't be added, therefore avoiding duplicate args.
    
    Changes from v1:
    - Fix kernel_unittest.py
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4851 592f7852-d20e-0410-864c-8624ca9c26a4
Commits on Oct 14, 2010
  1. KVM test: Make cache=none the default on KVM autotest runs

    lmr
    lmr committed Oct 14, 2010
    cache=none is our supported way of running images, so enforce
    this policy on the KVM autotest defaults. It will also make
    it easier for people trying to figure out where to change the
    cache mode for images.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4850 592f7852-d20e-0410-864c-8624ca9c26a4
Commits on Oct 13, 2010
  1. introduce .gitignore file

    lmr
    lmr committed Oct 13, 2010
    Combine the default svn global-ignores patterns with the additional patterns
    sent by Luiz Capitulino <lcapitulino@redhat.com>. This is for the convenience
    of people using the autotest svn git mirror.
    
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4849 592f7852-d20e-0410-864c-8624ca9c26a4
  2. kvm_subprocess: Reset _thread_kill_requested after tail_thread quit

    lmr
    lmr committed Oct 13, 2010
    If iterations of test is larger than 1, tcpdump process would be killed at the
    end of iterations.1, then global 'thread_kill_requested' becomes 'True', in
    iterations.2 tcpdump process would also be immediately killed after launch.
    So we need reset '_thread_kill_requested' to 'False' after tail_thread quit.
    
    Signed-off-by: Amos Kong <akong@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4848 592f7852-d20e-0410-864c-8624ca9c26a4
  3. introduce .gitignore file

    ehabkost committed Oct 13, 2010
    Combine the default svn global-ignores patterns with the additional patterns
    sent by Luiz Capitulino <lcapitulino@redhat.com>.
    
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Commits on Oct 12, 2010
  1. server/git_kernel.py - Allow to specify a builddir for GitKernel

    lmr
    lmr committed Oct 12, 2010
    Make it possible to specify a builddir for the install() method
    of the GitKernel class.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4847 592f7852-d20e-0410-864c-8624ca9c26a4
Commits on Oct 11, 2010
  1. KVM test: Add vhost-net support

    lmr
    lmr committed Oct 11, 2010
    Vhost is a kernel-level backend for virtio. This patch add a nic_param
    named "vhost" to enable/disable vhost backend.
    
    Changes from v3:
    - Added comment explaining that the feature only works with nic_mode =
      tap.
    - Instead of commenting out the option vhost, leave it uncommented but
      with default = no.
    
    Changes from v2:
    - Rebase against latest HEAD
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4846 592f7852-d20e-0410-864c-8624ca9c26a4
Commits on Oct 8, 2010
  1. Replicate the weburl default set on the GitKernel class

    lmr
    lmr committed Oct 8, 2010
    So people don't have to actually provide the weburl in
    control files.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4845 592f7852-d20e-0410-864c-8624ca9c26a4
  2. server/git_kernel.py: Revert change made on r4811

    lmr
    lmr committed Oct 8, 2010
    Turns out it was wrong.
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4844 592f7852-d20e-0410-864c-8624ca9c26a4
  3. client/bin/kernel.py: Remove symlink before we try to create one

    lmr
    lmr committed Oct 8, 2010
    In some situations, when autotest tries to symlink the build dir
    for source kernels, the link might already exist (autotest was
    aborted and there was no time to cleanup). Let's be safe and
    remove the symlink if there's one before trying to create the
    symlink.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    
    
    git-svn-id: svn://test.kernel.org/autotest/trunk@4843 592f7852-d20e-0410-864c-8624ca9c26a4