On Thu, 2010-06-24 at 17:49 +0300, Michael Goldish wrote:
> On 06/24/2010 04:46 PM, Poornima Nayak wrote:
> > On Thu, 2010-06-24 at 15:29 +0300, Michael Goldish wrote:
> >> On 06/24/2010 02:37 PM, Poornima Nayak wrote:
> >>> On Wed, 2010-06-23 at 15:09 -0300, Lucas Meneghel Rodrigues wrote:
> >>>> On Wed, 2010-06-23 at 23:14 +0530, Poornima Nayak wrote:
> >>>>> The last line in tests.cfg is reffering to two variants
> >>>>> only qemu_dotl_map_passthrough qemu_dotu_map_passthrough
> >>>>>
> >>>>> The defination for these two variants only differs where i call set of
> >>>>> autotest tests that has to be run. for example I am pasting the lines
> >>>>> which differ in the two variants.
> >>>>> @qemu_dotu_map_passthrough:
> >>>>>     only boot v9fs_setup connecthon tuxera_posix fsstress shutdown
> >>>>>
> >>>>>
> >>>>> @qemu_dotl_map_passthrough:
> >>>>>     only boot v9fs_dotl_setup connecthon tuxera_posix fsstress shutdown
> >>>>>
> >>>>> The problem with this is after qemu_dotu_map_passthrough execution
> >>>>> completes, autotest exits when it has to execute 'boot' under
> >>>>> qemu_dotl_map_passthrough with error
> >>>>> TestError: kvm.raw.Fedora.12.64.virtio.boot already exists; multiple
> >>>>> tests cannot run with the same subdirectory
> >>>>>
> >>>>> I need help in resolving this issue, how to genrate filenames unique for
> >>>>> tests under qemu_dotu_map_passthrough &  qemu_dotl_map_passthrough.
> >>>>>
> >>>>> FYI: v9fs_setup & v9fs_dotl_setup setup test environment before
> >>>>> executing autotest tests fsstress, connecthon. These files are
> >>>>> implemented in kvm/tests directory.
> >>>>>
> >>>>> Any suggestion would be a great help.
> >>>>
> >>>> A simple suggestion would be to remove the 'at' signs at the beginning
> >>>> of your variants. This will make them to be part of the testname, thus,
> >>>> generating different names and the issue you mentioned will no longer
> >>>> exist.
> >>>>
> >>>> qemu_dotu_map_passthrough:
> >>>>      only boot v9fs_setup connecthon tuxera_posix fsstress shutdown
> >>>>
> >>>>
> >>>> qemu_dotl_map_passthrough:
> >>>>      only boot v9fs_dotl_setup connecthon tuxera_posix fsstress shutdown
> >>>>
> >>>> Good to hear from you!
> >>>>
> >>>> Lucas
> >>>>
> >>> If I remove 'at'sign only the first one gets executed.
> >>> For eg if i refer to something as below
> >>> only qemu_dotu_map_passthrough qemu_dotl_map_passthrough
> >>>
> >>> only qemu_dotu_map_passthrough gets executed.
> >>> Even kvm_config generates dictionary for the first variant mentioned in
> >>> the line.
> >>
> >> If you can, please post your config file.
> >> Also, looking at the output of kvm_config.py --verbose might be useful.
> >>  It shows the number of tests at each step of the parsing procedure.
> >> Also, please make sure that you use the correct syntax to define variants:
> >>
> >> variants:
> >> - qemu_dotu_map_passthrough:
> >>     only boot v9fs_setup connecthon tuxera_posix fsstress shutdown
> >>
> >> - qemu_dotl_map_passthrough:
> >>     only boot v9fs_dotl_setup connecthon tuxera_posix fsstress shutdown
> >>
> >> I'm just making sure, because your original message lacked the keyword
> >> 'variants' and the dashes.  Your syntax looks more like the syntax of
> >> exceptions.  You can look at the examples at
> >> http://www.linux-kvm.org/page/KVM-Autotest/Test_Config_File
> >> to see the difference between variants and exceptions.
> >>
> >>> Even tried referring them as 
> >>> only qemu_dotu_map_passthrough 
> >>> only qemu_dotl_map_passthrough
> >>>
> >>> This does not generate dictionary at all for both the variants.
> >>
> >> This shouldn't generate any dictionaries because these sets are supposed
> >> to be mutually exclusive, if I understand correctly.
> >>
> >>> Anyway thanks a lot Lucas for quick response, I was concerned that I may
> >>> not get quick reply as the subject of the mail is not specifying the
> >>> problem.
> >>>
> >>> Regards
> >>> Poornima
> > Pasting my tests.cfg. This cfg file has too many arguments for extra
> > params bcoz I boot guest OS with kernel built in host.
> > 
> > include tests_base.cfg
> > include cdkeys.cfg
> > 
> > qemu_binary = /opt/testbin/bin/qemu-system-x86_64
> > qemu_img_binary = /opt/testbin/bin/qemu-img
> > image_name.* ?<= /root/project_regtest/client/tests/kvm/f12
> > cdrom.* ?<= /tmp/kvm_autotest_root/
> > steps ?<= /tmp/kvm_autotest_root/
> > 
> > variants:
> >     # Runs all variants defined. HUGE test set.
> >     - @full:
> > 
> >     - @qemu_kvm_f12_mapped:
> >         only raw
> >         only acpi
> >         only no_pci_assignable
> >         only smallpages
> >         only Fedora.12.64
> >         only boot
> >         extra_params = ' -enable-kvm -fsdev
> > local,id=local0,path=/tmp,security_model=mapped -device
> > virtio-9p-pci,fsdev=local0,mount_tag=export1'
> >         # Path of initramfs shuld be suffixed with tag
> >         extra_params+= '
> > -kernel /opt/v9fs-next-upstream/arch/x86_64/boot/bzImage
> > -initrd /boot/initramfs-2.6.34.img '
> >         extra_params+= ' -append "root=/dev/mapper/VolGroup-lv_root
> > $console selinux=0 console=ttyS0" '
> >         only virtio
> >         no smp2
> >     - qemu_dotu_map_passthrough:
> >         only raw
> >         only acpi
> >         only no_pci_assignable
> >         only smallpages
> >         only Fedora.12.64
> >         only boot shutdown
> >         extra_params = ' -enable-kvm -fsdev
> > local,id=local0,path=/root/pass_test,security_model=passthrough -device
> > virtio-9p-pci,fsdev=local0,mount_tag=export1'
> >         extra_params+= ' -fsdev
> > local,id=local1,path=/root/map_test,security_model=mapped -device
> > virtio-9p-pci,fsdev=local1,mount_tag=export2'
> >         # Path of initramfs shuld be suffixed with tag
> >         extra_params+= '
> > -kernel /opt/new/v9fs-next-upstream/arch/x86_64/boot/bzImage
> > -initrd /boot/initramfs-2.6.35-rc3-test1+.img '
> >         extra_params+= ' -append "root=/dev/mapper/VolGroup-lv_root
> > $console selinux=0 console=ttyS0" '
> >         only virtio
> >         no smp2
> >     - qemu_dotl_map_passthrough:
> >         only raw
> >         only acpi
> >         only no_pci_assignable
> >         only smallpages
> >         only Fedora.12.64
> >         only boot v9fs_dotl_setup shutdown
> >         extra_params = ' -enable-kvm -fsdev
> > local,id=local0,path=/root/pass_test,security_model=passthrough -device
> > virtio-9p-pci,fsdev=local0,mount_tag=export1'
> >         extra_params+= ' -fsdev
> > local,id=local1,path=/root/map_test,security_model=mapped -device
> > virtio-9p-pci,fsdev=local1,mount_tag=export2'
> >         # Path of initramfs shuld be suffixed with tag
> >         extra_params+= '
> > -kernel /opt/new/v9fs-next-upstream/arch/x86_64/boot/bzImage
> > -initrd /boot/initramfs-2.6.35-rc3-test1+.img '
> >         extra_params+= ' -append "root=/dev/mapper/VolGroup-lv_root
> > $console selinux=0 console=ttyS0" '
> >         only virtio
> >         no smp2
> > 
> > only qemu_dotu_map_passthrough qemu_dotl_map_passthrough
> > #only qemu_dotu_map_passthrough
> > #only qemu_dotl_dotu
> > 
> > 
> 
> If you're using the upstream tests_base.cfg(.sample), please edit it and
> remove the 'only' statements from the definition of the 'raw' variant.
> I'm referring to 'only rtl8139' and the two lines above it. (We've had
> those lines there for quite some time and apparently they do more harm
> than good.)  Does that solve your problem?
> Also, if you're not planning to test vmdk, you can completely remove the
> vmdk variant to speed up parsing.
> 
> If that doesn't solve your problem, or if you're using a tests_base.cfg
> that is very different from the upstream sample, please post your
> tests_base.cfg.
> 
> Thanks,
> Michael
Sending as an attachments as it is 500+ lines cfg file. I have deleted
those variants which are very clear that I dont need them.

