CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../..
-NUM_TESTS=155
+NUM_TESTS=157
# test command issues at least open and close system calls
TESTCMD="cat /proc/cpuinfo > /dev/null"
# enable all syscalls
lttng_enable_kernel_syscall_ok $SESSION_NAME
- # disable open system call
- lttng_disable_kernel_syscall_ok $SESSION_NAME "open"
+ # try to disable open system call: fails because enabler semantic of
+ # "all syscalls" is not "the open" system call.
+ lttng_disable_kernel_syscall_fail $SESSION_NAME "open"
start_lttng_tracing
eval ${TESTCMD}
stop_lttng_tracing
- # ensure "open" syscall is not there.
- validate_trace_only_exp "-v -e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH
+ # ensure "open" syscall is there.
+ validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH
# ensure "close" syscall is there.
validate_trace_exp "-e syscall_entry_close: -e compat_syscall_entry_close:" $TRACE_PATH
# enable all syscalls
lttng_enable_kernel_syscall_ok $SESSION_NAME
- # disable open system call
- lttng_disable_kernel_syscall_ok $SESSION_NAME "open"
- lttng_disable_kernel_syscall_ok $SESSION_NAME "close"
+ # try to disable open and close system calls: fails because enabler
+ # semantic of "all syscalls" is not "the open" system call.
+ lttng_disable_kernel_syscall_fail $SESSION_NAME "open"
+ lttng_disable_kernel_syscall_fail $SESSION_NAME "close"
start_lttng_tracing
# generates open, close, execve (at least)
eval ${TESTCMD}
stop_lttng_tracing
- # ensure "open" and "close" syscalls are not there.
- validate_trace_only_exp "-v -e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open: -e syscall_entry_close: -e compat_syscall_entry_close: -e syscall_exit_close: -e compat_syscall_exit_close:" $TRACE_PATH
+ # ensure "open" syscall is there.
+ validate_trace_exp "-e syscall_entry_open: -e compat_syscall_entry_open: -e syscall_exit_open: -e compat_syscall_exit_open:" $TRACE_PATH
+
+ # ensure "close" syscall is there.
+ validate_trace_exp "-e syscall_entry_close: -e compat_syscall_entry_close:" $TRACE_PATH
+ validate_trace_exp "-e syscall_exit_close: -e compat_syscall_exit_close:" $TRACE_PATH
# ensure "execve" syscall is there.
validate_trace_exp "-e syscall_entry_execve: -e compat_syscall_entry_execve:" $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
# First disable will succeed
lttng_disable_kernel_syscall_ok $SESSION_NAME "open"
- # Second disable will fail
- lttng_disable_kernel_syscall_fail $SESSION_NAME "open"
+ # Second disable succeeds too, due to enabler semantic.
+ lttng_disable_kernel_syscall_ok $SESSION_NAME "open"
destroy_lttng_session $SESSION_NAME
lttng_enable_kernel_syscall_ok $SESSION_NAME
# First disable will succeed
lttng_disable_kernel_syscall_ok $SESSION_NAME
- # Second disable will fail
- lttng_disable_kernel_syscall_fail $SESSION_NAME
+ # Second disable succeeds too, due to enabler semantic.
+ lttng_disable_kernel_syscall_ok $SESSION_NAME
destroy_lttng_session $SESSION_NAME
create_lttng_session $SESSION_NAME $TRACE_PATH
- lttng_enable_kernel_syscall_fail $SESSION_NAME "thissyscallcannotexist"
+ # Enabling a syscall that does not exist succeeds, due to enabler
+ # semantic.
+ lttng_enable_kernel_syscall_ok $SESSION_NAME "thissyscallcannotexist"
destroy_lttng_session $SESSION_NAME
create_lttng_session $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_syscall_ok $SESSION_NAME
- # Enabling an event already enabled fails.
- lttng_enable_kernel_syscall_fail $SESSION_NAME "open"
+ # Enabling an event already enabled succeeds, due to enabler semantic.
+ lttng_enable_kernel_syscall_ok $SESSION_NAME "open"
destroy_lttng_session $SESSION_NAME
create_lttng_session $SESSION_NAME $TRACE_PATH
lttng_enable_kernel_channel_ok $SESSION_NAME $CHANNEL_NAME
- lttng_disable_kernel_syscall_fail $SESSION_NAME "-a" $CHANNEL_NAME
+ # sessiond semantic for "disable all" is to try to match all enalers
+ # it knowns about. Disable all succeeds if it finds no match.
+ lttng_disable_kernel_syscall_ok $SESSION_NAME "-a" $CHANNEL_NAME
destroy_lttng_session $SESSION_NAME