Fix bugs for linux-x64-fuzzilli-coverage

With these changes, linux-x64-fuzzilli-coverage was able to run
the tests for >4 hours [1], but eventually failed. Land these
changes first then setup a x86 builder which has less corpora torun, thus easier to debug.

[1] https://ci.chromium.org/ui/p/chromium/builders/ci.shadow/linux-x64-fuzzilli-coverage/8/overview

Bug: 395162693
Change-Id: I14cb4f0ec04971855d9665c2eb7886e097529644
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6322892
Reviewed-by: Prakhar Asthana <[email protected]>
Commit-Queue: Prakhar Asthana <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1428591}
NOKEYCHECK=True
GitOrigin-RevId: 336df3f9cc314b28b49d3edd69c71e345aac5a68
diff --git a/run_all_fuzzers.py b/run_all_fuzzers.py
index a239cb0..aa0ab45 100644
--- a/run_all_fuzzers.py
+++ b/run_all_fuzzers.py
@@ -10,6 +10,7 @@
 
 import argparse
 import glob
+import json
 import math
 import os
 import subprocess
@@ -153,6 +154,10 @@
   fullcorpus_profraw = os.path.join(profraw_dir, target + "_%p.profraw")
   env['LLVM_PROFILE_FILE'] = fullcorpus_profraw
   fullcorpus_cmd = cmd.copy()
+  if corpus_files not in [None, '*']:
+    # Fuzzilli's case
+    jsfiles = corpus_files.split()
+    fullcorpus_cmd.extend([os.path.join(corpus_dir, file) for file in jsfiles])
   _erase_profraws(fullcorpus_profraw)
   for i in range(WHOLE_CORPUS_RETRIES):
     ok = _run_and_log(fullcorpus_cmd, env, WHOLE_CORPUS_TIMEOUT_SECS,
@@ -372,14 +377,15 @@
           'profdata_file':
           os.path.join(REPORT_DIR, f'{corpora_dir}_{i}.profdata'),
           'env':
-          env,
+          dict(),
           'cmd':
-          cmd + chunk,
+          cmd,
           'corpus':
-          fuzzer_target_corporadir,
+          path_to_js_dir,
           'files':
           ' '.join(chunk)
       })
+  return all_target_details
 
 
 def main():