- --condition on-event foo -u bozo
-test_failure "--condition on-event: --all with --probe" \
- "Error: Can't use -a/--all with probe event rules." \
- --condition on-event --probe=do_sys_open --all
-test_failure "--condition on-event: missing tracepoint name with --probe" \
- "Error: Need to provide either a tracepoint name or -a/--all." \
- --condition on-event -k --probe do_sys_open
-
-test_failure "--condition on-event: missing tracepoint name with --userspace-probe" \
- "Error: Need to provide either a tracepoint name or -a/--all." \
- --condition on-event -k --userspace-probe=${uprobe_elf_binary}:test_function
-
-test_failure "--condition on-event: extra argument with --userspace-probe" \
- "Error: Unexpected argument 'world'" \
- --condition on-event -k --userspace-probe=${uprobe_elf_binary}:test_failure hello world
-
-test_failure "--condition on-event: missing tracepoint name with --syscall" \
- "Error: Need to provide either a tracepoint name or -a/--all." \
- --condition on-event -k --syscall
-
-test_failure "--condition on-event: extra argument with --syscall" \
+ --condition event-rule-matches --type=user bozo
+
+test_failure "--log-level unknown level" \
+ "Error: Failed to parse log level string \`FOO\`." \
+ --condition event-rule-matches --type=user --log-level=FOO
+
+for type in kprobe kernel:kprobe; do
+ test_failure "--condition event-rule-matches: --name with --type=$type" \
+ "Error: Can't use --name with kernel kprobe event rules." \
+ --condition event-rule-matches --type=$type --location=do_sys_open --name='hello'
+done
+
+test_failure "--condition event-rule-matches: --location with user tracepoint event rule" \
+ "Error: Can't use --location with user tracepoint event rules." \
+ --condition event-rule-matches --type=user --location='hello'
+
+test_failure "--condition event-rule-matches: --event-name with user tracepoint event rule" \
+ "Error: Can't use --event-name with user tracepoint event rules." \
+ --condition event-rule-matches --type=user --event-name='hello'
+
+test_failure "--condition event-rule-matches: extra argument with --type=kernel:uprobe" \
+ "Error: Unexpected argument 'hello'" \
+ --condition event-rule-matches --type=$type --location=${uprobe_elf_binary}:test_failure hello
+
+test_failure "--condition event-rule-matches: extra argument with --type=syscall" \