From Fedora Project Wiki

(remove test case ks script)
Line 35: Line 35:
** file conflict for DVD
** file conflict for DVD


== Step 3: Implement boot methods, repo locations, partitioning,user interface==
== Step 3: Implement boot methods, repo locations, partitioning,user interface,boot loader==
The guest should be able to boot from URL, DVD.iso, Live.iso, boot.iso, netinst.iso, all these
The guest should be able to boot from URL, DVD.iso, Live.iso, boot.iso, netinst.iso, all these
guests should be able to accept different kick start files location, repo locations, partitioning and
guests should be able to accept different kick start files location, repo locations, partitions,
user interface.
user interfaces and boot loaders.
* kick start can be passed by virt-install arguments for tree compose or terminal for ISOs
* kick start can be passed by virt-install arguments for tree compose or terminal for ISOs
** remote kickstart files: http, ftp, nfs
** remote kickstart files: http, ftp, nfs
Line 52: Line 52:
* user interface
* user interface
** passed by terminal
** passed by terminal
* boot loader
** passed by ks file


The mapping of test cases with kick start files can be found at  [[Testcase_Kickstart_Mapping]]
The mapping of test cases with kick start files can be found at  [[Testcase_Kickstart_Mapping]]


== Step 4: Preparing kick start file ==
Most of the test cases can be covered by configuring different kick start files.
As the startup, the typical kick start template is choose to be implemented.
'''Installation Kick Start Options'''
{|
!!!Description !!Scripts!! Test Case
|-
|rowspan=3 width=100 |Partitioning
|width=200 |autopart
|width=500 |
<pre>
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
autopart
</pre>
|width=300 |[[QA:Testcase Anaconda autopart install]]
|-
|autopart encrypted
|<pre>
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
autopart  --encrypted --passphrase=redhat
</pre>
|[[QA:Testcase Anaconda autopart (encrypted) install]]
|-
|specify partition
|<pre>
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part / --fstype="ext4" --size=3000
part /boot --fstype="ext4" --size=500
part swap --fstype="swap" --size=500
</pre>
|
|-
| rowspan=4 |Install Source
| Http
|<pre>repo=http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os</pre>
|[[QA/TestCases/InstallSourceHttp]]
|-
|Anonymous Ftp
|<pre>repo=ftp://download.fedora.redhat.com/pub/fedora/linux/development/i386/os</pre>
|[[QA/TestCases/InstallSourceFtpAnonymous]]
|-
|NonAnonymous Ftp
|<pre>repo=ftp://USER:PASS@download.fedora.redhat.com/pub/fedora/linux/development/i386/os</pre>
|[[QA/TestCases/InstallSourceFtpNonAnonymous]]
|-
|}
'''Upgrade Kick Start Options'''
{|
! !!Description !!Scripts!! Test Case
|-
|rowspan=3 width=100  | Boot loader
|width=200 |Install new bootloader
|width=500 |
<pre>
# System bootloader configuration
bootloader --location=mbr
</pre>
|width=300 |[[QA:Testcase Anaconda Upgrade New Bootloader]]
|-
|Do not install a bootloader
|<pre>
# System bootloader configuration
bootloader --location=none
</pre>
|[[QA:Testcase Anaconda Upgrade Skip Bootloader]]
|-
|Upgrade Exiting boot loader
|<pre>
# System bootloader configuration
bootloader --location=none --upgrade
</pre>
|[[QA:Testcase Anaconda Upgrade Update Bootloader]]
|-
|}
'''Rescure Kick Start Options'''
List test scenarios,it will make clear that which suite needs to
support.
<!-- CSS Rotate
<style type="text/css">
td.vertical-text {
color:#333;
border:0px solid red;
writing-mode:tb-rl;
-webkit-transform:rotate(270deg);
-moz-transform:rotate(270deg);
-o-transform: rotate(270deg);
white-space:nowrap;
display:block;
bottom:0;
width:20px;
height:20px;
font-family: ‘Trebuchet MS’, Helvetica, sans-serif;
font-size:24px;
font-weight:normal;
text-shadow: 0px 0px 1px #333;
}
</style>
-->
{| class="wikitable  collapsible collapsed" border="1" width="85%"
! colspan="7"|Test Scenarios
|-
! colspan="1" class="unsortable"| &nbsp;
! colspan="6" class="unsortable"|Boot Method <ref name="Boot Method"> Boot Method: http://docs.fedoraproject.org/en-US/Fedora/14/html/Installation_Guide/ch04s06.html </ref>
|-
! colspan="1"|Test
! DVD
! CD
! boot.iso
! PXE images
! efidisk.img
! Live Image
<!--
|-
! colspan="1" class="unsortable"|Methods to load install.img (not applicable after F15)
! colspan="6" class="unsortable"|&nbsp;
|-
|stage2=cdrom
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|stage2=http://server/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|stage2=ftp://[user:passwd@]server/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|stage2=nfs:
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|stage2=hd:
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|askmethod
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:red; color:white;"|no
-->
|-
! colspan="1" class="unsortable"|Installation Method <ref>Installation Method: http://docs.fedoraproject.org/en-US/Fedora/14/html/Installation_Guide/s1-installmethod-x86.html</ref><ref name="bootoption">Anaconda Boot Options: http://fedoraproject.org/wiki/Anaconda/Options</ref>
! colspan="6" class="unsortable"|&nbsp;
|-
|autodetect cdrom
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=cdrom
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=http://host/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=ftp://[user:passwd@]server/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=nfs:server:/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=nfsiso:server:/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=hd:device/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=hdiso:
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|repo=livecd:
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:lightgreen;"|yes
|-
! colspan="1" class="unsortable"|Methods to locate kickstart file <ref name="bootoption"/>
! colspan="6" class="unsortable"|&nbsp;
|-
|ks (autodetect from dhcp ???(default is nfs))
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=http://server/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=ftp://[user:passwd@]server/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=nfs:server:/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=file:/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=hd:device:/path
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=bd:biosdevice:/path
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=floppy
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
|ks=cdrom
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:yellow;"|unknown
|-
! colspan="1" class="unsortable"|Methods to locate updates.img
! colspan="6" class="unsortable"|&nbsp;
|-
|updates
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|updates=http
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|images/updates.img
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|RHUpdates
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:red; color:white;"|no
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
! colspan="1" class="unsortable"|Methods to determine display device
! colspan="6" class="unsortable"|&nbsp;
|-
|graphical
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|-
|text
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|-
|vnc
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|cmdline
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|serial console=ttyS0
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:#66FF00;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|telnet
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
! colspan="1" class="unsortable"|Methods to choose kickstart network device <ref name="bootoption"/>
! colspan="6" class="unsortable"|&nbsp;
|-
|ksdevice=link
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:red; color:white;"|no
|-
|ksdevice=bootif
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|ksdevice=eth0
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|ksdevice=AA:BB:CC:DD:EE:FF
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
! colspan="1" class="unsortable"|Methods to activate network device
! colspan="6" class="unsortable"|&nbsp;
|-
|ip=dhcp
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:green;"|yes
|style="background-color:red; color:white;"|no
|-
|ip=a.b.c.d
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|dns=
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|gateway=
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|netmask=
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:lightgreen;"|yes
|style="background-color:red; color:white;"|no
|-
|}


