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

Add smoke test #1113

Merged
merged 1 commit into from
Sep 2, 2022
Merged

Add smoke test #1113

merged 1 commit into from
Sep 2, 2022

Conversation

gsingh93
Copy link
Member

@gsingh93 gsingh93 commented Sep 2, 2022

Add a smoke test that runs every command to make sure that no errors are thrown. This catches the bug in #1111. The test is currently skipped because it can be flaky, but until we improve it we can at least run it locally while developing.

We run the commands right after starti and without passing in any additional args. In the future we can improve this by getting the argparser object for the command and generating some default arguments.

We skip running shell commands, as those don't really need testing, and running all of those commands on a user's system could lead to issues. Some of them wait on user input as well, which blocks the test.

A few additional commands needed to be removed, mostly because they either blocked waiting for user input, or just took too long executing every instruction. errno and try_free seem to be throwing legitimate errors, so for now they're added to this list but should be fixed eventually.

Finally, there was a strange issue where start_binary itself was throwing exceptions when it was calling starti, but the exception was just "Warning:". Some commands randomly threw a few additional exceptions, all seem to be related to accessing memory or setting a breakpoint at address 0x318 (at least on my system). For now I've whitelisted these exceptions, but they should eventually be removed.

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2022

Codecov Report

Merging #1113 (9e195c9) into dev (099c766) will increase coverage by 0.01%.
The diff coverage is 48.38%.

@@            Coverage Diff             @@
##              dev    #1113      +/-   ##
==========================================
+ Coverage   50.11%   50.13%   +0.01%     
==========================================
  Files         161      162       +1     
  Lines       19685    19714      +29     
  Branches     1791     1796       +5     
==========================================
+ Hits         9866     9884      +18     
- Misses       9484     9496      +12     
+ Partials      335      334       -1     
Impacted Files Coverage Δ
tests/test_commands.py 42.85% <42.85%> (ø)
pwndbg/commands/shell.py 70.83% <100.00%> (ø)
tests/conftest.py 100.00% <100.00%> (ø)
pwndbg/config.py 78.03% <0.00%> (+2.27%) ⬆️
pwndbg/exception.py 55.55% <0.00%> (+4.44%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@disconnect3d disconnect3d merged commit 2d483fc into pwndbg:dev Sep 2, 2022
@gsingh93 gsingh93 deleted the smoke-test branch September 9, 2022 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants