.gitignore: ignore local vscode workspace settings file
[lttng-tools.git] / tests / regression / tools / trigger / test_add_trigger_cli
index 52bbe74029807e978bab09fcf65e9c9df6db497e..eeef3e250b86dc62c362da05fa4f7a9cd27232f5 100755 (executable)
@@ -34,12 +34,6 @@ tmp_stdout=$(mktemp -t test_parse_cli_trigger_stdout.XXXXXX)
 tmp_stderr=$(mktemp -t test_parse_cli_trigger_stderr.XXXXXX)
 uprobe_elf_binary="${TESTDIR}/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary"
 
-if [ "$(id -u)" == "0" ]; then
-       ist_root=1
-else
-       ist_root=0
-fi
-
 function test_success ()
 {
        local test_name="$1"
@@ -47,10 +41,8 @@ function test_success ()
        shift 2
 
        diag "${FULL_LTTNG_BIN} add-trigger $*"
-       set -x
        "${FULL_LTTNG_BIN}" add-trigger "$@" > "${tmp_stdout}" 2> "${tmp_stderr}"
        ok $? "${test_name}: exit code is 0"
-       set +x
 
        diff -u "${tmp_stdout}" <(echo "Added trigger \`$trigger_name\`.")
        ok $? "${test_name}: expected stdout"
@@ -225,7 +217,7 @@ test_success "--exclude-name two" "trigger5" \
        --condition event-rule-matches --type=user --name='jean-*' --exclude-name jean-chretien -x jean-charest \
        --action notify
 
-skip $ist_root "non-root user: skipping kprobe tests" 18 || {
+check_skip_kernel_test 18 "Skipping kprobe tests." || {
        i=0
 
        for type in kprobe kernel:kprobe; do
@@ -264,7 +256,7 @@ skip $ist_root "non-root user: skipping kprobe tests" 18 || {
        done
 }
 
-skip $ist_root "non-root user: skipping uprobe tests" 6 || {
+check_skip_kernel_test 6 "Skipping uprobe tests." || {
        test_success "--condition event-rule-matches uprobe" "uprobe-trigger-0" \
                --name="uprobe-trigger-0" \
                --condition event-rule-matches --type=kernel:uprobe --location=${uprobe_elf_binary}:test_function --event-name=ma-probe \
@@ -276,7 +268,7 @@ skip $ist_root "non-root user: skipping uprobe tests" 6 || {
                --action notify
 }
 
-skip $ist_root "non-root user: skipping syscall tests" 30 || {
+check_skip_kernel_test 30 "Skipping syscall tests." || {
        test_success "--condition event-rule-matches one syscall" "syscall-trigger-0" \
                --name="syscall-trigger-0" \
                --condition event-rule-matches --type=syscall --name=open \
@@ -506,7 +498,7 @@ test_failure "--condition event-rule-matches: --type=syscall:nope" \
        --name=open
 
 test_failure "--exclude-name with non-glob name" \
-       "Error: Event jean: Exclusions can only be used with a globbing pattern" \
+       "Error: Event name pattern must contain wildcard characters to use exclusions" \
        --condition event-rule-matches --type=user --name='jean' --exclude-name jean-chretien \
        --action notify
 
This page took 0.02459 seconds and 4 git commands to generate.