1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 13:33:08 +00:00

Add jobs to gather memory usage data

Summary:
This adds a new test, memory_check, which just does a default
package set install with `inst.debug` parameter then uploads
the memory usage file (`/tmp/memory.dat`) at the end. We can
have check-compose use the data to analyze changes in memory
usage over time.

Test Plan:
Fire off the Workstation network install image tests
and make sure the memory usage test runs and works on all three
machines. This is live on staging already.

Reviewers: jskladan, garretraziel_but_actually_jsedlak_who_uses_stupid_nicknames

Reviewed By: garretraziel_but_actually_jsedlak_who_uses_stupid_nicknames

Subscribers: tflink

Differential Revision: https://phab.qa.fedoraproject.org/D1082
This commit is contained in:
Adam Williamson 2017-01-16 09:30:14 -08:00
parent a946b02e71
commit 062d9f8f5e
5 changed files with 81 additions and 7 deletions

View File

@ -173,6 +173,13 @@ sub load_install_tests() {
}
sub load_postinstall_tests() {
# special case for the memory check test, as it doesn't need to boot
# the installed system: just load its test and return
if (get_var("MEMCHECK")) {
autotest::loadtest "tests/_memcheck.pm";
return;
}
# Unlock encrypted storage volumes, if necessary. The test name here
# follows the 'storage post-install' convention, but must be run earlier.
if (get_var("ENCRYPT_PASSWORD")) {

View File

@ -116,6 +116,28 @@
},
test_suite => { name => "install_default" },
},
{
machine => { name => "64bit" },
prio => 100,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "Workstation-boot-iso",
version => "*",
},
test_suite => { name => "memory_check" },
},
{
machine => { name => "uefi" },
prio => 100,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "Workstation-boot-iso",
version => "*",
},
test_suite => { name => "memory_check" },
},
{
machine => { name => "uefi" },
prio => 16,
@ -1238,6 +1260,17 @@
},
test_suite => { name => "install_default" },
},
{
machine => { name => "64bit" },
prio => 100,
product => {
arch => "i386",
distri => "fedora",
flavor => "Workstation-boot-iso",
version => "*",
},
test_suite => { name => "memory_check" },
},
{
machine => { name => "64bit" },
prio => 17,
@ -2305,5 +2338,13 @@
{ key => "WORKER_CLASS", value => "tap" },
],
},
{
name => "memory_check",
settings => [
{ key => "PACKAGE_SET", value => "default" },
{ key => "MEMCHECK", value => "1" },
{ key => "REPOSITORY_VARIATION", value => "%LOCATION%" },
],
},
],
}

View File

@ -17,7 +17,9 @@ sub run {
if ($repourl) {
$params .= "inst.repo=" . $self->get_full_repo($repourl) . " ";
}
$params .= "inst.text" if get_var("ANACONDA_TEXT");
$params .= "inst.text " if get_var("ANACONDA_TEXT");
# inst.debug enables memory use tracking
$params .= "debug" if get_var("MEMCHECK");
# ternary: set $params to "" if it contains only spaces
$params = $params =~ /^\s+$/ ? "" : $params;

View File

@ -104,12 +104,15 @@ sub run {
assert_screen "anaconda_install_done", $timeout;
# wait for transition to complete so we don't click in the sidebar
wait_still_screen 3;
assert_and_click "anaconda_install_done";
if (get_var('LIVE')) {
# reboot from a console, it's more reliable than the desktop
# runners
$self->root_console;
type_string "reboot\n";
# for the memory check test, we *don't* want to leave
unless (get_var("MEMCHECK")) {
assert_and_click "anaconda_install_done";
if (get_var('LIVE')) {
# reboot from a console, it's more reliable than the desktop
# runners
$self->root_console;
type_string "reboot\n";
}
}
}

21
tests/_memcheck.pm Normal file
View File

@ -0,0 +1,21 @@
use base "anacondatest";
use strict;
use testapi;
sub run {
my $self = shift;
$self->root_console();
upload_logs '/tmp/memory.dat';
}
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: