[foozzie] Make harness more robust to unknown flags

When one comparison run crashes, we cap the outputs to compare to the
shorter one. If one of those, however, contains ignored lines, the
comparison get's skewed.

This makes the main source of ignored lines more robust (the line
printed for unknown flags), by not printing it in the first place in
the context of differential fuzzing.

Bug: chromium:1153871
Change-Id: If2e534959779be14a686be5e43630cbf66e215a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2567692
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71522}
This commit is contained in:
Michael Achenbach 2020-12-01 10:25:39 +01:00 committed by Commit Bot
parent be52501d52
commit 1f36c542ae
2 changed files with 3 additions and 2 deletions

View File

@ -3600,7 +3600,9 @@ bool Shell::SetOptions(int argc, char* argv[]) {
} else if (strcmp(str, "--module") == 0) {
// Pass on to SourceGroup, which understands this option.
} else if (strncmp(str, "--", 2) == 0) {
if (!i::FLAG_correctness_fuzzer_suppressions) {
printf("Warning: unknown flag %s.\nTry --help for options\n", str);
}
} else if (strcmp(str, "-e") == 0 && i + 1 < argc) {
set_script_executed();
} else if (strncmp(str, "-", 1) != 0) {

View File

@ -70,7 +70,6 @@ ALLOWED_LINE_DIFFS = [
# Lines matching any of the following regular expressions will be ignored.
# Use uncompiled regular expressions - they'll be compiled later.
IGNORE_LINES = [
r'^Warning: unknown flag .*$',
r'^Warning: .+ is deprecated.*$',
r'^Try --help for options$',