Fix some duplicate test names
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / permissions.exp
index 4a41f741157893e10d3e6e2f0305ae46b4371e9f..6cc6f70eb96af071b93baa18cadae659007b4009 100644 (file)
@@ -34,43 +34,48 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-gdb_test "show may-write-registers" \
-    "Permission to write into registers is on."
+with_test_prefix "observer mode off" {
 
-gdb_test "show may-write-memory" \
-    "Permission to write into target memory is on."
+    gdb_test "show may-write-registers" \
+       "Permission to write into registers is on."
 
-gdb_test "show may-insert-breakpoints" \
-    "Permission to insert breakpoints in the target is on."
+    gdb_test "show may-write-memory" \
+       "Permission to write into target memory is on."
 
-gdb_test "show may-insert-tracepoints" \
-    "Permission to insert tracepoints in the target is on."
+    gdb_test "show may-insert-breakpoints" \
+       "Permission to insert breakpoints in the target is on."
 
-gdb_test "show may-insert-fast-tracepoints" \
-    "Permission to insert fast tracepoints in the target is on."
+    gdb_test "show may-insert-tracepoints" \
+       "Permission to insert tracepoints in the target is on."
 
-gdb_test "show may-interrupt" \
-    "Permission to interrupt or signal the target is on."
+    gdb_test "show may-insert-fast-tracepoints" \
+       "Permission to insert fast tracepoints in the target is on."
+
+    gdb_test "show may-interrupt" \
+       "Permission to interrupt or signal the target is on."
+}
 
 gdb_test "set observer on" "Observer mode is now on." "enable observer mode"
 
-gdb_test "show may-write-memory" \
-    "Permission to write into target memory is off."
+with_test_prefix "observer mode on" {
+    gdb_test "show may-write-memory" \
+       "Permission to write into target memory is off."
 
-gdb_test "show may-write-registers" \
-    "Permission to write into registers is off."
+    gdb_test "show may-write-registers" \
+       "Permission to write into registers is off."
 
-gdb_test "show may-insert-breakpoints" \
-    "Permission to insert breakpoints in the target is off."
+    gdb_test "show may-insert-breakpoints" \
+       "Permission to insert breakpoints in the target is off."
 
-gdb_test "show may-insert-tracepoints" \
-    "Permission to insert tracepoints in the target is off."
+    gdb_test "show may-insert-tracepoints" \
+       "Permission to insert tracepoints in the target is off."
 
-gdb_test "show may-insert-fast-tracepoints" \
-    "Permission to insert fast tracepoints in the target is on."
+    gdb_test "show may-insert-fast-tracepoints" \
+       "Permission to insert fast tracepoints in the target is on."
 
-gdb_test "show may-interrupt" \
-    "Permission to interrupt or signal the target is off."
+    gdb_test "show may-interrupt" \
+       "Permission to interrupt or signal the target is off."
+}
 
 gdb_test "set observer off" "Observer mode is now off." "disable observer mode"
 
@@ -87,14 +92,14 @@ if ![runto_main] then {
 
 gdb_test "print x = 45" "$decimal = 45" "set a global"
 
-gdb_test "print x" "$decimal = 45"
+gdb_test "print x" "$decimal = 45" "validate setting a global"
 
 gdb_test "set may-write-memory off"
 
 gdb_test "print x = 92" "Writing to memory is not allowed.*" \
-    "try to set a global"
+    "set a global, 2nd time"
 
-gdb_test "print x" "$decimal = 45"
+gdb_test "print x" "$decimal = 45" "validate setting a global, 2nd time"
 
 # FIXME Add tests for other flags when a testsuite-able target becomes
 # available.
This page took 0.027594 seconds and 4 git commands to generate.