FULL_LTTNG_BIN="${TESTDIR}/../src/bin/lttng/${LTTNG_BIN}"
-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_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)
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")
fi
-function list_triggers_matches_ok ()
-{
- local test_name="$1"
- local expected_stdout_file="$2"
-
- "${FULL_LTTNG_BIN}" list-triggers > "${tmp_stdout}" 2> "${tmp_stderr}"
- ok $? "${test_name}: exit code is 0"
-
- diff -u "${expected_stdout_file}" "${tmp_stdout}"
- ok $? "${test_name}: expected stdout"
-
- diff -u /dev/null "${tmp_stderr}"
- ok $? "${test_name}: expected stderr"
-}
-
test_top_level_options ()
{
diag "Listing top level options"
- name: T0
owner uid: ${uid}
condition: event rule matches
- rule: open (type: syscall:entry+exit)
+ rule: open (type: kernel:syscall:entry+exit)
actions:
notify
errors: none
- name: T1
owner uid: ${uid}
condition: event rule matches
- rule: open (type: syscall:entry)
+ rule: open (type: kernel:syscall:entry)
actions:
notify
errors: none
- name: T2
owner uid: ${uid}
condition: event rule matches
- rule: open (type: syscall:exit)
+ rule: open (type: kernel:syscall:exit)
actions:
notify
errors: none
- name: T3
owner uid: ${uid}
condition: event rule matches
- rule: open (type: syscall:entry+exit)
+ rule: open (type: kernel:syscall:entry+exit)
actions:
notify
errors: none
- name: T4
owner uid: ${uid}
condition: event rule matches
- rule: ptrace (type: syscall:entry+exit, filter: a > 2)
+ rule: ptrace (type: kernel:syscall:entry+exit, filter: a > 2)
actions:
notify
errors: none