Product SiteDocumentation Site

Chapter 13. Testing

13.1. Simple Test Cases
13.1.1. Packages
13.1.2. Configuration Files
13.1.3. Requirements for Compose Results
13.2. Complex Test Cases
13.3. Specific Test Cases
The following test cases describe different types of testing a new Revisor release.

13.1. Simple Test Cases

This section has a few simple test cases ensuring configuration shipped with Revisor works as anticipated.

13.1.1. Packages

Install the revisor-cli:
# yum --enablerepo=updates-testing install revisor
Installed are all dependencies for the Revisor CLI interface. Make sure spin-kickstarts is installed, a package for sample kickstarts.
Starting Revisor as follows should not show any error messages related to Revisor attempting to start up it's GUI interface:
# revisor
Configuration Files
The following configuration files should exist:
  • /etc/revisor/revisor.conf
Each section should have a configuration file listed as main.
And, of course, every configuration file listed in each section. In this case, the following snippet is easy enough:
$ i=0; \
 configfiles="`grep ^main /etc/revisor/revisor.conf | \
 sed -r -e 's/^main.*=\s*(.*)/\1/g'`"

for configfile in $configfiles; do \
 [ ! -f $file ] && i=1; \
done; \
echo $i
Another way to test the configuration file is to execute:
$ revisor --list-models >/dev/null
If everything is well, since STDOUT is redirected to /dev/null, you should see no messages at all.

13.1.2. Configuration Files

The main Revisor configuration file is /etc/revisor/revisor.conf. The file lists a series of models, each having their own YUM configuration file in /etc/revisor/conf.d/.
Testing
  • For each model in /etc/revisor/revisor.conf, the main setting for that model should point to a valid file.
  • Each YUM configuration file should work. To verify, run the following command for each configuration file:
    $ yum -c $file list kernel
Known Errors
  • Revisor has baseurls in YUM repositories set to http://localrepo. This URL will not be retrievable for many people, but allows the developers to quickly change mirrors.
  • Repositories that are unavailable at the moment of testing will throw errors Revisor can't do anything about.
  • If the directories revisor-yumcache/ and revisor/ in /var/tmp/, the default working directory, are not writeable for the user then YUM will throw permission denied errors.
    Remove /var/tmp/revisor/ and /var/tmp/revisor-yumcache/ or run the command with root permissions.

13.1.3. Requirements for Compose Results

Although heavily dependent on Anaconda for this part, these are still requirements
ld-linux.so.2
In the initrd.img of the composed product, if 32-bit, /lib/ld-linux.so.2 (or any other version) should link to /lib/ld-2.9.so (or any other version). If /lib/ld-linux.so.2 links to itself, the media will fail to install.
How to test
In a terminal, type the following command:
$ lsinitrd /path/to/initrd | grep ld-linux