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