From Fedora Project Wiki
m (internal link cleaning)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Create patch==
==Create patch==
#[https://fedoraproject.org/wiki/AutoQA_PatchProcess process to create patch]
#[[AutoQA_PatchProcess|process to create patch]]
#[http://www.kernel.org/pub/software/scm/git/docs/v1.2.6/tutorial.html git tutorial introduction]
#[http://www.kernel.org/pub/software/scm/git/docs/v1.2.6/tutorial.html git tutorial introduction]
==Apply patch==
==Apply patch==
Line 10: Line 10:
#Apply patch
#Apply patch
#:$ patch -p1 < some_direcotory/patch_name.patch or patch --dry-run --verbose -p1 < some_direcotory/patch_name.patch
#:$ patch -p1 < some_direcotory/patch_name.patch or patch --dry-run --verbose -p1 < some_direcotory/patch_name.patch
==Options of test drivers==
Use --help to show options of test drivers.
<pre>
Usage: dvd_install.py/cd_install.py [options]
Options:
  -h, --help            show this help message and exit
  -a ARCH, --arch=ARCH  target architecture (x86_64). The default architecture is the base architecture of current system,
                        user has no need to specify,but if user tests i386 images on x86_64 system, --arch=i386 has to be
                        specified.
  -k KSFILE, --ksfile=KSFILE
                        kickstart file for installation. User can provide a http,ftp,local kickstart file,like: --ksfile=
                        url/server/to/ks.cfg, --ksfile=/location/to/ksfile. The NFS ksfile is not supported at this moment
  -i IMAGE, --image=IMAGE
                        Official DVD install image,e.g: Fedora-12-i386-DVD.iso. User has to provide local install images,
                        like: --image=/location/to/Fedora-12-i386-DVD.iso. If test CD install, only need to give the first
                        image,but other images must exist in the same directory for test driver to search when swap disks.
  -n VMNAME, --name=VMNAME
                        The name of virtual machine for test,if not specified(default: AUTOQA). If tester wants to have a
                        special name for VM to avoid name conflicts with existing VM,specify like: --name=your_favorite_name
  -d DISPLAY, --display=DISPLAY
                        Use an alternate DISPLAY (default: none).When testers are testing on graphical desktop, they have
                        no need to enable this option,but when someone wants to test on run level 3, or in case of no graphical
                        desktop available, this option should be enabled.
  -x EXTRA_ARGS, --extra-args=EXTRA_ARGS
                        Additional arguments to pass to the kernel. If testers want to provide more arguments to kernel, can
                        use this option,like: -x "updates=url/to/updates.img ip=xx.xx.xx.xx netmask=xx.xx.xx.xx"
Usage: mediakit_sanity.py [options]
Options:
  -h, --help            show this help message and exit
  -r REPO, --repo=REPO  specify repo or path. Example: -r myrepo,/path/to/repo
  -i IMAGE, --image=IMAGE
                        specify iso image to check size,repoclose,file
                        conflicts. Example: -i /path/to/xxx_DVD.iso
  -c CHECK, --check=CHECK
                        read SHA256 sums from the FILEs and check them.
                        Example: -c Fedora-13-i386-CHECKSUM
</pre>


==Run auto install tests==
==Run auto install tests==
Line 299: Line 341:


