X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Ftrigger%2Ftest_remove_trigger_cli;h=582cce7ef3fe4958aef349d455b145354601d4ae;hb=bbadb5e0b423348492c56ef7d8430087d9d9349d;hp=168227a4ab84d404205ca6414e336119380d787c;hpb=b61776fb63d4bb14df77c0b5a15de28beed7ddfc;p=lttng-tools.git diff --git a/tests/regression/tools/trigger/test_remove_trigger_cli b/tests/regression/tools/trigger/test_remove_trigger_cli index 168227a4a..582cce7ef 100755 --- a/tests/regression/tools/trigger/test_remove_trigger_cli +++ b/tests/regression/tools/trigger/test_remove_trigger_cli @@ -34,12 +34,6 @@ tmp_expected_stdout=$(mktemp -t test_list_triggers_cli_expected_stdout.XXXXXX) uid=$(id --user) gid=$(id --group) -function add_trigger () -{ - "${FULL_LTTNG_BIN}" add-trigger "$@" - ok $? "add trigger \`$*\`: exit code is 0" -} - function list_triggers () { local test_name="$1" @@ -74,20 +68,22 @@ function remove_trigger () start_lttng_sessiond_notap # Add a few triggers -add_trigger --condition on-event -u -a --action notify -add_trigger --id ABC --condition on-event aaa -u --filter 'p == 2' --action notify +lttng_add_trigger_ok "ABC" --condition on-event aaa -u --filter 'p == 2' --action notify +lttng_add_trigger_ok "DEF" --condition on-event -u -a --action notify cat > "${tmp_expected_stdout}" <<- EOF - id: ABC user id: ${uid} condition: event rule hit rule: aaa (type: tracepoint, domain: ust, filter: p == 2) + tracer notifications discarded: 0 actions: notify -- id: T0 +- id: DEF user id: ${uid} condition: event rule hit rule: * (type: tracepoint, domain: ust) + tracer notifications discarded: 0 actions: notify EOF @@ -96,16 +92,17 @@ list_triggers "two triggers left" "${tmp_expected_stdout}" remove_trigger "ABC" cat > "${tmp_expected_stdout}" <<- EOF -- id: T0 +- id: DEF user id: ${uid} condition: event rule hit rule: * (type: tracepoint, domain: ust) + tracer notifications discarded: 0 actions: notify EOF list_triggers "one trigger left" "${tmp_expected_stdout}" -remove_trigger "T0" +remove_trigger "DEF" list_triggers "no triggers left" "/dev/null"