code_coverage: fix issue changing shallow copy of `cmd`
Basically, even though we were not directly modifying `cmd`, python
sometimes decides to do a shallow copy of the list, and thus modifies it
when adding the corpus directory path to it.
Change-Id: I02f665a203d8e05784fe3f7bc89146016c5c9ac1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6459067
Commit-Queue: Ali Hijazi <[email protected]>
Auto-Submit: Paul Semel <[email protected]>
Reviewed-by: Ali Hijazi <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1447686}
NOKEYCHECK=True
GitOrigin-RevId: 843495c2c9fe6a2d89064e8e4429a99c4f2af69b
diff --git a/run_all_fuzzers.py b/run_all_fuzzers.py
index 48f8223..b6ea4c6 100644
--- a/run_all_fuzzers.py
+++ b/run_all_fuzzers.py
@@ -99,10 +99,10 @@
def run_full_corpus(self, env: Mapping[str, str], timeout: float,
annotation: str, corpus_dir: Optional[str]) -> bool:
- run_cmd = self.cmd
+ extra_args = []
if corpus_dir:
- run_cmd += [corpus_dir]
- return self._run_command(run_cmd, env, timeout, annotation)
+ extra_args += [corpus_dir]
+ return self._run_command(self.cmd + extra_args, env, timeout, annotation)
def run_testcases(self, env: Mapping[str, str], timeout: float,
annotation: str, testcases: Sequence[str]) -> bool: