Skip to content

Commit

Permalink
Update proposed values in the test suite
Browse files Browse the repository at this point in the history
The default proposal for kernel reservation is now either max_high,
or half of total memory, whichever is smaller. Adjust the test
suite accordingly.

Also, make sure that auto resize is turned off if crash_kernel
should not be changed.
  • Loading branch information
ptesarik committed Feb 4, 2022
1 parent ca8e5d0 commit 2a23716
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/kdump_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,15 @@
end

context "during autoinstallation" do
let(:bootlader_kernel_params) { ["73M,high"] }
let(:bootlader_kernel_params) { ["2047M,high"] }
let(:bootlader_xen_kernel_params) { ["73M\\<4G"] }

before do
allow(Yast::Mode).to receive(:autoinst).and_return true
allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 0
allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 73
allow(Yast::Kdump.calibrator).to receive(:max_high).and_return 4092
allow(Yast::Kdump.calibrator).to receive(:total_memory).and_return 4095
Yast::Kdump.Import(profile)
end

Expand Down Expand Up @@ -527,13 +529,15 @@
end

context "during autoupgrade" do
let(:bootlader_kernel_params) { ["75M,high"] }
let(:bootlader_kernel_params) { ["1968M,high"] }
let(:bootlader_xen_kernel_params) { ["75M\\<4G"] }

before do
allow(Yast::Mode).to receive(:autoupgrade).and_return true
allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 0
allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 75
allow(Yast::Kdump.calibrator).to receive(:max_high).and_return 1968
allow(Yast::Kdump.calibrator).to receive(:total_memory).and_return 4095
Yast::Kdump.Import(profile)
end

Expand Down Expand Up @@ -828,9 +832,15 @@
allow(Yast::Mode).to receive(:autoinst).and_return true
end
let(:profile) do
{ "add_crash_kernel" => true,
{
"add_crash_kernel" => true,
"crash_kernel" => "256M",
"general" => { "KDUMP_SAVEDIR"=>"file:///var/dummy" } }
"general" =>
{
"KDUMP_SAVEDIR" => "file:///var/dummy",
"KDUMP_AUTO_RESIZE" => "no"
}
}
end
# bnc#995750
it "does not override imported AutoYaST settings" do
Expand Down

0 comments on commit 2a23716

Please sign in to comment.