tmp_stderr=$(mktemp -t test_parse_cli_trigger_stderr.XXXXXX)
uprobe_elf_binary="${TESTDIR}/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary"
-if [ "$(id -u)" == "0" ]; then
- ist_root=1
-else
- ist_root=0
-fi
-
function test_success ()
{
local test_name="$1"
--condition event-rule-matches --type=user --name='jean-*' --exclude-name jean-chretien -x jean-charest \
--action notify
-skip $ist_root "non-root user: skipping kprobe tests" 18 || {
+check_skip_kernel_test 18 "Skipping kprobe tests." || {
i=0
for type in kprobe kernel:kprobe; do
done
}
-skip $ist_root "non-root user: skipping uprobe tests" 6 || {
+check_skip_kernel_test 6 "Skipping uprobe tests." || {
test_success "--condition event-rule-matches uprobe" "uprobe-trigger-0" \
--name="uprobe-trigger-0" \
--condition event-rule-matches --type=kernel:uprobe --location=${uprobe_elf_binary}:test_function --event-name=ma-probe \
--action notify
}
-skip $ist_root "non-root user: skipping syscall tests" 30 || {
+check_skip_kernel_test 30 "Skipping syscall tests." || {
test_success "--condition event-rule-matches one syscall" "syscall-trigger-0" \
--name="syscall-trigger-0" \
--condition event-rule-matches --type=syscall --name=open \