gdb_test "set dprintf-style foobar" "Undefined item: \"foobar\"." \
"Set dprintf style to an unrecognized type"
+
+# Test that force-disabling the BreakpointCommands RSP feature works
+# as expected. dprintf relies on support for target-side breakpoint
+# commands --- use it as proxy.
+if [gdb_is_target_remote] {
+ gdb_test_no_output "set remote breakpoint-commands-packet off"
+ gdb_test "set dprintf-style agent" \
+ "warning: Target cannot run dprintf commands.*" \
+ "set dprintf-style agent, with feature disabled"
+}