==Transport logs==
==Transport logs==
We may use [https://fedoraproject.org/wiki/Features/VirtioSerial Virtio] instead of TCP/IP(Minimon) to transport logs between host and guest soon.Follow [https://fedoraproject.org/wiki/Anaconda/Logging#Remote_logging_via_virtio Remote logging via virtio] to test Log transportation via virtio logging. Issues of virtio logging,please see bug: {{bz|576439}}
We may use [[Features/VirtioSerial|Virtio]] instead of TCP/IP(Minimon) to transport logs between host and guest soon.Follow [[Anaconda/Logging#Remote_logging_via_virtio|Remote logging via virtio]] to test Log transportation via virtio logging. Issues of virtio logging,please see bug: {{bz|576439}}


==Auto install document==
==Auto install document==
The introduction of auto install, roadmap, test plan etc...Please see :
The introduction of auto install, roadmap, test plan etc...Please see :


[https://fedoraproject.org/wiki/Is_anaconda_broken_proposal Is anaconda broken proposal]
[[Is_anaconda_broken_proposal|Is anaconda broken proposal]]

Latest revision as of 23:14, 17 September 2016

Create patch

  1. process to create patch
  2. git tutorial introduction

Apply patch

  1. Install the package
    yum install patch.x86_64
  2. Save the patch to some_directory
  3. $ pwd
    /home/username/autoqa
  4. Apply patch
    $ patch -p1 < some_direcotory/patch_name.patch or patch --dry-run --verbose -p1 < some_direcotory/patch_name.patch

Options of test drivers

Use --help to show options of test drivers.

Usage: dvd_install.py/cd_install.py [options]

Options:
  -h, --help            show this help message and exit
  -a ARCH, --arch=ARCH  target architecture (x86_64). The default architecture is the base architecture of current system,
                        user has no need to specify,but if user tests i386 images on x86_64 system, --arch=i386 has to be 
                        specified.
  -k KSFILE, --ksfile=KSFILE
                        kickstart file for installation. User can provide a http,ftp,local kickstart file,like: --ksfile=
                        url/server/to/ks.cfg, --ksfile=/location/to/ksfile. The NFS ksfile is not supported at this moment
  -i IMAGE, --image=IMAGE
                        Official DVD install image,e.g: Fedora-12-i386-DVD.iso. User has to provide local install images,
                        like: --image=/location/to/Fedora-12-i386-DVD.iso. If test CD install, only need to give the first
                        image,but other images must exist in the same directory for test driver to search when swap disks.
  -n VMNAME, --name=VMNAME
                        The name of virtual machine for test,if not specified(default: AUTOQA). If tester wants to have a
                        special name for VM to avoid name conflicts with existing VM,specify like: --name=your_favorite_name
  -d DISPLAY, --display=DISPLAY
                        Use an alternate DISPLAY (default: none).When testers are testing on graphical desktop, they have
                        no need to enable this option,but when someone wants to test on run level 3, or in case of no graphical
                        desktop available, this option should be enabled.
  -x EXTRA_ARGS, --extra-args=EXTRA_ARGS
                        Additional arguments to pass to the kernel. If testers want to provide more arguments to kernel, can
                        use this option,like: -x "updates=url/to/updates.img ip=xx.xx.xx.xx netmask=xx.xx.xx.xx"

Usage: mediakit_sanity.py [options]

Options:
  -h, --help            show this help message and exit
  -r REPO, --repo=REPO  specify repo or path. Example: -r myrepo,/path/to/repo
  -i IMAGE, --image=IMAGE
                        specify iso image to check size,repoclose,file
                        conflicts. Example: -i /path/to/xxx_DVD.iso
  -c CHECK, --check=CHECK
                        read SHA256 sums from the FILEs and check them.
                        Example: -c Fedora-13-i386-CHECKSUM

Run auto install tests

install the libs of auto install

  1. # pwd
    /home/username/autoqa
  2. # make install
  3. you may see lots of errors,that's because some packages are missing,use yum to install them according to the output

run the tests

DVD install example:

# PYTHONPATH=../../lib/python/ python dvd_install.py -i /nfs/iso/f14-alpha-rc4/Fedora-14-Alpha-i386-DVD.iso -k /var/www/html/ks.cfg 
start...

** (dvd_install.py:17889): WARNING **: Trying to register gtype 'WnckWindowState' as flags when in fact it is of type 'GEnum'

** (dvd_install.py:17889): WARNING **: Trying to register gtype 'WnckWindowActions' as flags when in fact it is of type 'GEnum'

** (dvd_install.py:17889): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as flags when in fact it is of type 'GEnum'
== environment test ==
CHECK: DISPLAY: OK

== mediakit image sanity test ==
CHECK: mount ISO: OK
CHECK: [general] section in .treeinfo: OK
CHECK: arch = i386 in [general]: OK
CHECK: [images-i386] section: OK
CHECK: kernel: OK
CHECK: initrd: OK
CHECK: mainimage item in [stage2] section: OK
stage2 mainimage: install.img
CHECK: vmlinuz non-empty: OK
CHECK: initrd.img non-empty: OK
CHECK: install.img non-empty: OK
CHECK: [checksum] section: OK
CHECK: install.img sha256: OK
CHECK: vmlinuz sha256: OK
CHECK: initrd.img sha256: OK
sanity check complete.
tree timestamp: Fri Aug 13 07:20:21 2010 (local time)
TEST RESULT: images: OK
CHECK: umount ISO: OK
TEST RESULT: mediakit: OK

== creating guest ==
prep:
  guest name AUTOQA in use
  new guest name: AUTOQA_1
  open /var/www/html/ks.cfg kickstart file...
  writing kickstart
  ksfile locates in :/tmp/autoqa/log/ks.cfg
  adding kickstart to virt disk
  please don't interrupt when creating virt disk...
starting virt guest


Starting install...
Creating domain...                                                                                            |    0 B     00:00     
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.
opening serial console
  serial console at /dev/pts/1
Starting minimon log monitor on port 54523

== passing boot arguments ==
starting virt-viewer AUTOQA_1
setting focus to frame: AUTOQA_1 - Virt Viewer
Creating logfile at /tmp/autoqa/log/dvd_install_20100817-141527_debug ...
enter boot arguments
TEST RESULT: dogtail_boot_args: OK

== kernel boot test ==
Waiting for kernel to boot
Starting to get and check logs 
Waiting for minimon to fetch syslog to /tmp/autoqa/log/minimon/syslog
kernel version:2.6.35-0.57.rc6.git1.fc14.i686 booted, initrd started OK
TEST RESULT: kernel_boot: OK

== anaconda loading stage2 test ==
polling for stage2 startup message
anaconda version 14.15 on i386 starting

loader stage2 test completed OK
TEST RESULT: load_stage2: OK

== anaconda package installation test ==
Waiting up to 25 minutes for package installation to complete
  anaconda now in step setuptime
  anaconda now in step autopartitionexecute
  anaconda now in step storagedone
  anaconda now in step enablefilesystems
  anaconda now in step bootloadersetup
  anaconda now in step reposetup
  anaconda now in step basepkgsel
  anaconda now in step postselection
  anaconda now in step reipl
  anaconda now in step install
  anaconda now in step preinstallconfig
  anaconda now in step installpackages
  anaconda now in step postinstallconfig
  anaconda now in step writeconfig
Package installation completed OK
TEST RESULT: package_install: OK

== anaconda bootloader setup test ==
Waiting for bootloader setup to complete
  anaconda now in step firstboot
  anaconda now in step instbootloader
  anaconda now in step writeksconfig
Bootloader setup complete
TEST RESULT: bootloader: OK

== completing installation ==
Waiting for step 'dopostaction'
  anaconda now in step setfilecon
  anaconda now in step copylogs
  anaconda now in step methodcomplete
  anaconda now in step postscripts
  anaconda now in step dopostaction
Install completed in 599 seconds
TEST RESULT: install_complete: OK

== testing complete ==
Cleaning up guest.
Domain AUTOQA_1 destroyed

Domain AUTOQA_1 has been undefined

Vol /var/lib/libvirt/images/AUTOQA_1.img deleted


** (dvd_install.py:17889): WARNING **: Failed to send buffer

** (dvd_install.py:17889): WARNING **: Failed to send buffer

** (dvd_install.py:17889): WARNING **: Failed to send buffer

** (dvd_install.py:17889): WARNING **: Failed to send buffer
# 

CD install example:

# PYTHONPATH=../../lib/python/ python cd_install.py -i /nfs/iso/f14-alpha-rc4/Fedora-14-Alpha-i386-disc1.iso -k http://10.66.65.62/ks.cfg
start...

** (cd_install.py:18893): WARNING **: Trying to register gtype 'WnckWindowState' as flags when in fact it is of type 'GEnum'

** (cd_install.py:18893): WARNING **: Trying to register gtype 'WnckWindowActions' as flags when in fact it is of type 'GEnum'

** (cd_install.py:18893): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as flags when in fact it is of type 'GEnum'
== environment test ==
CHECK: DISPLAY: OK

== mediakit image sanity test ==
CHECK: mount ISO: OK
CHECK: [general] section in .treeinfo: OK
CHECK: arch = i386 in [general]: OK
CHECK: [images-i386] section: OK
CHECK: kernel: OK
CHECK: initrd: OK
CHECK: mainimage item in [stage2] section: OK
stage2 mainimage: install.img
CHECK: vmlinuz non-empty: OK
CHECK: initrd.img non-empty: OK
CHECK: install.img non-empty: OK
CHECK: [checksum] section: OK
CHECK: install.img sha256: OK
CHECK: vmlinuz sha256: OK
CHECK: initrd.img sha256: OK
sanity check complete.
tree timestamp: Fri Aug 13 07:20:21 2010 (local time)
TEST RESULT: images: OK
CHECK: umount ISO: OK
TEST RESULT: mediakit: OK

== creating guest ==
prep:
  guest name AUTOQA in use
  new guest name: AUTOQA_1
  open http://10.66.65.62/ks.cfg kickstart file...
  writing kickstart
  ksfile locates in :/tmp/autoqa/log/ks.cfg
  adding kickstart to virt disk
  please don't interrupt when creating virt disk...
starting virt guest


Starting install...
Creating domain...                                                                                            |    0 B     00:00     
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.
opening serial console
  serial console at /dev/pts/1
Starting minimon log monitor on port 39016

== passing boot arguments ==
starting virt-viewer AUTOQA_1
setting focus to frame: AUTOQA_1 - Virt Viewer
Creating logfile at /tmp/autoqa/log/cd_install_20100817-151858_debug ...
enter boot arguments
TEST RESULT: dogtail_boot_args: OK

== kernel boot test ==
Waiting for kernel to boot
Starting to get and check logs 
Waiting for minimon to fetch syslog to /tmp/autoqa/log/minimon/syslog
kernel version:2.6.35-0.57.rc6.git1.fc14.i686 booted, initrd started OK
TEST RESULT: kernel_boot: OK

== anaconda loading stage2 test ==
polling for stage2 startup message
anaconda version 14.15 on i386 starting

loader stage2 test completed OK
TEST RESULT: load_stage2: OK

== anaconda package installation test ==
Waiting up to 25 minutes for package installation to complete
  anaconda now in step setuptime
  anaconda now in step autopartitionexecute
  anaconda now in step storagedone
  anaconda now in step enablefilesystems
  anaconda now in step bootloadersetup
  anaconda now in step reposetup
  anaconda now in step basepkgsel
  anaconda now in step postselection
  anaconda now in step reipl
  anaconda now in step install
  anaconda now in step preinstallconfig
  anaconda now in step installpackages
  media change requested from 1 to 2 for Packages/totem-nautilus-2.90.5-5.fc14.i686.rpm
CHECK:  /nfs/iso/f14-alpha-rc4/Fedora-14-Alpha-i386-disc2.iso exists?: OK
CHECK: change to Fedora-14-Alpha-i386-disc2.iso : OK
  setting focus to frame: AUTOQA_1 - Virt Viewer
  press Return key
  media change requested from 2 to 5 for Packages/blueman-1.21-6.fc14.i686.rpm
CHECK:  /nfs/iso/f14-alpha-rc4/Fedora-14-Alpha-i386-disc5.iso exists?: OK
CHECK: change to Fedora-14-Alpha-i386-disc5.iso : OK
  setting focus to frame: AUTOQA_1 - Virt Viewer
  press Return key
  anaconda now in step postinstallconfig
  anaconda now in step writeconfig
Package installation completed OK
TEST RESULT: package_install: OK

== anaconda bootloader setup test ==
Waiting for bootloader setup to complete
  anaconda now in step firstboot
  anaconda now in step instbootloader
  anaconda now in step writeksconfig
Bootloader setup complete
TEST RESULT: bootloader: OK

== completing installation ==
Waiting for step 'dopostaction'
  anaconda now in step setfilecon
  anaconda now in step copylogs
  anaconda now in step methodcomplete
  anaconda now in step postscripts
  anaconda now in step dopostaction
Install completed in 637 seconds
TEST RESULT: install_complete: OK

== testing complete ==
Cleaning up guest.
Domain AUTOQA_1 destroyed

Domain AUTOQA_1 has been undefined

Vol /var/lib/libvirt/images/AUTOQA_1.img deleted


** (cd_install.py:18893): WARNING **: Failed to send buffer

** (cd_install.py:18893): WARNING **: Failed to send buffer

** (cd_install.py:18893): WARNING **: Failed to send buffer

** (cd_install.py:18893): WARNING **: Failed to send buffer
# 

Known issues

  1. The XVfb display does not work,because we got some conflicts
  2. If the host is F13, need to log in as root and Enable "assistive technologies",System->Preferences->Assistive Technologies, check "Enable assistive technologies", then run the test as root
  3. The dvd_install.py and cd_install.py do not support downloading first if the given media is remote http address.mediakit_sanity.py supports this
  4. If the testing can not get logs, you may have to modify the autoqa/lib/python/anaconda.py line:"wget -O /bin/minimon http://10.66.65.170/minimon" to where guest can access minimon file
  5. If have too many windows open,the dogtail may can not focus on virt - viewer to pass args

Transport logs

We may use Virtio instead of TCP/IP(Minimon) to transport logs between host and guest soon.Follow Remote logging via virtio to test Log transportation via virtio logging. Issues of virtio logging,please see bug: RHBZ #576439

Auto install document

The introduction of auto install, roadmap, test plan etc...Please see :

Is anaconda broken proposal