event_name="$2"
chan_name="$3"
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" -s $sess_name -c $chan_name -u >/dev/null 2>&1
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-event "$event_name" --session "$sess_name"\
+ --channel "$chan_name" --userspace
ok $? "Enable event $event_name for session $sess_name in channel $chan_name"
}
test_name+="for session $sess_name: "
test_name+="$tracefile_size_limit bytes tracefile limit"
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-channel \
- -k $channel_name -s $sess_name \
- -C $tracefile_size_limit >/dev/null 2>&1
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-channel \
+ --kernel "$channel_name" --session "$sess_name" \
+ --tracefile-size $tracefile_size_limit
ok $? "$test_name"
}
test_name+="for session $sess_name "
test_name+="in channel $channel_name"
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" \
- -s $sess_name -k -c $channel_name >/dev/null 2>&1
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-event "$event_name" \
+ --session "$sess_name" --kernel --channel "$channel_name"
ok $? "$test_name"
}
sess_name="$1"
exclusion="$2"
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event -u "tp:*" -s $sess_name -x "$exclusion" > /dev/null
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-event --userspace "tp:*" --session "$sess_name" \
+ --exclude "$exclusion"
}
function run_apps
# Create session
create_lttng_session_ok $SESSION_NAME $trace_path
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event -u "tp:*" -s $SESSION_NAME > /dev/null
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-event --userspace "tp:*" --session "$SESSION_NAME"
ok $? "Enabling events without exclusion"
# Trace apps
exclusions="$2"
create_lttng_session_ok $SESSION_NAME $trace_path
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event -u "$event_name" -s $sess_name -x "$exclusions" >/dev/null 2>&1
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-event --userspace "$event_name" --session "$sess_name" \
+ --exclude "$exclusions"
res=$?
destroy_lttng_session_ok $SESSION_NAME
event_name="$3"
filter="$4"
- $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event $event_name -s $sess_name \
- $domain --filter "$filter" 2> $ENABLE_EVENT_STDERR 1> /dev/null
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" \
+ enable-event "$event_name" --session "$sess_name" \
+ "$domain" --filter "$filter"
# Enable must fail
if [ $? -eq 0 ]; then
TESTDIR=$CURDIR/../../..
SESSION_NAME="filter-unsupported-ops"
EVENT_NAME="bogus"
-ENABLE_EVENT_STDERR="/tmp/unsupported-ops-enable"
+ENABLE_EVENT_STDERR=$(mktemp -t tmp.test_filtering_unsupported_ops.XXXXXX)
TRACE_PATH=$(mktemp -d -t tmp.test_filtering_unsupported_ops_trace_path.XXXXXX)
NUM_GLOBAL_TESTS=2
NUM_UST_TESTS=20
event_name="$3"
filter="$4"
- enable_cmd="$TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event"
- $enable_cmd $event_name -s $sess_name $domain --filter "$filter" 2> $ENABLE_EVENT_STDERR 1> /dev/null
+ _run_lttng_cmd '/dev/null' "$ENABLE_EVENT_STDERR" enable-event \
+ "$event_name" --session "$sess_name" "$domain" --filter "$filter"
# Enable must fail
if [ $? -eq 0 ]; then
local target="$3"
local event_name="$4"
- "$TESTDIR/../src/bin/lttng/$LTTNG_BIN" enable-event --kernel --userspace-probe="$target" "$event_name" -s "$sess_name" >"$(lttng_client_log_file)" 2>"$(lttng_client_err_file)"
+ _run_lttng_cmd "$(lttng_client_log_file)" "$(lttng_client_err_file)" enable-event \
+ --kernel --userspace-probe="$target" "$event_name" --session "$sess_name"
ret=$?
if [[ $expected_to_fail -eq "1" ]]; then
test $ret -ne "0"