X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Ftrigger%2Ftest_add_trigger_cli;h=bbb34b51f5f4ade0583d35d66a91b23c04d62a5a;hb=46fd07accf36998fca3e43e54513755a98f68f48;hp=0b551d4d1719e0a45d18ae9a02616e6a033bd9a2;hpb=33e557114a2ba28e26e220a833e8a449c78b8b65;p=lttng-tools.git diff --git a/tests/regression/tools/trigger/test_add_trigger_cli b/tests/regression/tools/trigger/test_add_trigger_cli index 0b551d4d1..bbb34b51f 100755 --- a/tests/regression/tools/trigger/test_add_trigger_cli +++ b/tests/regression/tools/trigger/test_add_trigger_cli @@ -23,7 +23,7 @@ TESTDIR="$CURDIR/../../.." # shellcheck source=../../../utils/utils.sh source "$TESTDIR/utils/utils.sh" -plan_tests 285 +plan_tests 288 FULL_LTTNG_BIN="${TESTDIR}/../src/bin/lttng/${LTTNG_BIN}" @@ -178,19 +178,17 @@ skip $ist_root "non-root user: skipping kprobe tests" 18 || { done } -skip $ist_root "non-root user: skipping uprobe tests" 12 || { - for type in uprobe userspace-probe; do - test_success "--condition event-rule-matches uprobe" \ - --condition event-rule-matches --domain=kernel --type=$type --location=${uprobe_elf_binary}:test_function --event-name=ma-probe \ - --action notify +skip $ist_root "non-root user: skipping uprobe tests" 6 || { + test_success "--condition event-rule-matches uprobe" \ + --condition event-rule-matches --domain=kernel --type=kernel:uprobe --location=${uprobe_elf_binary}:test_function --event-name=ma-probe \ + --action notify - test_success "--condition event-rule-matches uprobe with elf prefix" \ - --condition event-rule-matches --domain=kernel --type=$type --location=elf:${uprobe_elf_binary}:test_function --event-name=ma-probe-2 \ - --action notify - done + test_success "--condition event-rule-matches uprobe with elf prefix" \ + --condition event-rule-matches --domain=kernel --type=kernel:uprobe --location=elf:${uprobe_elf_binary}:test_function --event-name=ma-probe-2 \ + --action notify } -skip $ist_root "non-root user: skipping syscall tests" 18 || { +skip $ist_root "non-root user: skipping syscall tests" 30 || { test_success "--condition event-rule-matches one syscall" \ --condition event-rule-matches --domain=kernel --type=syscall --name=open \ --action notify @@ -211,6 +209,22 @@ skip $ist_root "non-root user: skipping syscall tests" 18 || { test_success "--condition event-rule-matches one syscall:entry-exit" \ --condition event-rule-matches --domain=kernel --type=syscall:entry+exit --name=open \ --action notify + + # Same thing but with "kernel:syscall" type instead: + test_success "--condition event-rule-matches one syscall" \ + --condition event-rule-matches --domain=kernel --type=kernel:syscall --name=open \ + --action notify + + test_success "--condition event-rule-matches one kernel:syscall:entry" \ + --condition event-rule-matches --domain=kernel --type=kernel:syscall:entry --name=open \ + --action notify + test_success "--condition event-rule-matches one kernel:syscall:exit" \ + --condition event-rule-matches --domain=kernel --type=kernel:syscall:exit --name=open \ + --action notify + test_success "--condition event-rule-matches one kernel:syscall:entry-exit" \ + --condition event-rule-matches --domain=kernel --type=kernel:syscall:entry+exit --name=open \ + --action notify + } # `--action notify` successes @@ -364,11 +378,9 @@ test_failure "--condition event-rule-matches: --event-name with tracepoint event "Error: Can't use --event-name with tracepoint event rules." \ --condition event-rule-matches --domain=user --event-name='hello' -for type in uprobe userspace-probe; do - test_failure "--condition event-rule-matches: extra argument with --type=$type" \ - "Error: Unexpected argument 'hello'" \ - --condition event-rule-matches --domain=kernel --type=$type --location=${uprobe_elf_binary}:test_failure hello -done +test_failure "--condition event-rule-matches: extra argument with --type=kernel:uprobe" \ + "Error: Unexpected argument 'hello'" \ + --condition event-rule-matches --domain=kernel --type=$type --location=${uprobe_elf_binary}:test_failure hello test_failure "--condition event-rule-matches: extra argument with --type=syscall" \ "Error: Unexpected argument 'open'" \