projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: error-query: uninitialized action_index value
[lttng-tools.git]
/
tests
/
regression
/
tools
/
trigger
/
test_remove_trigger_cli
diff --git
a/tests/regression/tools/trigger/test_remove_trigger_cli
b/tests/regression/tools/trigger/test_remove_trigger_cli
index 168227a4ab84d404205ca6414e336119380d787c..8d539d4b2670173a7df42a37df4b0e17000c6e62 100755
(executable)
--- 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)
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"
function list_triggers ()
{
local test_name="$1"
@@
-57,13
+51,13
@@
function list_triggers ()
function remove_trigger ()
{
function remove_trigger ()
{
- local
id
="$1"
- local test_name="remove trigger ${
id
}"
+ local
name
="$1"
+ local test_name="remove trigger ${
name
}"
- "${FULL_LTTNG_BIN}" remove-trigger "${
id
}" > "${tmp_stdout}" 2> "${tmp_stderr}"
+ "${FULL_LTTNG_BIN}" remove-trigger "${
name
}" > "${tmp_stdout}" 2> "${tmp_stderr}"
ok $? "${test_name}: exit code is 0"
ok $? "${test_name}: exit code is 0"
- diff -u <(echo "Removed trigger \`${
id
}\`.") "${tmp_stdout}"
+ diff -u <(echo "Removed trigger \`${
name
}\`.") "${tmp_stdout}"
ok $? "${test_name}: expected stdout"
diff -u /dev/null "${tmp_stderr}"
ok $? "${test_name}: expected stdout"
diff -u /dev/null "${tmp_stderr}"
@@
-74,38
+68,44
@@
function remove_trigger ()
start_lttng_sessiond_notap
# Add a few triggers
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 event-rule-matches --name=aaa --domain=user --filter 'p == 2'
--action notify
+
lttng_add_trigger_ok "DEF" --condition event-rule-matches --domain=user
--action notify
cat > "${tmp_expected_stdout}" <<- EOF
cat > "${tmp_expected_stdout}" <<- EOF
--
id
: ABC
-
user
id: ${uid}
+-
name
: ABC
+
owner u
id: ${uid}
condition: event rule hit
rule: aaa (type: tracepoint, domain: ust, filter: p == 2)
actions:
notify
condition: event rule hit
rule: aaa (type: tracepoint, domain: ust, filter: p == 2)
actions:
notify
-- id: T0
- user id: ${uid}
+ errors: none
+ errors: none
+- name: DEF
+ owner uid: ${uid}
condition: event rule hit
rule: * (type: tracepoint, domain: ust)
actions:
notify
condition: event rule hit
rule: * (type: tracepoint, domain: ust)
actions:
notify
+ errors: none
+ errors: none
EOF
list_triggers "two triggers left" "${tmp_expected_stdout}"
remove_trigger "ABC"
cat > "${tmp_expected_stdout}" <<- EOF
EOF
list_triggers "two triggers left" "${tmp_expected_stdout}"
remove_trigger "ABC"
cat > "${tmp_expected_stdout}" <<- EOF
--
id: T0
-
user
id: ${uid}
+-
name: DEF
+
owner u
id: ${uid}
condition: event rule hit
rule: * (type: tracepoint, domain: ust)
actions:
notify
condition: event rule hit
rule: * (type: tracepoint, domain: ust)
actions:
notify
+ errors: none
+ errors: none
EOF
list_triggers "one trigger left" "${tmp_expected_stdout}"
EOF
list_triggers "one trigger left" "${tmp_expected_stdout}"
-remove_trigger "
T0
"
+remove_trigger "
DEF
"
list_triggers "no triggers left" "/dev/null"
list_triggers "no triggers left" "/dev/null"
This page took
0.02522 seconds
and
4
git commands to generate.