aboutsummaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2021-03-15 09:20:13 -0700
committerGitHub <noreply@github.com>2021-03-15 16:20:13 +0000
commit5ca736fe000557115aeb945063298781494d4d04 (patch)
treed92461c3a0465462d70f67c8e6d92d2e7bacb4ef /infra
parent92cea13c5d762d364d549597cc2cb490b7273edb (diff)
downloadoss-fuzz-5ca736fe000557115aeb945063298781494d4d04.tar.gz
[CIFuzz] Fix issue deleting corpus (#5391)
Sometimes deleting the corpus in free_disk_if_needed exceptions. Pass ignore_errors=True to fix this. Related: #5383
Diffstat (limited to 'infra')
-rw-r--r--infra/cifuzz/fuzz_target.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/infra/cifuzz/fuzz_target.py b/infra/cifuzz/fuzz_target.py
index 4bdd17969..e2beebd77 100644
--- a/infra/cifuzz/fuzz_target.py
+++ b/infra/cifuzz/fuzz_target.py
@@ -156,7 +156,9 @@ class FuzzTarget:
# Delete the seed corpus, corpus, and fuzz target.
if self.latest_corpus_path and os.path.exists(self.latest_corpus_path):
- shutil.rmtree(self.latest_corpus_path)
+ # Use ignore_errors=True to fix
+ # https://github.com/google/oss-fuzz/issues/5383.
+ shutil.rmtree(self.latest_corpus_path, ignore_errors=True)
os.remove(self.target_path)
target_seed_corpus_path = self.target_path + '_seed_corpus.zip'