Hello community, here is the log from the commit of package yast2-kdump for openSUSE:Factory checked in at 2017-06-24 08:33:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-kdump (Old) and /work/SRC/openSUSE:Factory/.yast2-kdump.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-kdump" Sat Jun 24 08:33:17 2017 rev:83 rq:505690 version:3.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-kdump/yast2-kdump.changes 2017-06-22 10:35:36.742060583 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-kdump.new/yast2-kdump.changes 2017-06-24 08:33:20.013897308 +0200 @@ -1,0 +2,7 @@ +Wed Jun 21 09:10:56 UTC 2017 - gso...@suse.com + +- Fixed regular expression that verifies alloc_mem parameter + (bsc#1045098). +- 3.2.6 + +------------------------------------------------------------------- Old: ---- yast2-kdump-3.2.5.tar.bz2 New: ---- yast2-kdump-3.2.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-kdump.spec ++++++ --- /var/tmp/diff_new_pack.4farrv/_old 2017-06-24 08:33:20.793787030 +0200 +++ /var/tmp/diff_new_pack.4farrv/_new 2017-06-24 08:33:20.793787030 +0200 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 3.2.5 +Version: 3.2.6 Release: 0 Summary: Configuration of kdump License: GPL-2.0 ++++++ yast2-kdump-3.2.5.tar.bz2 -> yast2-kdump-3.2.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.2.5/package/yast2-kdump.changes new/yast2-kdump-3.2.6/package/yast2-kdump.changes --- old/yast2-kdump-3.2.5/package/yast2-kdump.changes 2017-06-20 16:35:47.736649735 +0200 +++ new/yast2-kdump-3.2.6/package/yast2-kdump.changes 2017-06-22 15:29:27.273595575 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Jun 21 09:10:56 UTC 2017 - gso...@suse.com + +- Fixed regular expression that verifies alloc_mem parameter + (bsc#1045098). +- 3.2.6 + +------------------------------------------------------------------- Tue Jun 20 12:19:21 UTC 2017 - gso...@suse.com - The alloc_mem parameter is verified to be in accordance with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.2.5/package/yast2-kdump.spec new/yast2-kdump-3.2.6/package/yast2-kdump.spec --- old/yast2-kdump-3.2.5/package/yast2-kdump.spec 2017-06-20 16:35:47.736649735 +0200 +++ new/yast2-kdump-3.2.6/package/yast2-kdump.spec 2017-06-22 15:29:27.273595575 +0200 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 3.2.5 +Version: 3.2.6 Release: 0 Summary: Configuration of kdump License: GPL-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.2.5/src/clients/kdump.rb new/yast2-kdump-3.2.6/src/clients/kdump.rb --- old/yast2-kdump-3.2.5/src/clients/kdump.rb 2017-06-20 16:35:47.736649735 +0200 +++ new/yast2-kdump-3.2.6/src/clients/kdump.rb 2017-06-22 15:29:27.273595575 +0200 @@ -735,20 +735,20 @@ # Only numbers are allowed as allow_mem_high and allow_mem_low values - ALLOC_MEM_REGEXP = /\D/ + ALLOC_MEM_REGEXP = /\A\d+\z/ def cmdKdumpStartup(options) options = deep_copy(options) if Ops.get(options, "enable") != nil && Ops.get(options, "alloc_mem") != nil - Kdump.add_crashkernel_param = true alloc_mem_low, alloc_mem_high = options["alloc_mem"].split(',') - Kdump.allocated_memory = { low: alloc_mem_low, high: alloc_mem_high } unless alloc_mem_low =~ ALLOC_MEM_REGEXP && (alloc_mem_high.nil? || alloc_mem_high =~ ALLOC_MEM_REGEXP) - CommandLine.Error(_("Invalid allocation memory parameter")) + CommandLine.Error(_("alloc_mem parameter used with invalid values")) return false end + Kdump.add_crashkernel_param = true + Kdump.allocated_memory = { low: alloc_mem_low, high: alloc_mem_high } #TRANSLATORS: CommandLine printed text if Kdump.crashkernel_list_ranges CommandLine.Print( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.2.5/test/client_test.rb new/yast2-kdump-3.2.6/test/client_test.rb --- old/yast2-kdump-3.2.5/test/client_test.rb 2017-06-20 16:35:47.760649735 +0200 +++ new/yast2-kdump-3.2.6/test/client_test.rb 2017-06-22 15:29:27.277595575 +0200 @@ -1,12 +1,21 @@ require_relative "./test_helper" require_relative "../src/clients/kdump" +Yast.import "CommandLine" describe Yast::KdumpClient do describe ".cmdKdumpStartup" do let(:alloc_mem_high) {"100"} let(:alloc_mem_low) {"50"} - + + context "When using wrong inputs in alloc memory" do + let(:options) {{"enable"=>"", "alloc_mem"=>"#{alloc_mem_low}:#{alloc_mem_high}"}} + + it "does not enable kdump and returns false" do + expect(subject.cmdKdumpStartup(options)).to be false + end + end + context "When using alloc memory high and low" do let(:options) {{"enable"=>"", "alloc_mem"=>"#{alloc_mem_low},#{alloc_mem_high}"}} @@ -17,7 +26,7 @@ expect(Yast::Kdump.add_crashkernel_param).to be true end end - + context "when using only alloc memory low" do let(:options) {{"enable"=>"", "alloc_mem"=>"#{alloc_mem_low}"}}