# shellcheck source=../../../utils/utils.sh
source "$TESTDIR/utils/utils.sh"
-NUM_TESTS=100
+NUM_TESTS=106
FULL_LTTNG_BIN="${TESTDIR}/../src/bin/lttng/${LTTNG_BIN}"
diag "Listing on-event syscall"
lttng_add_trigger_ok "T0" --condition event-rule-matches --domain=kernel --type=syscall --name=open --action notify
- lttng_add_trigger_ok "T1" --condition event-rule-matches --domain=kernel --type=syscall --name=ptrace --filter 'a > 2' --action notify
+ lttng_add_trigger_ok "T1" --condition event-rule-matches --domain=kernel --type=syscall:entry --name=open --action notify
+ lttng_add_trigger_ok "T2" --condition event-rule-matches --domain=kernel --type=syscall:exit --name=open --action notify
+ lttng_add_trigger_ok "T3" --condition event-rule-matches --domain=kernel --type=syscall:entry+exit --name=open --action notify
+ lttng_add_trigger_ok "T4" --condition event-rule-matches --domain=kernel --type=syscall --name=ptrace --filter 'a > 2' --action notify
cat > "${tmp_expected_stdout}" <<- EOF
- name: T0
owner uid: ${uid}
condition: event rule hit
- rule: open (type: syscall)
+ rule: open (type: syscall:entry+exit)
actions:
notify
errors: none
- name: T1
owner uid: ${uid}
condition: event rule hit
- rule: ptrace (type: syscall, filter: a > 2)
+ rule: open (type: syscall:entry)
+ actions:
+ notify
+ errors: none
+ errors: none
+ - name: T2
+ owner uid: ${uid}
+ condition: event rule hit
+ rule: open (type: syscall:exit)
+ actions:
+ notify
+ errors: none
+ errors: none
+ - name: T3
+ owner uid: ${uid}
+ condition: event rule hit
+ rule: open (type: syscall:entry+exit)
+ actions:
+ notify
+ errors: none
+ errors: none
+ - name: T4
+ owner uid: ${uid}
+ condition: event rule hit
+ rule: ptrace (type: syscall:entry+exit, filter: a > 2)
actions:
notify
errors: none
lttng_remove_trigger_ok "T0"
lttng_remove_trigger_ok "T1"
+ lttng_remove_trigger_ok "T2"
+ lttng_remove_trigger_ok "T3"
+ lttng_remove_trigger_ok "T4"
}
test_session_consumed_size_condition ()
skip $ist_root "non-root user: skipping kprobe tests" 9 || test_on_event_probe
skip $ist_root "non-root user: skipping uprobe tests" 5 || test_on_event_userspace_probe_elf
skip $(($ist_root && $hast_sdt_binary)) "skipping userspace probe SDT tests" 5 || test_on_event_userspace_probe_sdt
-skip $ist_root "non-root user: skipping syscall tests" 7 || test_on_event_syscall
+skip $ist_root "non-root user: skipping syscall tests" 13 || test_on_event_syscall
test_session_consumed_size_condition
test_buffer_usage_conditions
test_session_rotation_conditions