X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Ftrigger%2Ftest_list_triggers_cli;h=b99288471d92b8ee5b446ea63143887ae2c61b75;hb=HEAD;hp=a040180138bac02f356bcdae687dc1b826250722;hpb=0bcd3a5c5e5fa409fb4fdf67d9b3f538945991ac;p=lttng-tools.git diff --git a/tests/regression/tools/trigger/test_list_triggers_cli b/tests/regression/tools/trigger/test_list_triggers_cli index a04018013..b99288471 100755 --- a/tests/regression/tools/trigger/test_list_triggers_cli +++ b/tests/regression/tools/trigger/test_list_triggers_cli @@ -27,31 +27,21 @@ NUM_TESTS=150 FULL_LTTNG_BIN="${TESTDIR}/../src/bin/lttng/${LTTNG_BIN}" -tmp_stdout=$(mktemp --tmpdir -t test_list_triggers_cli_stdout.XXXXXX) -tmp_stderr=$(mktemp --tmpdir -t test_list_triggers_cli_stderr.XXXXXX) -tmp_expected_stdout=$(mktemp --tmpdir -t test_list_triggers_cli_expected_stdout.XXXXXX) -tmp_expected_stdout_mi=$(mktemp --tmpdir -t test_list_triggers_cli_expected_stdout.mi.XXXXXX) +tmp_stdout=$(mktemp -t test_list_triggers_cli_stdout.XXXXXX) +tmp_stderr=$(mktemp -t test_list_triggers_cli_stderr.XXXXXX) +tmp_expected_stdout=$(mktemp -t test_list_triggers_cli_expected_stdout.XXXXXX) +tmp_expected_stdout_mi=$(mktemp -t test_list_triggers_cli_expected_stdout.mi.XXXXXX) uprobe_elf_binary=$(realpath "${TESTDIR}/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary") uprobe_sdt_binary=$(realpath "${TESTDIR}/utils/testapp/userspace-probe-sdt-binary/.libs/userspace-probe-sdt-binary") register_some_triggers_bin=$(realpath "${CURDIR}/utils/register-some-triggers") uid=$(id --user) -gid=$(id --group) -if [ "$uid" == "0" ]; then - ist_root=1 - ls "$uprobe_sdt_binary" >/dev/null 2>&1 - if test $? == 0; then - hast_sdt_binary=1 - else - hast_sdt_binary=0 - fi -else - ist_root=0 - hast_sdt_binary=0 +sdt_binary_present=0 +if [ -f "$uprobe_sdt_binary" ]; then + sdt_binary_present=1 fi - test_top_level_options () { diag "Listing top level options" @@ -799,8 +789,8 @@ test_event_rule_matches_probe () diag "Listing event-rule-matches kernel probe" - channel_enable_addr=$(grep 'lttng_channel_enable' /proc/kallsyms | cut -f 1 -d ' ') - channel_disable_addr=$(grep 'lttng_channel_disable' /proc/kallsyms | cut -f 1 -d ' ') + channel_enable_addr=$(grep '\' /proc/kallsyms | cut -f 1 -d ' ') + channel_disable_addr=$(grep '\' /proc/kallsyms | cut -f 1 -d ' ') # We need to find a valid offset. base_symbol="" @@ -1606,7 +1596,7 @@ test_buffer_usage_conditions () condition: buffer usage high session name: the-session-name channel name: the-channel-name - domain: ust + domain: user space threshold (bytes): 1234 errors: none actions: @@ -1618,7 +1608,7 @@ test_buffer_usage_conditions () condition: buffer usage high session name: the-session-name channel name: the-channel-name - domain: ust + domain: user space threshold (ratio): 0.25 errors: none actions: @@ -1630,7 +1620,7 @@ test_buffer_usage_conditions () condition: buffer usage low session name: the-session-name channel name: the-channel-name - domain: ust + domain: user space threshold (bytes): 2345 errors: none actions: @@ -1642,7 +1632,7 @@ test_buffer_usage_conditions () condition: buffer usage low session name: the-session-name channel name: the-channel-name - domain: ust + domain: user space threshold (ratio): 0.40 errors: none actions: @@ -2695,10 +2685,12 @@ start_lttng_sessiond_notap test_top_level_options test_event_rule_matches_tracepoint -skip $ist_root "non-root user: skipping kprobe tests" 13 || test_event_rule_matches_probe -skip $ist_root "non-root user: skipping uprobe tests" 9 || test_event_rule_matches_userspace_probe_elf -skip $(($ist_root && $hast_sdt_binary)) "skipping userspace probe SDT tests" 9 || test_event_rule_matches_userspace_probe_sdt -skip $ist_root "non-root user: skipping syscall tests" 17 || test_event_rule_matches_syscall +check_skip_kernel_test 48 "Skipping kprobe, uprobe, SDT and syscall tests." || { + test_event_rule_matches_probe + test_event_rule_matches_userspace_probe_elf + skip $sdt_binary_present "No SDT binary. Skipping userspace probe SDT tests" 9 || test_event_rule_matches_userspace_probe_sdt + test_event_rule_matches_syscall +} test_session_consumed_size_condition test_buffer_usage_conditions test_session_rotation_conditions