Add e2e cmdline tests and fix Flush with no producers

Adds end-to-end coverage of the cmdline interface.
It is not simple anymore and recently became a source of bugs.
Furthermore, fix a minor bug that caused Flush() on an empty
tracing session to timeout (and waste time during tests).

Bug:120607375
Change-Id: Idcdbdd4a03712988beb65ec0b386769898ec98d8
diff --git a/test/test_helper.cc b/test/test_helper.cc
index 8ad8d9f..46572e8 100644
--- a/test/test_helper.cc
+++ b/test/test_helper.cc
@@ -175,4 +175,9 @@
     std::move(on_attach_callback_)(success);
 }
 
+// static
+const char* TestHelper::GetConsumerSocketName() {
+  return TEST_CONSUMER_SOCK_NAME;
+}
+
 }  // namespace perfetto