[v2,72/79] Rename to allow_python_tests

Message ID 20230112030052.3306113-73-tom@tromey.com
State Committed
Headers
Series Rewrite "require" test procedure and use it more often |

Commit Message

Tom Tromey Jan. 12, 2023, 3 a.m. UTC
  This changes skip_python_tests to invert the sense, and renames it to
allow_python_tests.
---
 gdb/testsuite/gdb.ada/array_of_variant.exp                  | 2 +-
 gdb/testsuite/gdb.ada/pp-rec-component.exp                  | 2 +-
 gdb/testsuite/gdb.ada/py_range.exp                          | 2 +-
 gdb/testsuite/gdb.ada/py_taft.exp                           | 2 +-
 gdb/testsuite/gdb.ada/variant.exp                           | 2 +-
 gdb/testsuite/gdb.arch/i386-mpx.exp                         | 2 +-
 gdb/testsuite/gdb.base/default.exp                          | 2 +-
 gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp        | 2 +-
 gdb/testsuite/gdb.base/jit-reader.exp                       | 4 ++--
 gdb/testsuite/gdb.base/non-lazy-array-index.exp             | 2 +-
 gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp    | 2 +-
 gdb/testsuite/gdb.base/style.exp                            | 2 +-
 gdb/testsuite/gdb.dwarf2/symtab-producer.exp                | 2 +-
 gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp            | 6 +++---
 gdb/testsuite/gdb.gdb/python-helper.exp                     | 2 +-
 gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp     | 4 ++--
 gdb/testsuite/gdb.multi/tids.exp                            | 2 +-
 gdb/testsuite/gdb.python/compare-enum-type.exp              | 2 +-
 gdb/testsuite/gdb.python/flexible-array-member.exp          | 2 +-
 gdb/testsuite/gdb.python/lib-types.exp                      | 2 +-
 gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp      | 2 +-
 gdb/testsuite/gdb.python/py-arch-reg-groups.exp             | 2 +-
 gdb/testsuite/gdb.python/py-arch-reg-names.exp              | 2 +-
 gdb/testsuite/gdb.python/py-arch.exp                        | 2 +-
 gdb/testsuite/gdb.python/py-as-string.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-auto-load-chaining.exp          | 2 +-
 .../py-autoloaded-pretty-printers-in-newobjfile-event.exp   | 2 +-
 gdb/testsuite/gdb.python/py-bad-printers.exp                | 2 +-
 gdb/testsuite/gdb.python/py-block.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-bp-locations.exp                | 2 +-
 gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp      | 2 +-
 gdb/testsuite/gdb.python/py-breakpoint.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-caller-is.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-charset.exp                     | 2 +-
 gdb/testsuite/gdb.python/py-cmd.exp                         | 2 +-
 gdb/testsuite/gdb.python/py-completion.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-connection-removed.exp          | 2 +-
 gdb/testsuite/gdb.python/py-connection.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-disasm.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-doc-reformat.exp                | 2 +-
 gdb/testsuite/gdb.python/py-error.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-event-load.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-events.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-evsignal.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-evthreads.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-explore-cc.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-explore.exp                     | 2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp  | 2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint.exp           | 2 +-
 gdb/testsuite/gdb.python/py-finish-breakpoint2.exp          | 2 +-
 gdb/testsuite/gdb.python/py-format-address.exp              | 2 +-
 gdb/testsuite/gdb.python/py-format-string.exp               | 2 +-
 gdb/testsuite/gdb.python/py-frame-args.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-frame-inline.exp                | 2 +-
 gdb/testsuite/gdb.python/py-frame.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-framefilter-addr.exp            | 2 +-
 gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp      | 2 +-
 gdb/testsuite/gdb.python/py-framefilter.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-function.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-inferior-leak.exp               | 2 +-
 gdb/testsuite/gdb.python/py-inferior.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-infthread.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-label-symbol-value.exp          | 2 +-
 gdb/testsuite/gdb.python/py-lazy-string.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-linetable.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-lookup-type.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-mi-events.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-mi-objfile.exp                  | 2 +-
 gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp | 2 +-
 gdb/testsuite/gdb.python/py-nested-maps.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-objfile-script.exp              | 2 +-
 gdb/testsuite/gdb.python/py-objfile.exp                     | 2 +-
 gdb/testsuite/gdb.python/py-parameter.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-pending-frame-level.exp         | 2 +-
 gdb/testsuite/gdb.python/py-pp-integral.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-pp-maint.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-pp-re-notag.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-pp-registration.exp             | 2 +-
 gdb/testsuite/gdb.python/py-prettyprint.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-progspace.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-prompt.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-rbreak.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-record-btrace-threads.exp       | 2 +-
 gdb/testsuite/gdb.python/py-record-btrace.exp               | 2 +-
 gdb/testsuite/gdb.python/py-record-full.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-recurse-unwind.exp              | 2 +-
 gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp         | 2 +-
 gdb/testsuite/gdb.python/py-section-script.exp              | 2 +-
 gdb/testsuite/gdb.python/py-send-packet.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-shared.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-source-styling.exp              | 2 +-
 gdb/testsuite/gdb.python/py-startup-opt.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-strfns.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-symbol.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-symtab.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-sync-interp.exp                 | 2 +-
 gdb/testsuite/gdb.python/py-template.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-thrhandle.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-type.exp                        | 2 +-
 gdb/testsuite/gdb.python/py-typeprint.exp                   | 2 +-
 gdb/testsuite/gdb.python/py-unwind-inline.exp               | 2 +-
 gdb/testsuite/gdb.python/py-unwind-maint.exp                | 2 +-
 gdb/testsuite/gdb.python/py-unwind-user-regs.exp            | 2 +-
 gdb/testsuite/gdb.python/py-unwind.exp                      | 2 +-
 gdb/testsuite/gdb.python/py-value-cc.exp                    | 2 +-
 gdb/testsuite/gdb.python/py-value.exp                       | 2 +-
 gdb/testsuite/gdb.python/py-xmethods.exp                    | 2 +-
 gdb/testsuite/gdb.python/tui-window-disabled.exp            | 2 +-
 gdb/testsuite/gdb.python/tui-window-names.exp               | 2 +-
 gdb/testsuite/gdb.python/tui-window.exp                     | 2 +-
 gdb/testsuite/gdb.rust/pp.exp                               | 2 +-
 gdb/testsuite/gdb.rust/simple.exp                           | 2 +-
 gdb/testsuite/gdb.server/server-kill-python.exp             | 2 +-
 gdb/testsuite/gdb.server/server-pipe.exp                    | 2 +-
 gdb/testsuite/gdb.threads/tls.exp                           | 2 +-
 gdb/testsuite/lib/gdb.exp                                   | 6 +++---
 116 files changed, 122 insertions(+), 122 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.ada/array_of_variant.exp b/gdb/testsuite/gdb.ada/array_of_variant.exp