== Step 4: Creating Virt Guest==
== Step 4: Creating Virt Guest==

Revision as of 06:37, 18 November 2011

Step 1:Setup test enviroment and check system sanity

  • Virtualization
    • python-fedora installed
    • libvirt installed
    • qemu-kvm installed
    • python-virtinst installed
    • pax installed
    • service libvirtd started
  • Virtual disk (required for hd installation and ks hosted on hd)
    • libguestfs installed
    • python-libguestfs installed
  • Interaction with Desktop
    • Linux Desktop Test Project (LDTP)
      • ldtp installed
      • python-ldtp installed
    • dogtail
  • Logging
    • service rsyslog started on host
    • rsyslog listening on specific port on host

Step 2: Get test media and check media sanity

  • Check Media Sanity
    • size
    • sha256sum
    • md5sum
    • repoclosure for DVD
    • file conflict for DVD

Step 3: Implement boot methods, repo locations, partitioning,user interface,boot loader

The guest should be able to boot from URL, DVD.iso, Live.iso, boot.iso, netinst.iso, all these guests should be able to accept different kick start files location, repo locations, partitions, user interfaces and boot loaders.

  • kick start can be passed by virt-install arguments for tree compose or terminal for ISOs
    • remote kickstart files: http, ftp, nfs
    • local kickstart files: ks file should be uploaded on to the virtdisk before using it
  • repo
    • passed by terminal
    • passed by ks file
  • partitioning
    • passed by ks file
  • user interface
    • passed by terminal
  • boot loader
    • passed by ks file

The mapping of test cases with kick start files can be found at Testcase_Kickstart_Mapping


Step 4: Creating Virt Guest

virt-install is adopted to initialize the guest. The functions to create guest with virt-install from url, DVD,ect. should be defined firstly. The following functions are defined in the class VirtGuest located in /lib/python/virtguest.py.

Method Function
URL url_create()
DVD,CD,boot.iso iso_create()


Identify potential test drivers that trigger off of those events.

Step 5 : Logging and watching the steps of installation

Get the installation output and logs at every step:

Stage Log file End label
Boot boot.log Greetings
Stage1 stage1.log Running anaconda [version], system installer - please wait
Stage2 stage2.log

Key

Set priorities for each test. The test drivers will support the tests with high priority.

Colour Explanation
yes supported and default (high priority)
yes supported (medium priority)
yes supported (low priority)
no unsupported configuration
unknown unknown

References