######## Utility functions
+cleanup() {
+ [ "$UTIL_PID" -ne -1 ] && kill "$UTIL_PID" > /dev/null 2>&1
+ [ "$MT_TEST" -ne -1 ] && kill "$MT_TEST" > /dev/null 2>&1
+ [ "$LOGGER" -ne -1 ] && kill "$LOGGER" > /dev/null 2>&1
+ # Shellcheck doesn't like this because the rm call is bad if $TESTDIR is empty.
+ # However, such cases would be caught by the conditional.
+ # shellcheck disable=SC2115
+ [ -d "$TESTDIR" ] && rm -rf "$TESTDIR"/*
+ [ -d "$RUNTIME_FILTERS_DIR" ] && rm -rf "$RUNTIME_FILTERS_DIR"
+}
+
extract_timestamp() {
ts=0
case "$1" in
echo "$ts"
}
+######
+if [ "$1" = "pipe" ]; then
+ type="pipe"
+elif [ "$1" = "logger" ]; then
+ type="logger"
+elif [ "$1" = "zero-copy" ]; then
+ type="zero-copy"
+elif [ "$1" = "pipe_quick" ]; then
+ type="pipe"
+ quick=1
+elif [ "$1" = "logger_quick" ]; then
+ type="logger"
+ quick=1
+else
+ echo "$USAGE_MESSAGE"
+ exit 1
+fi
+