Regards
Poornima
# Copy this file to tests_base.cfg and edit it.
#
# Define the objects we'll be using
vms = vm1
images = image1
nics = nic1

# Choose the main VM
main_vm = vm1

# Some preprocessor/postprocessor params
start_vm = yes
convert_ppm_files_to_png_on_error = yes
#keep_ppm_files = yes
#keep_ppm_files_on_error = yes
kill_vm = no
kill_vm_gracefully = yes
kill_unresponsive_vms = yes

# Some default VM params
qemu_binary = qemu
qemu_img_binary = qemu-img
smp = 1
mem = 512
image_size = 10G
shell_port = 22
display = vnc

# Default scheduler params
used_cpus = 1
used_mem = 512

# Port redirections
redirs = remote_shell
guest_port_remote_shell = 22

# NIC parameters
nic_mode = user
#nic_mode = tap
nic_script = scripts/qemu-ifup
address_index = 0


# Tests
variants:
    - install:
        type = steps
        fail_if_stuck_for = 300
        stuck_detection_history = 2
        keep_screendump_history = yes
        force_create_image = yes
        kill_vm = yes
        kill_vm_timeout = 60
        kill_vm_timeout_on_error = 0

    - setup:        install
        type = steps
        fail_if_stuck_for = 300
        stuck_detection_history = 2
        kill_vm_on_error = yes
        keep_screendump_history = yes

    - unattended_install:
        type = unattended_install
        kill_vm = yes
        kill_vm_gracefully = yes
        kill_vm_on_error = yes
        force_create_image = yes
        pre_command += " scripts/unattended.py;"
        floppy = "images/floppy.img"
        extra_params += " -boot d"
        nic_mode = user

    - boot:         install setup unattended_install
        type = boot
        restart_vm = yes
        kill_vm_on_error = yes

    - reboot:       install setup unattended_install
        type = boot
        reboot_method = shell
        kill_vm_on_error = yes

    - migrate:      install setup unattended_install
        type = migration
        migration_test_command = help
        migration_bg_command = "cd /tmp; nohup tcpdump -q -t ip host localhost"
        migration_bg_check_command = pgrep tcpdump
        migration_bg_kill_command = pkill tcpdump
        kill_vm_on_error = yes
        iterations = 2
        used_mem = 1024

    - v9fs_setup:   boot
        type = v9fs_setup
        kill_vm_on_error = no

    - v9fs_dotl_setup:   boot
        type = v9fs_dotl_setup
        kill_vm_on_error = no

    - v9fs_dotl_dotu_setup:   boot
        type = v9fs_dotl_dotu_setup
        kill_vm_on_error = no


    - autotest:     install setup unattended_install
        type = autotest
        test_timeout = 1800
        variants:
            - sleeptest:
                test_name = sleeptest
                test_timeout = 30
                test_control_file = sleeptest.control
            - dbench:
                test_name = dbench
                test_control_file = dbench.control
                test_timeout = 360000
            - ebizzy:
                test_name = ebizzy
                test_control_file = ebizzy.control
            - stress:
                test_name = stress
                test_control_file = stress.control
            - disktest:
                test_name = disktest
                test_control_file = disktest.control
            - ctcs2:
                test_name = cerberus
                # If you think this is too lengthy, please change the cerberus
                # control file and set this timeout appropriately.
                test_timeout = 3900
                test_control_file = cerberus.control
            - npb:
                test_name = npb
                test_control_file = npb.control
            - hackbench:
                test_name = hackbench
                test_control_file = hackbench.control
            - cpu_hotplug:
                test_name = cpu_hotplug
                test_control_file = cpu_hotplug.control
            - connecthon:
                test_name = connecthon
                test_control_file = connecthon.control
                test_timeout = 36000
            - tuxera_posix:
                test_name = tuxera_posix
                test_control_file = tuxera_posix.control
            - blast:
                test_name = blast
                test_control_file = blast.control
                test_timeout = 36000
            - fsstress:
                test_name = fsstress
                test_control_file = fsstress.control
                test_timeout = 36000
            - bonnie:
                test_name = bonnie
                test_control_file= bonnie.control

    - linux_s3:     install setup unattended_install
        type = linux_s3

    - timedrift:    install setup unattended_install
        extra_params += " -rtc-td-hack"
        variants:
            - with_load:
                type = timedrift
                # 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
                # For now, make sure this test is executed alone
                used_cpus = 100
            - with_migration:
                type = timedrift_with_migration
                migration_iterations = 3
                drift_threshold = 10
                drift_threshold_single = 3
            - with_reboot:
                type = timedrift_with_reboot
                reboot_iterations = 1
                drift_threshold = 10
                drift_threshold_single = 3

    - stress_boot:  install setup unattended_install
        type = stress_boot
        max_vms = 5    
        alive_test_cmd = uname -a
        clone_address_index_base = 10
        kill_vm = yes
        kill_vm_vm1 = no
        kill_vm_gracefully = no
        extra_params += " -snapshot"
        used_cpus = 5
        used_mem = 2560

    - autoit:       install setup unattended_install
        type = autoit
        autoit_binary = D:\AutoIt3.exe
        autoit_script_timeout = 600
        autoit_script_params =
        variants:
            - notepad:
                autoit_script = autoit/notepad1.au3
            - stub:
                download = yes
                download_cmd = "git clone"
                rsc_server = "git://the.resource.server/autoit"
                dst_rsc_dir = "C:\"
                autoit_entry = "C:\autoit\stub\stub.au3"

    - guest_s4:     install setup unattended_install
        type = guest_s4
        check_s4_support_cmd = grep -q disk /sys/power/state
        test_s4_cmd = "cd /tmp; nohup tcpdump -q -t ip host localhost"
        check_s4_cmd = pgrep tcpdump
        set_s4_cmd = echo disk > /sys/power/state
        kill_test_s4_cmd = pkill tcpdump
        services_up_timeout = 30

    - nic_hotplug:  install setup unattended_install
        type = pci_hotplug
        pci_type = nic
        reference_cmd = lspci
        find_pci_cmd = 'lspci | tail -n1'
        pci_test_cmd = 'nslookup www.redhat.com'
        wait_secs_for_hook_up = 3
        variants:
            - nic_8139:
                pci_model = rtl8139
                match_string = "8139"
            - nic_virtio:
                pci_model = virtio
                match_string = "Virtio network device"
            - nic_e1000:
                pci_model = e1000
                match_string = "Gigabit Ethernet Controller"

    - block_hotplug: install setup unattended_install
        type = pci_hotplug
        pci_type = block
        reference_cmd = lspci
        find_pci_cmd = 'lspci | tail -n1'
        images += " stg"
        boot_drive_stg = no
        image_name_stg = storage
        image_size_stg = 1G
        remove_image_stg = yes
        force_create_image_stg = yes
        pci_test_cmd = "yes | mke2fs `fdisk -l 2>&1 | awk '/\/dev\/[sv]d[a-z] 
