Skip to content

Comments

Add some tests for interestingness scripts.#50

Merged
jschwartzentruber merged 12 commits intoMozillaSecurity:masterfrom
jschwartzentruber:add-interestingness-tests
Aug 29, 2017
Merged

Add some tests for interestingness scripts.#50
jschwartzentruber merged 12 commits intoMozillaSecurity:masterfrom
jschwartzentruber:add-interestingness-tests

Conversation

@jschwartzentruber
Copy link
Collaborator

These are ported from #36.

@codecov-io
Copy link

codecov-io commented Aug 29, 2017

Codecov Report

Merging #50 into master will increase coverage by 9.31%.
The diff coverage is 93.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage    73.7%   83.01%   +9.31%     
==========================================
  Files          13       13              
  Lines        1559     1666     +107     
==========================================
+ Hits         1149     1383     +234     
+ Misses        410      283     -127
Impacted Files Coverage Δ
src/lithium/interestingness/crashes.py 100% <100%> (+72.22%) ⬆️
src/lithium/interestingness/timed_run.py 70.87% <100%> (+56.31%) ⬆️
tests/test_lithium.py 94.96% <93.51%> (-0.4%) ⬇️
src/lithium/reducer.py 80.92% <0%> (+0.12%) ⬆️
src/lithium/interestingness/utils.py 56.38% <0%> (+28.72%) ⬆️
src/lithium/interestingness/outputs.py 100% <0%> (+66.66%) ⬆️
src/lithium/interestingness/hangs.py 100% <0%> (+66.66%) ⬆️
src/lithium/interestingness/range.py 95.45% <0%> (+68.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0943b3...e4d7dca. Read the comment docs.

Copy link
Contributor

@nth10sd nth10sd left a comment

Choose a reason for hiding this comment

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

Thanks for implementing the changes we discussed early on over IRC!

Only some nits to take care of now, so r+

msg = "CRASHED (Address Sanitizer fault)"
sta = CRASHED
elif return_code > 0:
elif 0 < return_code < 0x80000000:
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the comment in the else block that return_code can now be >= 0x80000000 in the else block.

" if len(sys.argv) > 1"
" else os.listdir('.'))"
"]")]
sleep_cmd = [sys.executable, "-c", "import time;time.sleep(3)"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make sleep_cmd accept a variable timeout number, other than 3? I'm not really insistent on this though.

winreg.KEY_QUERY_VALUE | winreg.KEY_SET_VALUE)
self.wer_disabled = bool(winreg.QueryValueEx(wer, "Disabled")[0])
if not self.wer_disabled:
winreg.SetValueEx(wer, "Disabled", 0, winreg.REG_DWORD, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed over IRC, let's add a comment that we are not sure if we are disabling reporting to Microsoft, or whether we are disabling crash report generation altogether.

@jschwartzentruber jschwartzentruber merged commit f69ee76 into MozillaSecurity:master Aug 29, 2017
@jschwartzentruber jschwartzentruber deleted the add-interestingness-tests branch August 29, 2017 18:40
@nth10sd nth10sd mentioned this pull request Aug 29, 2017
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.

3 participants