add a base_selinux test (follow-on from default_install)
Summary: so here's our first attempt to use the 'carry on from a previous test' stuff! This adds a base_selinux test that uses a disk image from a previous default_install run, and adds jobtemplates to run base_selinux for appropriate products: generic_boot (for nightly tests), server_dvd, and workstation_live. Note that you'll want to either update to the newest openQA package I just built in COPR or create /var/lib/openqa/share/factory/tmp owned by geekotest; openQA tries to use that directory as MOJO_TMPDIR but in 4.2, if the directory doesn't exist, it doesn't create it, and we wind up with the default MOJO_TMPDIR which is /tmp; when the disk image is uploaded it creates a huge temp file in /tmp and may well exhaust the available space as it's a tmpfs. I've backported a recent upstream commit that tries to create the directory if it doesn't exist, in 4.2-10. It seems like openQA is smart enough to figure out the dependencies correctly, so the 'base_selinux' test for each product depends on the 'default_install' test for the same product (not any of the other default_install runs) and will use the hard disk image it produces. Test Plan: Do a full test run and make sure base_selinux tests appear for appropriate products, depend on the correct default_ install test, the default_install test uploads the hard disk image correctly, and the base_selinux test runs correctly. And of course that nothing else broke in the process... Reviewers: jskladan, garretraziel Reviewed By: jskladan Subscribers: tflink Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D699
This commit is contained in:
parent
d06f775d5c
commit
85c57b47e4
43
templates
43
templates
@ -105,6 +105,39 @@
|
||||
},
|
||||
test_suite => { name => "default_install" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 40,
|
||||
product => {
|
||||
arch => "x86_64",
|
||||
distri => "fedora",
|
||||
flavor => "generic_boot",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "base_selinux" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 40,
|
||||
product => {
|
||||
arch => "x86_64",
|
||||
distri => "fedora",
|
||||
flavor => "workstation_live",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "base_selinux" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 40,
|
||||
product => {
|
||||
arch => "x86_64",
|
||||
distri => "fedora",
|
||||
flavor => "server_dvd",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "base_selinux" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
prio => 30,
|
||||
@ -880,6 +913,7 @@
|
||||
name => "default_install",
|
||||
settings => [
|
||||
{ key => "PACKAGE_SET", value => "default" },
|
||||
{ key => "STORE_HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -1127,5 +1161,14 @@
|
||||
{ key => "PACKAGE_SET", value => "kde" },
|
||||
],
|
||||
},
|
||||
{
|
||||
name => "base_selinux",
|
||||
settings => [
|
||||
{ key => "ENTRYPOINT", value => "base_selinux" },
|
||||
{ key => "START_AFTER_TEST", value => "default_install" },
|
||||
{ key => "BOOTFROM", value => "c" },
|
||||
{ key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
25
tests/base_selinux.pm
Normal file
25
tests/base_selinux.pm
Normal file
@ -0,0 +1,25 @@
|
||||
use base "installedtest";
|
||||
use strict;
|
||||
use testapi;
|
||||
|
||||
sub run {
|
||||
my $self=shift;
|
||||
# wait for boot to complete
|
||||
$self->boot_to_login_screen("", 30);
|
||||
# switch to TTY3 for both, graphical and console tests
|
||||
$self->root_console(tty=>3);
|
||||
validate_script_output 'getenforce', sub { $_ =~ m/Enforcing/ };
|
||||
}
|
||||
|
||||
|
||||
sub test_flags {
|
||||
# without anything - rollback to 'lastgood' snapshot if failed
|
||||
# 'fatal' - whole test suite is in danger if this fails
|
||||
# 'milestone' - after this test succeeds, update 'lastgood'
|
||||
# 'important' - if this fails, set the overall state to 'fail'
|
||||
return { fatal => 1 };
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
Loading…
Reference in New Issue
Block a user