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:
parent
a946b02e71
commit
062d9f8f5e
7
main.pm
7
main.pm
@ -173,6 +173,13 @@ sub load_install_tests() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub load_postinstall_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
|
# Unlock encrypted storage volumes, if necessary. The test name here
|
||||||
# follows the 'storage post-install' convention, but must be run earlier.
|
# follows the 'storage post-install' convention, but must be run earlier.
|
||||||
if (get_var("ENCRYPT_PASSWORD")) {
|
if (get_var("ENCRYPT_PASSWORD")) {
|
||||||
|
41
templates
41
templates
@ -116,6 +116,28 @@
|
|||||||
},
|
},
|
||||||
test_suite => { name => "install_default" },
|
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" },
|
machine => { name => "uefi" },
|
||||||
prio => 16,
|
prio => 16,
|
||||||
@ -1238,6 +1260,17 @@
|
|||||||
},
|
},
|
||||||
test_suite => { name => "install_default" },
|
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" },
|
machine => { name => "64bit" },
|
||||||
prio => 17,
|
prio => 17,
|
||||||
@ -2305,5 +2338,13 @@
|
|||||||
{ key => "WORKER_CLASS", value => "tap" },
|
{ key => "WORKER_CLASS", value => "tap" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name => "memory_check",
|
||||||
|
settings => [
|
||||||
|
{ key => "PACKAGE_SET", value => "default" },
|
||||||
|
{ key => "MEMCHECK", value => "1" },
|
||||||
|
{ key => "REPOSITORY_VARIATION", value => "%LOCATION%" },
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@ sub run {
|
|||||||
$params .= "inst.repo=" . $self->get_full_repo($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
|
# ternary: set $params to "" if it contains only spaces
|
||||||
$params = $params =~ /^\s+$/ ? "" : $params;
|
$params = $params =~ /^\s+$/ ? "" : $params;
|
||||||
|
|
||||||
|
@ -104,6 +104,8 @@ sub run {
|
|||||||
assert_screen "anaconda_install_done", $timeout;
|
assert_screen "anaconda_install_done", $timeout;
|
||||||
# wait for transition to complete so we don't click in the sidebar
|
# wait for transition to complete so we don't click in the sidebar
|
||||||
wait_still_screen 3;
|
wait_still_screen 3;
|
||||||
|
# for the memory check test, we *don't* want to leave
|
||||||
|
unless (get_var("MEMCHECK")) {
|
||||||
assert_and_click "anaconda_install_done";
|
assert_and_click "anaconda_install_done";
|
||||||
if (get_var('LIVE')) {
|
if (get_var('LIVE')) {
|
||||||
# reboot from a console, it's more reliable than the desktop
|
# reboot from a console, it's more reliable than the desktop
|
||||||
@ -112,6 +114,7 @@ sub run {
|
|||||||
type_string "reboot\n";
|
type_string "reboot\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
# without anything - rollback to 'lastgood' snapshot if failed
|
# without anything - rollback to 'lastgood' snapshot if failed
|
||||||
|
21
tests/_memcheck.pm
Normal file
21
tests/_memcheck.pm
Normal 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:
|
Loading…
Reference in New Issue
Block a user