Add test_name option to be used by dispatcher.

PiperOrigin-RevId: 769782635
diff --git a/centipede/centipede_callbacks.cc b/centipede/centipede_callbacks.cc
index 90e189d..8a2ec0c 100644
--- a/centipede/centipede_callbacks.cc
+++ b/centipede/centipede_callbacks.cc
@@ -154,8 +154,8 @@
                 binary) != env_.extra_binaries.end();
 
   std::vector<std::string> env = {ConstructRunnerFlags(
-      absl::StrCat(":shmem:arg1=", inputs_blobseq_.path(),
-                   ":arg2=", outputs_blobseq_.path(),
+      absl::StrCat(":shmem:test=", env_.test_name, ":arg1=",
+                   inputs_blobseq_.path(), ":arg2=", outputs_blobseq_.path(),
                    ":failure_description_path=", failure_description_path_,
                    ":failure_signature_path=", failure_signature_path_, ":"),
       disable_coverage)};
@@ -270,8 +270,8 @@
   CHECK(!error);
 
   std::string centipede_runner_flags = absl::StrCat(
-      "CENTIPEDE_RUNNER_FLAGS=:dump_seed_inputs:arg1=", output_dir.string(),
-      ":");
+      "CENTIPEDE_RUNNER_FLAGS=:dump_seed_inputs:test=", env_.test_name,
+      ":arg1=", output_dir.string(), ":");
   if (!env_.runner_dl_path_suffix.empty()) {
     absl::StrAppend(&centipede_runner_flags,
                     "dl_path_suffix=", env_.runner_dl_path_suffix, ":");
diff --git a/centipede/centipede_flags.inc b/centipede/centipede_flags.inc
index 091c8e7..fd331ac 100644
--- a/centipede/centipede_flags.inc
+++ b/centipede/centipede_flags.inc
@@ -49,6 +49,8 @@
     "the reports. --workdir in turn must be local in order for this "
     "functionality to work. See "
     "https://clang.llvm.org/docs/SourceBasedCodeCoverage.html")
+CENTIPEDE_FLAG(std::string, test_name, "",
+               "The name of test to pass to the binary to operate on.")
 CENTIPEDE_FLAG(
     std::vector<std::string>, extra_binaries, {},
     "A comma-separated list of extra target binaries. These binaries are "