-
Notifications
You must be signed in to change notification settings - Fork 275
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
Revert prev lint fix #1604
Revert prev lint fix #1604
Changes from 5 commits
5359885
94cc54c
e98c11a
f002ffb
2a5f3fa
53714cd
8ab0fb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,8 +91,8 @@ def run_neuzz(input_corpus, | |
'python2', './nn.py', '--output-folder', afl_output_dir, target_binary | ||
] | ||
print('[run_neuzz] Running command: ' + ' '.join(command)) | ||
with subprocess.Popen(command, stdout=output_stream, stderr=output_stream): | ||
pass | ||
# pylint: disable=consider-using-with | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this patch changes too much. I think with usage didn't make sense in the first location, but I don't see why you would change these other ones. I think it makes sense here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, I think I should have considered this case by case:
I am inclined to not use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should get rid of it in gcloud.py. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see! |
||
subprocess.Popen(command, stdout=output_stream, stderr=output_stream) | ||
time.sleep(40) | ||
target_rel_path = os.path.relpath(target_binary, os.getcwd()) | ||
# Spinning up neuzz | ||
|
@@ -101,9 +101,11 @@ def run_neuzz(input_corpus, | |
target_rel_path, '@@' | ||
] | ||
print('[run_neuzz] Running command: ' + ' '.join(command)) | ||
with subprocess.Popen(command, stdout=output_stream, | ||
stderr=output_stream) as neuzz_proc: | ||
neuzz_proc.wait() | ||
# pylint: disable=consider-using-with | ||
neuzz_proc = subprocess.Popen(command, | ||
stdout=output_stream, | ||
stderr=output_stream) | ||
neuzz_proc.wait() | ||
|
||
|
||
def fuzz(input_corpus, output_corpus, target_binary): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this does anything to check if the command succeeded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It checks the return status of the command in the next line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like the same behaviour as before: https://github.com/google/fuzzbench/pull/1529/files#diff-f61c598f4891541e693644bbc9016e5841fcddc986ea967eb3e192586a8c57deL133
The previous return was a no-op that would've always returned True (side note: is this behaviour actually correct?)
@alan32liu would be good to make this more explicit in the PR description in the future to make it clearer to reviewers :)