doesn/ {print $2}'`"
        wait_secs_for_hook_up = 3
        kill_vm_on_error = yes
        variants:
            - block_virtio:
                pci_model = virtio
                match_string = "Virtio block device"
            - block_scsi:
                pci_model = scsi
                match_string = "SCSI"
        variants:
            - fmt_qcow2:
                image_format_stg = qcow2
            - fmt_raw:
                image_format_stg = raw

    - vlan_tag:  install setup unattended_install
        type = vlan_tag
        # subnet should not be used by host
        subnet = 192.168.123
        vlans = "10 20"
        nic_mode = tap
        vms += " vm2"
        extra_params_vm1 += " -snapshot"
        extra_params_vm2 += " -snapshot"
        kill_vm_gracefully_vm2 = no
        address_index_vm2 = 1

    - physical_resources_check: install setup unattended_install
        type = physical_resources_check
        catch_uuid_cmd = dmidecode | awk -F: '/UUID/ {print $2}'

    - ksm_overcommit:
        # Don't preprocess any vms as we need to change its params
        vms = ''
        image_snapshot = yes
        kill_vm_gracefully = no
        type = ksm_overcommit
        # Make host use swap (a value of 'no' will turn off host swap)
        ksm_swap = yes
        no hugepages
        # Overcommit of host memmory
        ksm_overcommit_ratio = 3
        # Max paralel runs machine
        ksm_parallel_ratio = 4
        # Host memory reserve
        ksm_host_reserve = 512
        ksm_guest_reserve = 1024
        variants:
            - ksm_serial:
                ksm_mode = "serial"
            - ksm_parallel:
                ksm_mode = "parallel"

    # system_powerdown, system_reset and shutdown *must* be the last ones
    # defined (in this order), since the effect of such tests can leave
    # the VM on a bad state.
    - system_powerdown: install setup unattended_install
        type = shutdown
        shutdown_method = system_powerdown
        sleep_before_powerdown = 20
        kill_vm = yes
        kill_vm_gracefully = no

    - system_reset: install setup unattended_install
        type = boot
        reboot_method = system_reset
        sleep_before_reset = 20
        kill_vm_on_error = yes

    - shutdown:     install setup unattended_install
        type = shutdown
        shutdown_method = shell
        kill_vm = yes
        kill_vm_gracefully = no
    # Do not define test variants below shutdown


# NICs
variants:
    - @rtl8139:
        nic_model = rtl8139
    - e1000:
        nic_model = e1000
    - virtio:
        nic_model = virtio


# Guests
variants:
    # Linux section
    - @Linux:
        no timedrift autoit
        shutdown_command = shutdown -h now
        reboot_command = shutdown -r now
        status_test_command = echo $?
        username = root
        password = virtfs
        shell_client = ssh
        shell_port = 22
        file_transfer_client = scp
        file_transfer_port = 22
        mem_chk_cmd = dmidecode -t 17 | awk -F: '/Size/ {print $2}'
        cpu_chk_cmd = grep -c processor /proc/cpuinfo

        variants:
            - Fedora:
                no setup
                shell_prompt = "^\[.*\][\#\$]\s*$"
                unattended_install:
                    tftp = "images/tftpboot"
                    extra_params += " -bootp /pxelinux.0 -boot n"
                    kernel_args = "ks=floppy nicdelay=60"

                variants:
                    - 12.32:
                        image_name = fc12-32
                        md5sum = 2c4c1c0d09f2fbcfd8ee6a0c5542eeb2
                        md5sum_1m = eee935d7f0cf2ef03f6ddce3a2a50050
                        unattended_install:
                            unattended_file = unattended/Fedora-12.ks

                    - 12.64:
                        image_name = fc12-64
                        md5sum = 6dd31e292cc2eb1140544e9b1ba61c56
                        md5sum_1m = 514efbd7698b55ff6768c8605438bfc5
                        unattended_install:
                            unattended_file = unattended/Fedora-12.ks

            - @Ubuntu:
                shell_prompt = "^r...@.*[\#\$]\s*$"

                variants:
                    - Ubuntu-8.04-32:
                        skip = yes
                        image_name = ubuntu-8.04-32
                        install:
                            steps = Ubuntu-8.04-32.steps
                            cdrom = linux/ubuntu-8.04.1-desktop-i386.iso
                        setup:
                            steps = Ubuntu-8.04-32-setupssh.steps

                    - Ubuntu-8.10-server-32:
                        image_name = ubuntu-8.10-server-32
                        install:
                            steps = Ubuntu-8.10-server-32.steps
                            cdrom = linux/ubuntu-8.10-server-i386.iso
                            md5sum = a2ec9975a91e1228c8292ed9799dc302
                            md5sum_1m = ea493eb8ef7722ead693492fd9f8a13f
                        setup:
                            steps = Ubuntu-8.10-server-32-gcc.steps

            - RHEL:
                no setup
                shell_prompt = "^\[.*\][\#\$]\s*$"
                nic_hotplug:
                    modprobe_module = acpiphp
                block_hotplug:
                    modprobe_module = acpiphp
                unattended_install:
                    tftp = "images/tftpboot"
                    extra_params += " -bootp /pxelinux.0 -boot n"
                    kernel_args = "ks=floppy nicdelay=60"

                variants:
                    - 5.4.i386:
                        no setup
                        image_name = rhel5-32
                        cdrom = linux/RHEL-5.4-i386-DVD.iso
                        md5sum = 7a12ec6599527e4f3d1790b51eadbfed
                        md5sum_1m = 0dbeb8f58d213752d8c029e8601abfbb
                        unattended_install:
                            unattended_file = unattended/RHEL-5-series.ks

                    - 5.4.x86_64:
                        no setup
                        image_name = rhel5-64
                        cdrom = linux/RHEL-5.4-x86_64-DVD.iso
                        md5sum = 04fe3c10202402d7b389528d2bad0210
                        md5sum_1m = 3e74112003e88a966754849dbb8f5c3f
                        unattended_install:
                            unattended_file = unattended/RHEL-5-series.ks

