#!/bin/bash
#
# Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com>
#
# SPDX-License-Identifier: LGPL-2.1-only

TEST_DESC="Triggers - Hidden internal triggers"

CURDIR=$(dirname "$0")/
TESTDIR=${CURDIR}/../../../..
TRACE_PATH=$(mktemp --tmpdir -d -t tmp.test_trigger_hidden.XXXXXX)

# shellcheck source=../../../../utils/utils.sh
source "$TESTDIR/utils/utils.sh"

HIDDEN_TRIGGER_BIN="$CURDIR/hidden_trigger"

# MUST set TESTDIR before calling those functions

start_lttng_sessiond_notap

$HIDDEN_TRIGGER_BIN "$TRACE_PATH"

stop_lttng_sessiond_notap

rm -rf "$TRACE_PATH"
