--- gdb-17.1.orig/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp
+++ gdb-17.1/gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp
@@ -182,6 +182,9 @@ gdb_test_multiple "hbreak *$main_lo" $te
     -re "No hardware breakpoint support.*$gdb_prompt $" {
 	pass "$test (no support)"
     }
+    -re "Cannot insert hardware breakpoint.*$gdb_prompt $" {
+	pass "$test (no support)"
+    }
     -re "$gdb_prompt $" {
 	pass "$test (support)"
 	set supports_hbreak 1
@@ -215,7 +218,7 @@ proc test_single_step { always_inserted

     set test "step in ro region"
     gdb_test_multiple "si" $test {
-	-re "Could not insert hardware breakpoints.*$gdb_prompt $" {
+	-re "(Could |Can)not insert hardware breakpoint.*$gdb_prompt $" {
 	    gdb_assert {!$hw_step && $auto_hw == "on" && !$supports_hbreak} \
 		"$test (cannot insert hw break)"
 	}