linux_s3:
    only Linux


variants:
    - @up:
        no autotest.npb
    - smp2:
        smp = 2
        used_cpus = 2
        stress_boot: used_cpus = 10
        timedrift.with_load: used_cpus = 100


variants:
    - @acpi:
    - noacpi:
        only Fedora Ubuntu Windows
        no WinVista Win2008
        no smp2.*Windows
        extra_params += " -no-acpi"


variants:
    - @ide:
        drive_format=ide

virtio|virtio_blk|e1000:
    only Fedora.11 Fedora.12 Win2008 WinVista Win7 openSUSE-11 
Ubuntu-8.10-server


variants:
    - @qcow2:
        image_format = qcow2
        post_command = " python scripts/check_image.py;"
        remove_image = no
        post_command_timeout = 600
    - raw:
        only Fedora Ubuntu Windows
      #  only smp2
       # only rtl8139
        only acpi
        image_format = raw


variants:
    - @smallpages:
    - hugepages:
        pre_command += " scripts/hugepage.py /mnt/kvm_hugepage;"
        extra_params += " -mem-path /mnt/kvm_hugepage"


variants:
    - @no_pci_assignable:
        pci_assignable = no
    - pf_assignable:
        pci_assignable = pf
        device_names = eth1
    - vf_assignable:
        pci_assignable = vf
        # Driver (kernel module) that supports SR-IOV hardware.
        # As of today (30-11-2009), we have 2 drivers for this type of hardware:
        # Intel® 82576 Gigabit Ethernet Controller - igb
        # Neterion® X3100™ - vxge
        driver = igb
        # Driver option to specify the maximum number of virtual functions
        # (on vxge the option is , for example, is max_config_dev)
        # the default below is for the igb driver
        driver_option = "max_vfs=7"
        # Number of devices that are going to be requested.
        devices_requested = 7


image_name.* ?<= images/
cdrom.* ?<= isos/
steps ?<= steps/
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to