index 6110ec69b66..532fb1c1e29 100644
--- a/gdb/testsuite/gdb.ada/array_of_variant.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variant.exp
@@ -78,7 +78,7 @@  foreach_with_prefix scenario {all minimal} {
 	"print second array slice"
 
     # This is only supported for the DWARF encoding.
-    if {$scenario == "minimal" && ![skip_python_tests]} {
+    if {$scenario == "minimal" && [allow_python_tests]} {
 	gdb_test_no_output \
 	    "python o = gdb.parse_and_eval('objects')" \
 	    "fetch value for python"
diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index c77ee59bf37..2678195d38e 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -15,7 +15,7 @@ 
 
 load_lib "ada.exp"
 
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index 83474b459c9..2972db21827 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -16,7 +16,7 @@ 
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
 
 standard_ada_testfile foo
 
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index 97c33e47da3..0ce9df72005 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -16,7 +16,7 @@ 
 load_lib "ada.exp"
 load_lib gdb-python.exp
 
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
 
 standard_ada_testfile main
 
diff --git a/gdb/testsuite/gdb.ada/variant.exp b/gdb/testsuite/gdb.ada/variant.exp
index 414aed6f0d7..620761c40ed 100644
--- a/gdb/testsuite/gdb.ada/variant.exp
+++ b/gdb/testsuite/gdb.ada/variant.exp
@@ -48,7 +48,7 @@  foreach_with_prefix scenario {none all minimal} {
 	" = \\(one => 3, two => 7, str => \"zzz\", onevalue => 33, str2 => \"qqqqqqq\", twovalue => 88\\)"
 
     # This is only supported for the DWARF encoding.
-    if {$scenario == "minimal" && ![skip_python_tests]} {
+    if {$scenario == "minimal" && [allow_python_tests]} {
 	gdb_test_no_output \
 	    "python t = gdb.lookup_type('nested_and_variable')" \
 	    "fetch type for python"
diff --git a/gdb/testsuite/gdb.arch/i386-mpx.exp b/gdb/testsuite/gdb.arch/i386-mpx.exp
index d211f7be38a..96cd8fe9092 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx.exp
@@ -130,7 +130,7 @@  gdb_test "print \$bndstatus.status.error" "= 2" "bndstatus error is 2\
 after a failure on allocating an entry"
 
 # Going to test the python extension for lenght.
-if { [skip_python_tests] } { continue }
+if { ![allow_python_tests] } { continue }
 # Verify if size is right
 set test_string ".*\\\: size 0x11.*"
 gdb_test "print /x \$bnd0 = {0x10, 0x20}" "$test_string" "verify size for bnd0"
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 75788562704..4b1a3345f55 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -611,7 +611,7 @@  set show_conv_list \
 	{$_shell_exitsignal = void} \
 	{$_shell_exitcode = 0} \
     }
-if ![skip_python_tests] {
+if [allow_python_tests] {
     append show_conv_list \
 	{
 	    {$_memeq = <internal function _memeq>} \
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index 88e95d13ae2..a215dde0ece 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -51,7 +51,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return -1
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index 1ff3f2a0c21..8023ef66e78 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -219,7 +219,7 @@  proc jit_reader_test {} {
 		    "cannot assign to register"
 	    }
 
-	    if { ![skip_python_tests] } {
+	    if { [allow_python_tests] } {
 		gdb_test "python print(gdb.objfiles())" \
 		    "$any<gdb.Objfile filename=<< JIT compiled code at $hex >>>$any" \
 		    "python gdb.Objfile.__repr__ ()"
@@ -263,7 +263,7 @@  proc jit_reader_test {} {
 		]
     }
 
-    if {![skip_python_tests]} {
+    if {[allow_python_tests]} {
 	gdb_test "python print(any(\[not x.is_file for x in gdb.objfiles()\]))" \
 	    "True" \
 	    "at least one non-file objfile"
diff --git a/gdb/testsuite/gdb.base/non-lazy-array-index.exp b/gdb/testsuite/gdb.base/non-lazy-array-index.exp
index 75c22526c2b..f88cf6f5c7a 100644
--- a/gdb/testsuite/gdb.base/non-lazy-array-index.exp
+++ b/gdb/testsuite/gdb.base/non-lazy-array-index.exp
@@ -80,7 +80,7 @@  gdb_test_multiple "p \$.array\[1\]" "" {
 
 gdb_test "set debug target 0" ".*"
 
-if { ! [skip_python_tests] } {
+if { [allow_python_tests] } {
     gdb_test_no_output "python val = gdb.parse_and_eval('global_foo')"
     gdb_test "python print('val = %s' % val)" "val = \\{f = 1, array = \\{1, 2, 3, 4, 5\\}\\}"
     gdb_test "python print('val.is_lazy = %s' % val.is_lazy)" "val\\.is_lazy = False"
diff --git a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
index f5c55f58425..fe906cefb14 100644
--- a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
+++ b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
@@ -36,7 +36,7 @@ 
 
 standard_testfile .c
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 033c1faf6e3..0a7228c6890 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -471,7 +471,7 @@  proc test_startup_version_string { } {
 # expected or not, this styling requires Python support in GDB, and
 # the Python pygments module to be available.
 clean_restart ${binfile}
-if {![skip_python_tests] && [gdb_py_module_available "pygments"]} {
+if {[allow_python_tests] && [gdb_py_module_available "pygments"]} {
     set python_disassembly_styling true
 } else {
     set python_disassembly_styling false
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index 545d76f1246..02826ed4855 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -17,7 +17,7 @@  load_lib dwarf.exp
 load_lib gdb-python.exp
 
 # This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support !skip_python_tests
+require dwarf2_support allow_python_tests
 
 standard_testfile main.c -dw.S
 
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index 8e5a1ab0111..f5dfc9c0793 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -72,8 +72,8 @@  gdb_test "break func" "Breakpoint .*" \
     "set breakpoint in func"
 gdb_continue_to_breakpoint "continue to func"
 
-set skip_python [skip_python_tests]
-if {!$skip_python} {
+set allow_python [allow_python_tests]
+if {$allow_python} {
     gdb_test "python finishbp = gdb.FinishBreakpoint()" \
 	"Temporary breakpoint.*" "set FinishBreakpoint"
 }
@@ -82,7 +82,7 @@  gdb_test "finish" [multi_line \
 		       "Run till exit from #0  $hex in func \\\(\\\)" \
 		       ".*$hex in main \\\(\\\)"]
 
-if {!$skip_python} {
+if {$allow_python} {
     gdb_test "python print (finishbp.return_value)" "None" \
 	"check that return_value is None"
 }
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
index 3c0e2e57304..c147c6bcbb0 100644
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
@@ -24,7 +24,7 @@  if [target_info exists gdb,noinferiorio] {
     return
 }
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp
index e5d62cd31e2..487d2095aca 100644
--- a/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp
+++ b/gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp
@@ -23,8 +23,8 @@  if {![multi_target_prepare]} {
     return
 }
 
-# Cache the result of calling skip_python_tests into a local variable.
-set run_python_tests [expr ! [skip_python_tests]]
+# Cache the result of calling allow_python_tests into a local variable.
+set run_python_tests [allow_python_tests]
 
 # Test "info inferiors" and "info connections".  MULTI_PROCESS
 # indicates whether the multi-process feature of remote targets is
diff --git a/gdb/testsuite/gdb.multi/tids.exp b/gdb/testsuite/gdb.multi/tids.exp
index ff48d422c9b..18fc4970fe7 100644
--- a/gdb/testsuite/gdb.multi/tids.exp
+++ b/gdb/testsuite/gdb.multi/tids.exp
@@ -415,7 +415,7 @@  with_test_prefix "two inferiors" {
 	"No threads match '3.1'\."
 }
 
-if { ![skip_python_tests] } {
+if { [allow_python_tests] } {
     with_test_prefix "python" {
 	# Check that InferiorThread.num and InferiorThread.global_num
 	# return the expected numbers.
diff --git a/gdb/testsuite/gdb.python/compare-enum-type.exp b/gdb/testsuite/gdb.python/compare-enum-type.exp
index 0cc6bd93daa..8a899e78f1f 100644
--- a/gdb/testsuite/gdb.python/compare-enum-type.exp
+++ b/gdb/testsuite/gdb.python/compare-enum-type.exp
@@ -17,7 +17,7 @@ 
 
 standard_testfile -a.c -b.c
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
 	  [list $srcfile $srcfile2]] } {
diff --git a/gdb/testsuite/gdb.python/flexible-array-member.exp b/gdb/testsuite/gdb.python/flexible-array-member.exp
index 23f1da067a5..7849c137c36 100644
--- a/gdb/testsuite/gdb.python/flexible-array-member.exp
+++ b/gdb/testsuite/gdb.python/flexible-array-member.exp
@@ -17,7 +17,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" \
 	${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index 92359c941a6..21ed23f0909 100644
--- a/gdb/testsuite/gdb.python/lib-types.exp
+++ b/gdb/testsuite/gdb.python/lib-types.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
index 64414a3c23b..7ab2b1facf7 100644
--- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
+++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
@@ -19,7 +19,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
index 5a0077d020d..2ba7c9c0752 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
@@ -16,7 +16,7 @@ 
 # Check the gdb.Architecture.register_groups functionality.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile py-arch.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-names.exp b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
index 73e41401f51..ff7a124d615 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-names.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
@@ -16,7 +16,7 @@ 
 # Check the gdb.Architecture.registers functionality.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile py-arch.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp
index 449613bc0fb..4f4b4aa766f 100644
--- a/gdb/testsuite/gdb.python/py-arch.exp
+++ b/gdb/testsuite/gdb.python/py-arch.exp
@@ -13,7 +13,7 @@ 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-as-string.exp b/gdb/testsuite/gdb.python/py-as-string.exp
index 8bf248a59ad..9c0503e90e5 100644
--- a/gdb/testsuite/gdb.python/py-as-string.exp
+++ b/gdb/testsuite/gdb.python/py-as-string.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
index aac6eb305b9..dbe9a6775d7 100644
--- a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
+++ b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
@@ -19,7 +19,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .c -f1.c -f2.c
 
diff --git a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
index a67ae48b316..2217e2e6527 100644
--- a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
+++ b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
@@ -19,7 +19,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile -main.cc
 
diff --git a/gdb/testsuite/gdb.python/py-bad-printers.exp b/gdb/testsuite/gdb.python/py-bad-printers.exp
index 26e6a97916c..7f53278f0fe 100644
--- a/gdb/testsuite/gdb.python/py-bad-printers.exp
+++ b/gdb/testsuite/gdb.python/py-bad-printers.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp
index 90c3b4d0fb0..3bdf97294ae 100644
--- a/gdb/testsuite/gdb.python/py-block.exp
+++ b/gdb/testsuite/gdb.python/py-block.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-bp-locations.exp b/gdb/testsuite/gdb.python/py-bp-locations.exp
index 55aca67eb9d..f8649f6c105 100644
--- a/gdb/testsuite/gdb.python/py-bp-locations.exp
+++ b/gdb/testsuite/gdb.python/py-bp-locations.exp
@@ -15,7 +15,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
index 6c1a262ad47..a3b0c3f96aa 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index a3a8512c4d9..bee2ceaf032 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -26,7 +26,7 @@  set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-caller-is.exp b/gdb/testsuite/gdb.python/py-caller-is.exp
index 66e0ce516e4..8acf8ffc38f 100644
--- a/gdb/testsuite/gdb.python/py-caller-is.exp
+++ b/gdb/testsuite/gdb.python/py-caller-is.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-charset.exp b/gdb/testsuite/gdb.python/py-charset.exp
index 9e831954cdd..bc61f742f5f 100644
--- a/gdb/testsuite/gdb.python/py-charset.exp
+++ b/gdb/testsuite/gdb.python/py-charset.exp
@@ -15,7 +15,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 gdb_exit
 gdb_start
diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
index 0eb785f6d4d..016ea445f10 100644
--- a/gdb/testsuite/gdb.python/py-cmd.exp
+++ b/gdb/testsuite/gdb.python/py-cmd.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-completion.exp b/gdb/testsuite/gdb.python/py-completion.exp
index bf1abf32ee2..b3acebf66a1 100644
--- a/gdb/testsuite/gdb.python/py-completion.exp
+++ b/gdb/testsuite/gdb.python/py-completion.exp
@@ -17,7 +17,7 @@  set testfile "py-completion"
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 set discard 0
diff --git a/gdb/testsuite/gdb.python/py-connection-removed.exp b/gdb/testsuite/gdb.python/py-connection-removed.exp
index efbcf46516f..afae0a7436d 100644
--- a/gdb/testsuite/gdb.python/py-connection-removed.exp
+++ b/gdb/testsuite/gdb.python/py-connection-removed.exp
@@ -25,7 +25,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-connection.c
 
diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp
index 78710fd27de..b1a8d692b91 100644
--- a/gdb/testsuite/gdb.python/py-connection.exp
+++ b/gdb/testsuite/gdb.python/py-connection.exp
@@ -20,7 +20,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-disasm.exp b/gdb/testsuite/gdb.python/py-disasm.exp
index 57f8fdfce41..38a2b766320 100644
--- a/gdb/testsuite/gdb.python/py-disasm.exp
+++ b/gdb/testsuite/gdb.python/py-disasm.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-doc-reformat.exp b/gdb/testsuite/gdb.python/py-doc-reformat.exp
index 3829873c4cc..63079e7eafa 100644
--- a/gdb/testsuite/gdb.python/py-doc-reformat.exp
+++ b/gdb/testsuite/gdb.python/py-doc-reformat.exp
@@ -19,7 +19,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 clean_restart
 
diff --git a/gdb/testsuite/gdb.python/py-error.exp b/gdb/testsuite/gdb.python/py-error.exp
index 0a8fd190c18..230c827a139 100644
--- a/gdb/testsuite/gdb.python/py-error.exp
+++ b/gdb/testsuite/gdb.python/py-error.exp
@@ -20,7 +20,7 @@  set testfile "py-error"
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Start with a fresh gdb.
 gdb_exit
diff --git a/gdb/testsuite/gdb.python/py-event-load.exp b/gdb/testsuite/gdb.python/py-event-load.exp
index f3631251148..7dc47f1538a 100644
--- a/gdb/testsuite/gdb.python/py-event-load.exp
+++ b/gdb/testsuite/gdb.python/py-event-load.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
 
 if {[get_compiler_info]} {
     warning "Could not get compiler info"
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index ea1a6f502ff..064a779c50b 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -13,7 +13,7 @@ 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require !use_gdb_stub !skip_python_tests
+require !use_gdb_stub allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-evsignal.exp b/gdb/testsuite/gdb.python/py-evsignal.exp
index 2f0e791884e..5eab7b29aeb 100644
--- a/gdb/testsuite/gdb.python/py-evsignal.exp
+++ b/gdb/testsuite/gdb.python/py-evsignal.exp
@@ -22,7 +22,7 @@  if {[target_info gdb_protocol] == "remote"
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-evthreads.c
 
diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp
index e993c6fe9b2..fcb069ea5af 100644
--- a/gdb/testsuite/gdb.python/py-evthreads.exp
+++ b/gdb/testsuite/gdb.python/py-evthreads.exp
@@ -13,7 +13,7 @@ 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require support_displaced_stepping !skip_python_tests
+require support_displaced_stepping allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index a467e84a482..04aa06c7019 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -16,7 +16,7 @@ 
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile py-explore.cc
 
diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp
index dd36740bac5..0536532511f 100644
--- a/gdb/testsuite/gdb.python/py-explore.exp
+++ b/gdb/testsuite/gdb.python/py-explore.exp
@@ -15,7 +15,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
index d414268b1cb..202173d2778 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
@@ -17,7 +17,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index d37508c7d5c..9e5a0a6f754 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -16,7 +16,7 @@ 
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
index 300020553a1..66587b8b9a0 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-format-address.exp b/gdb/testsuite/gdb.python/py-format-address.exp
index d9fed3f6ef2..48de1c82d5d 100644
--- a/gdb/testsuite/gdb.python/py-format-address.exp
+++ b/gdb/testsuite/gdb.python/py-format-address.exp
@@ -14,7 +14,7 @@ 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile
 
 foreach func_name { foo bar } {
diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index 30a57b2254f..122130d4016 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
index 091e26dd5b1..5c099e01264 100644
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -15,7 +15,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp
index 719ec18aa37..5fb336193dd 100644
--- a/gdb/testsuite/gdb.python/py-frame-inline.exp
+++ b/gdb/testsuite/gdb.python/py-frame-inline.exp
@@ -15,7 +15,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index f17e2f9844a..5aebb6beb5f 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.exp b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
index 5dad3bd0f2d..3bb759b97bf 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-addr.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
@@ -19,7 +19,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
index 86a830d5eef..d2c29afa81d 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
@@ -15,7 +15,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile amd64-py-framefilter-invalidarg.S
 
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index 81101c11809..6897518a20e 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp
index 7c48f7a0bd8..25b83a797aa 100644
--- a/gdb/testsuite/gdb.python/py-function.exp
+++ b/gdb/testsuite/gdb.python/py-function.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Start with a fresh gdb.
 
diff --git a/gdb/testsuite/gdb.python/py-inferior-leak.exp b/gdb/testsuite/gdb.python/py-inferior-leak.exp
index 4e2fa641545..b0456de360f 100644
--- a/gdb/testsuite/gdb.python/py-inferior-leak.exp
+++ b/gdb/testsuite/gdb.python/py-inferior-leak.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp
index 0286d82394c..424050a6166 100644
--- a/gdb/testsuite/gdb.python/py-inferior.exp
+++ b/gdb/testsuite/gdb.python/py-inferior.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp
index 47c6b19dbfc..0b10ce9ff77 100644
--- a/gdb/testsuite/gdb.python/py-infthread.exp
+++ b/gdb/testsuite/gdb.python/py-infthread.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-label-symbol-value.exp b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
index f3e91b74a46..b781eece304 100644
--- a/gdb/testsuite/gdb.python/py-label-symbol-value.exp
+++ b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
@@ -17,7 +17,7 @@ 
 # symbol (i.e. a symbol for a goto label).
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
diff --git a/gdb/testsuite/gdb.python/py-lazy-string.exp b/gdb/testsuite/gdb.python/py-lazy-string.exp
index 9f3bad5c660..522530cb128 100644
--- a/gdb/testsuite/gdb.python/py-lazy-string.exp
+++ b/gdb/testsuite/gdb.python/py-lazy-string.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp
index ff438216cf3..d19516df9a8 100644
--- a/gdb/testsuite/gdb.python/py-linetable.exp
+++ b/gdb/testsuite/gdb.python/py-linetable.exp
@@ -14,7 +14,7 @@ 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 set opts {}
 standard_testfile .S
 
diff --git a/gdb/testsuite/gdb.python/py-lookup-type.exp b/gdb/testsuite/gdb.python/py-lookup-type.exp
index 7527c13a925..c914ea1068b 100644
--- a/gdb/testsuite/gdb.python/py-lookup-type.exp
+++ b/gdb/testsuite/gdb.python/py-lookup-type.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Note that the purpose of this testcase is to test the behavior
 # of gdb.lookup_type searching for the primitive types internally
diff --git a/gdb/testsuite/gdb.python/py-mi-events.exp b/gdb/testsuite/gdb.python/py-mi-events.exp
index 4ed3405730a..cc417d48bfe 100644
--- a/gdb/testsuite/gdb.python/py-mi-events.exp
+++ b/gdb/testsuite/gdb.python/py-mi-events.exp
@@ -18,7 +18,7 @@ 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
-require !skip_python_tests
+require allow_python_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp
index 1b258623fb8..bc02da252bc 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp
@@ -18,7 +18,7 @@ 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi2"
 
-require !skip_python_tests
+require allow_python_tests
 
 gdb_exit
 if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
index b618b08e393..df5fc08dcfe 100644
--- a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
+++ b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
@@ -18,7 +18,7 @@ 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
 
-require !skip_python_tests
+require allow_python_tests
 
 #
 # Start here
diff --git a/gdb/testsuite/gdb.python/py-nested-maps.exp b/gdb/testsuite/gdb.python/py-nested-maps.exp
index 76e38c2555c..3dfdcf61a72 100644
--- a/gdb/testsuite/gdb.python/py-nested-maps.exp
+++ b/gdb/testsuite/gdb.python/py-nested-maps.exp
@@ -19,7 +19,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-objfile-script.exp b/gdb/testsuite/gdb.python/py-objfile-script.exp
index 550a68447b8..80ccb51800c 100644
--- a/gdb/testsuite/gdb.python/py-objfile-script.exp
+++ b/gdb/testsuite/gdb.python/py-objfile-script.exp
@@ -18,7 +18,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp
index cf9d5aedc19..61b9942de79 100644
--- a/gdb/testsuite/gdb.python/py-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-objfile.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp
index ab99817b5f3..e6a26ddc1ba 100644
--- a/gdb/testsuite/gdb.python/py-parameter.exp
+++ b/gdb/testsuite/gdb.python/py-parameter.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 # Start with a fresh gdb.
 clean_restart
diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
index b83eaa31095..54db88dd7de 100644
--- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp
+++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
@@ -17,7 +17,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-pp-integral.exp b/gdb/testsuite/gdb.python/py-pp-integral.exp
index 3fa247661ae..55b6a908c8b 100644
--- a/gdb/testsuite/gdb.python/py-pp-integral.exp
+++ b/gdb/testsuite/gdb.python/py-pp-integral.exp
@@ -15,7 +15,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp
index 5e6f23aeb9d..5e5b8030d20 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.exp
+++ b/gdb/testsuite/gdb.python/py-pp-maint.exp
@@ -23,7 +23,7 @@  if [is_remote host] {
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.exp b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
index 3fa247661ae..55b6a908c8b 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
@@ -15,7 +15,7 @@ 
 
 standard_testfile
 
-require !skip_python_tests
+require allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-pp-registration.exp b/gdb/testsuite/gdb.python/py-pp-registration.exp
index c85fc4a1a79..6b4f7600f3e 100644
--- a/gdb/testsuite/gdb.python/py-pp-registration.exp
+++ b/gdb/testsuite/gdb.python/py-pp-registration.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index 8166e118693..674a4edd0d2 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-progspace.exp b/gdb/testsuite/gdb.python/py-progspace.exp
index 23b328aa680..c7be9489601 100644
--- a/gdb/testsuite/gdb.python/py-progspace.exp
+++ b/gdb/testsuite/gdb.python/py-progspace.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index 56a0b47c78d..b5628933e0f 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -21,7 +21,7 @@  standard_testfile
 load_lib gdb-python.exp
 load_lib prompt.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-rbreak.exp b/gdb/testsuite/gdb.python/py-rbreak.exp
index 6c5f77ef3b1..43e13cdcb1f 100644
--- a/gdb/testsuite/gdb.python/py-rbreak.exp
+++ b/gdb/testsuite/gdb.python/py-rbreak.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-rbreak.c py-rbreak-func2.c
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
index ca9552754f3..19382d7bec0 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
@@ -17,7 +17,7 @@ 
 
 load_lib gdb-python.exp
 
-require allow_btrace_tests !skip_python_tests
+require allow_btrace_tests allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 1b9824e284b..555b70ae336 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -17,7 +17,7 @@ 
 
 # Skip this test if btrace is disabled.
 
-require allow_btrace_tests !skip_python_tests
+require allow_btrace_tests allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp
index eb40d51f218..3c03bb4a923 100644
--- a/gdb/testsuite/gdb.python/py-record-full.exp
+++ b/gdb/testsuite/gdb.python/py-record-full.exp
@@ -17,7 +17,7 @@ 
 
 # Skip this test if target does not support recording.
 
-require supports_process_record !skip_python_tests
+require supports_process_record allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
index 498443e9e54..1f12e5521d1 100644
--- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
@@ -24,7 +24,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
index aeb3f9c93cd..d91912fe924 100644
--- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
@@ -17,7 +17,7 @@ 
 # exposing rvalue reference values to Python.  It is based on
 # gdb.python/py-value-cc.exp.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index 96dafdbfd67..24d207416af 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -28,7 +28,7 @@  if {![istarget *-*-linux*]
     return
 }
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp
index 75e7bb6aa9c..e48d08a7a92 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.exp
+++ b/gdb/testsuite/gdb.python/py-send-packet.exp
@@ -24,7 +24,7 @@  load_lib gdbserver-support.exp
 
 standard_testfile
 
-require allow_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests allow_python_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index fdec1df2cc8..bd5f9a1da2d 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -17,7 +17,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-source-styling.exp b/gdb/testsuite/gdb.python/py-source-styling.exp
index 8a22b7f4e8c..f92d6f7a706 100644
--- a/gdb/testsuite/gdb.python/py-source-styling.exp
+++ b/gdb/testsuite/gdb.python/py-source-styling.exp
@@ -31,7 +31,7 @@  save_vars { env(TERM) } {
 	return -1
     }
 
-    if { [skip_python_tests] } { continue }
+    if { ![allow_python_tests] } { continue }
 
     if { ![gdb_py_module_available "pygments"] } {
 	unsupported "pygments module not available"
diff --git a/gdb/testsuite/gdb.python/py-startup-opt.exp b/gdb/testsuite/gdb.python/py-startup-opt.exp
index 2d9fd2a0444..08d1c79eee3 100644
--- a/gdb/testsuite/gdb.python/py-startup-opt.exp
+++ b/gdb/testsuite/gdb.python/py-startup-opt.exp
@@ -16,7 +16,7 @@ 
 # Test the flags within GDB that can be used to control how Python is
 # initialized.
 
-require !skip_python_tests
+require allow_python_tests
 
 # Return a list containing two directory paths for newly created home
 # directories.
diff --git a/gdb/testsuite/gdb.python/py-strfns.exp b/gdb/testsuite/gdb.python/py-strfns.exp
index 162e1026eb5..2f30e54b587 100644
--- a/gdb/testsuite/gdb.python/py-strfns.exp
+++ b/gdb/testsuite/gdb.python/py-strfns.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index a0bf34d8aa1..9ec2f44e9c0 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-symbol.c py-symbol-2.c
 
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 5b68524140e..b706cca092e 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile py-symbol.c
 
diff --git a/gdb/testsuite/gdb.python/py-sync-interp.exp b/gdb/testsuite/gdb.python/py-sync-interp.exp
index 1e994bf7393..665b9561ecd 100644
--- a/gdb/testsuite/gdb.python/py-sync-interp.exp
+++ b/gdb/testsuite/gdb.python/py-sync-interp.exp
@@ -20,7 +20,7 @@ 
 
 standard_testfile
 
-require can_spawn_for_attach !skip_python_tests
+require can_spawn_for_attach allow_python_tests
 
 load_lib gdb-python.exp
 
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index b337bfb8f01..a89a813578d 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -16,7 +16,7 @@ 
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
diff --git a/gdb/testsuite/gdb.python/py-thrhandle.exp b/gdb/testsuite/gdb.python/py-thrhandle.exp
index 0806f8995c1..e8004c77ad1 100644
--- a/gdb/testsuite/gdb.python/py-thrhandle.exp
+++ b/gdb/testsuite/gdb.python/py-thrhandle.exp
@@ -21,7 +21,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp
index 31d50d24418..e7837d7405f 100644
--- a/gdb/testsuite/gdb.python/py-type.exp
+++ b/gdb/testsuite/gdb.python/py-type.exp
@@ -351,7 +351,7 @@  if { [build_inferior "${binfile}" "c"] == 0 } {
   restart_gdb "${binfile}"
 
   # Skip all tests if Python scripting is not enabled.
-  if { [skip_python_tests] } { continue }
+  if { ![allow_python_tests] } { continue }
 
   gdb_test "python print (gdb.lookup_type ('char').objfile)" "None"
 
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index 219e8527ecb..40f7e53847f 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -13,7 +13,7 @@ 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 load_lib gdb-python.exp
 load_lib cp-support.exp
diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp
index c0dc7f2f49b..e75b060cde9 100644
--- a/gdb/testsuite/gdb.python/py-unwind-inline.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-unwind-maint.exp b/gdb/testsuite/gdb.python/py-unwind-maint.exp
index 3fcbe4f6054..e226121c97a 100644
--- a/gdb/testsuite/gdb.python/py-unwind-maint.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-maint.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
index 1598f865699..96692d69808 100644
--- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
@@ -38,7 +38,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index 2d279bf71b1..0d817378d97 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index 69439e226bf..1ea10ad0058 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -16,7 +16,7 @@ 
 # This file is part of the GDB testsuite.  It tests the mechanism
 # exposing values to Python.
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile .cc
 
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index 26ad72a5401..898208b90d1 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 standard_testfile
 
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index c164fec82aa..97d560476fc 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
 
 standard_testfile py-xmethods.cc
 
diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp
index 60486548825..36ecb0b5ef1 100644
--- a/gdb/testsuite/gdb.python/tui-window-disabled.exp
+++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp
@@ -48,7 +48,7 @@  proc clean_restart_and_setup { prefix } {
 	Term::clean_restart 24 80 $testfile
 
 	# Skip all tests if Python scripting is not enabled.
-	if { [skip_python_tests] } { return 0 }
+	if { ![allow_python_tests] } { return 0 }
 
 	# Now source the python script.
 	gdb_test_no_output "source ${remote_python_file}" \
diff --git a/gdb/testsuite/gdb.python/tui-window-names.exp b/gdb/testsuite/gdb.python/tui-window-names.exp
index 48f3c6b07cd..125a5f5a9b5 100644
--- a/gdb/testsuite/gdb.python/tui-window-names.exp
+++ b/gdb/testsuite/gdb.python/tui-window-names.exp
@@ -18,7 +18,7 @@ 
 
 load_lib gdb-python.exp
 
-require !skip_python_tests
+require allow_python_tests
 
 tuiterm_env
 
diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp
index 2f0415557bd..529ed16b641 100644
--- a/gdb/testsuite/gdb.python/tui-window.exp
+++ b/gdb/testsuite/gdb.python/tui-window.exp
@@ -16,7 +16,7 @@ 
 # Test a TUI window implemented in Python.
 
 load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
 tuiterm_env
 
 # This test doesn't care about the inferior.
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index d23463e89dd..28ae0545c5a 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,7 +17,7 @@ 
 
 load_lib gdb-python.exp
 load_lib rust-support.exp
-require !skip_rust_tests !skip_python_tests
+require !skip_rust_tests allow_python_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 7314aab395c..5925a4cd12d 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -386,7 +386,7 @@  gdb_test "print empty_enum_value.0" ""
 gdb_test "print empty_enum_value.something" ""
 
 load_lib gdb-python.exp
-if {[skip_python_tests]} {
+if {![allow_python_tests]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index bc62cbfc431..7b8f29b2890 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -23,7 +23,7 @@  load_lib gdbserver-support.exp
 
 standard_testfile multi-ui-errors.c
 
-require allow_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests allow_python_tests
 
 if {[build_executable "failed to prepare" ${testfile} \
 	 ${srcfile}] == -1} {
diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp
index 693771e942e..48b79fe723c 100644
--- a/gdb/testsuite/gdb.server/server-pipe.exp
+++ b/gdb/testsuite/gdb.server/server-pipe.exp
@@ -66,7 +66,7 @@  proc do_test { target } {
 
     gdb_test "info connections" "${target} \| ${::gdbserver} - ${::binfile} \[^\r\n\]+"
 
-    if { ![skip_python_tests] } {
+    if { [allow_python_tests] } {
 	gdb_test_no_output "python conn = gdb.selected_inferior().connection"
 	gdb_test "python print(conn.details)" "\| ${::gdbserver} - ${::binfile}"
     }
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index 78ce9879b42..99e9951f1f6 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -72,7 +72,7 @@  proc check_thread_local {number} {
 	    "= $expected_value" \
 	    "${number} thread local storage"
 
-    if {![skip_python_tests]} {
+    if {[allow_python_tests]} {
 	gdb_test_no_output \
 	    "python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
 	    "${number} look up a_thread_local symbol"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3a1936ffc82..b6eff66f94d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2447,11 +2447,11 @@  proc skip_rust_tests {} {
     return 0
 }
 
-# Return a 1 for configurations that do not support Python scripting.
+# Return a 1 for configurations that support Python scripting.
 
-gdb_caching_proc skip_python_tests {
+gdb_caching_proc allow_python_tests {
     set output [remote_exec host $::GDB --configuration]
-    return [expr {[string first "--with-python" $output] == -1}]
+    return [expr {[string first "--with-python" $output] != -1}]
 }
 
 # Return a 1 if we should skip shared library tests.