Skip to content

Commit

Permalink
Fix forkbomb time out on saptune 3.1.3
Browse files Browse the repository at this point in the history
TEAM-9573 - Test qam-sles4sap_online_dvd_gnome_hana_nvdimm failing in multiple service packs in forkbomb sub-test
  • Loading branch information
lilyeyes committed Aug 8, 2024
1 parent 7b4632e commit ed2d727
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/sles4sap/forkbomb.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,27 @@ sub run {
my $sid = get_required_var('INSTANCE_SID');
my $instance_id = get_required_var('INSTANCE_ID');
my $sapadm = $self->set_sap_info($sid, $instance_id);

my $package_version = script_output "rpm -q --qf '%{VERSION}' saptune";
record_info('saptune version', $package_version);
record_info('Original kernel.pid_max', script_output('sysctl -a | grep kernel.pid_max', proceed_on_failure => 1));
my $note_id = '2578899';
record_info("Original conf value", script_output("grep kernel.pid_max /usr/share/saptune/notes/$note_id", proceed_on_failure => 1));
# Reset kernel.pid_max according to the changes of SAP Note 2578899
# See https://github.com/SUSE/saptune/commit/a81168759681a05437e60429de0ddc1e19c703f4
# Or see https://github.com/SUSE/saptune/releases/tag/3.1.3 for more details
assert_script_run("saptune note revert $note_id");
assert_script_run("cp /usr/share/saptune/notes/$note_id /etc/saptune/override/");
if (script_output("grep kernel.pid_max /usr/share/saptune/notes/$note_id", proceed_on_failure => 1)) {
assert_script_run("sed -i -r \'s/^kernel.pid_max=.*/kernel.pid_max=40000/g\' /etc/saptune/override/$note_id");
}
else {
assert_script_run("echo kernel.pid_max=40000 >> /etc/saptune/override/$note_id");
}
record_info("Override conf value", script_output("grep kernel.pid_max /etc/saptune/override/$note_id", proceed_on_failure => 1));
assert_script_run("saptune note apply $note_id");
record_info('Override kernel.pid_max', script_output('sysctl -a | grep kernel.pid_max', proceed_on_failure => 1));

$self->test_forkbomb;
}

Expand Down

0 comments on commit ed2d727

Please sign in to comment.