Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bsc#1045098: Fix regular expression to check alloc_mem parameter #82

Merged
merged 5 commits into from
Jun 22, 2017

Conversation

gilsonsouza
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 34.95% when pulling 23e451c on gilsonsouza:SLE-12-SP3 into 71f1d2a on yast:SLE-12-SP3.

Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. But I would wait for @mvidner before merging.

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 return false" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returns

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 34.95% when pulling 2f45dce on gilsonsouza:SLE-12-SP3 into 71f1d2a on yast:SLE-12-SP3.

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"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"allocation memory" is wrong, it should be "memory allocation"; but even better, quote the actual parameter name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better: "alloc_mem parameter used with invalid values" ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 34.95% when pulling b0998bd on gilsonsouza:SLE-12-SP3 into 71f1d2a on yast:SLE-12-SP3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants