From dd911e00794a976aa590f5c458a9c3ae4d0bb6fa Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Thu, 2 Jun 2022 13:31:22 -0400 Subject: [PATCH] Use INVOKE-RESTART, not EXIT, to bail out of test files --- tests/aprof.impure.lisp | 2 +- tests/autoclose-stream.impure.lisp | 2 +- tests/brothertree.impure.lisp | 2 +- tests/callback.impure.lisp | 2 +- tests/classoid-typep.impure.lisp | 2 +- tests/clos-typechecking.impure.lisp | 2 +- tests/clos.impure.lisp | 2 +- tests/compiler.impure.lisp | 2 +- tests/concurrent-syscalls.impure.lisp | 2 +- tests/deadlock.impure.lisp | 2 +- tests/debug.impure.lisp | 2 +- tests/exhaust.impure.lisp | 2 +- tests/exit-hang.impure.lisp | 3 +-- tests/fast-eval.impure.lisp | 3 +-- tests/fcb-threads.impure.lisp | 4 ++-- tests/filecompile.impure.lisp | 2 +- tests/finalize.impure.lisp | 3 +-- tests/full-eval.impure.lisp | 3 +-- tests/gc-search.impure.lisp | 2 +- tests/gc-threads.impure.lisp | 2 +- tests/gethash-concurrency.impure.lisp | 2 +- tests/immobile-space.impure.lisp | 2 +- tests/interrupt-atomic-incf.impure.lisp | 2 +- tests/interrupt-consing.impure.lisp | 2 +- tests/interrupted-sleep.impure.lisp | 2 +- tests/kill-non-lisp-thread.impure.lisp | 3 +-- tests/mutex.impure.lisp | 2 +- tests/package-locks.impure.lisp | 2 +- tests/session.impure.lisp | 2 +- tests/sprof.impure.lisp | 2 +- tests/style-warnings.impure.lisp | 2 +- tests/system.impure.lisp | 2 +- tests/threads.impure.lisp | 2 +- tests/timer.impure.lisp | 2 +- tests/traceroot.impure.lisp | 2 +- tests/unwind-to-frame-and-call.impure.lisp | 2 +- tests/win32-foreign-stack-unwind.impure.lisp | 4 ++-- tests/win32.impure.lisp | 2 +- tests/win64-exceptions.impure.lisp | 2 +- tests/x86-64-codegen.impure.lisp | 2 +- 40 files changed, 42 insertions(+), 47 deletions(-) diff --git a/tests/aprof.impure.lisp b/tests/aprof.impure.lisp index a99d5bc05..8d8305d10 100644 --- a/tests/aprof.impure.lisp +++ b/tests/aprof.impure.lisp @@ -9,7 +9,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-(and x86-64 sb-thread (not win32)) (sb-ext:exit :code 104) ;; not implemented elsewhere +#-(and x86-64 sb-thread (not win32)) (invoke-restart 'run-tests::skip-file) ;; not implemented elsewhere (defstruct fruitbasket x y z) (with-test (:name :aprof-smoketest-struct diff --git a/tests/autoclose-stream.impure.lisp b/tests/autoclose-stream.impure.lisp index 79ee7b0d7..d51a60153 100644 --- a/tests/autoclose-stream.impure.lisp +++ b/tests/autoclose-stream.impure.lisp @@ -3,7 +3,7 @@ ;;; due to co-located tests. ;;; don't know how to check validity of a HANDLE in the win32 api -#-unix (sb-ext:exit :code 104) +#-unix (invoke-restart 'run-tests::skip-file) (defun fd-has-finalizer-p (fd) ;; Finalizer function can be: diff --git a/tests/brothertree.impure.lisp b/tests/brothertree.impure.lisp index 3b84c613b..837b79fef 100644 --- a/tests/brothertree.impure.lisp +++ b/tests/brothertree.impure.lisp @@ -1,4 +1,4 @@ -#+interpreter (sb-ext:exit :code 104) +#+interpreter (invoke-restart 'run-tests::skip-file) (let ((*evaluator-mode* :compile)) (load "../src/code/brothertree.lisp")) diff --git a/tests/callback.impure.lisp b/tests/callback.impure.lisp index f6ac36a2a..29e93c840 100644 --- a/tests/callback.impure.lisp +++ b/tests/callback.impure.lisp @@ -18,7 +18,7 @@ ;;; and :alien-callbacks is almost everywhere defined. ;;; However mips doesn't seem to correctly implement them, ;;; making the feature indicator somewhat useless) -#+(or (not alien-callbacks) mips) (exit :code 104) +#+(or (not alien-callbacks) mips) (invoke-restart 'run-tests::skip-file) ;;; simple callback for a function diff --git a/tests/classoid-typep.impure.lisp b/tests/classoid-typep.impure.lisp index b22c8810b..ae37fb9dd 100644 --- a/tests/classoid-typep.impure.lisp +++ b/tests/classoid-typep.impure.lisp @@ -9,7 +9,7 @@ ;;;; absoluely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) ;;; Using a fresh package as a namespace for classes is a quick-and-dirty ;;; way to create a class hierarchy without anonymous classes. diff --git a/tests/clos-typechecking.impure.lisp b/tests/clos-typechecking.impure.lisp index e8e3e212c..46f9a8638 100644 --- a/tests/clos-typechecking.impure.lisp +++ b/tests/clos-typechecking.impure.lisp @@ -13,7 +13,7 @@ ;;;; more information. ;;; Typechecking should be working, but it isn't. -#+interpreter (sb-ext:exit :code 104) +#+interpreter (invoke-restart 'run-tests::skip-file) (shadow 'slot) diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 6c9877a3c..af87c0144 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -11,7 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#+interpreter (sb-ext:exit :code 104) +#+interpreter (invoke-restart 'run-tests::skip-file) (load "compiler-test-util.lisp") (defpackage "CLOS-IMPURE" diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 0178e1af9..5b0c15a5b 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -20,7 +20,7 @@ ;; or actually reasonable things to test. (when (and (eq sb-ext:*evaluator-mode* :interpret) (not (member :sb-fasteval *features*))) - (sb-ext:exit :code 104)) + (invoke-restart 'run-tests::skip-file)) (load "compiler-test-util.lisp") diff --git a/tests/concurrent-syscalls.impure.lisp b/tests/concurrent-syscalls.impure.lisp index fce8c3942..6de163862 100644 --- a/tests/concurrent-syscalls.impure.lisp +++ b/tests/concurrent-syscalls.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (use-package "SB-THREAD") (defun exercise-syscall (fn reference-errno) diff --git a/tests/deadlock.impure.lisp b/tests/deadlock.impure.lisp index a74a8b9be..95100d00f 100644 --- a/tests/deadlock.impure.lisp +++ b/tests/deadlock.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (import '(sb-thread:join-thread sb-thread:make-mutex diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index 03b278c38..4dbccdbf6 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -17,7 +17,7 @@ ;;; The debugger doesn't have any native knowledge of the interpreter (when (eq sb-ext:*evaluator-mode* :interpret) - (sb-ext:exit :code 104)) + (invoke-restart 'run-tests::skip-file)) #+(or x86 x86-64) (with-test (:name :legal-bpt-lra-object) diff --git a/tests/exhaust.impure.lisp b/tests/exhaust.impure.lisp index 32a938513..9ae2646c4 100644 --- a/tests/exhaust.impure.lisp +++ b/tests/exhaust.impure.lisp @@ -11,7 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#+interpreter (sb-ext:exit :code 104) +#+interpreter (invoke-restart 'run-tests::skip-file) (test-util::disable-profiling) diff --git a/tests/exit-hang.impure.lisp b/tests/exit-hang.impure.lisp index b1ec24284..d88cb789e 100644 --- a/tests/exit-hang.impure.lisp +++ b/tests/exit-hang.impure.lisp @@ -1,4 +1,4 @@ -#+(or (not sb-thread) win32) (sb-ext:exit :code 104) +#+(or (not sb-thread) win32) (invoke-restart 'run-tests::skip-file) ;;; Not an exactly an "exit hang" test, but there was a different hang ;;; regarding concurrent JOIN-THREAD on 1 thread. @@ -74,4 +74,3 @@ ;;; Give ourselves 3 seconds to exit. (alien-funcall (extern-alien "prepare_exit_test" (function void int)) 3) (setq sb-ext:*forcibly-terminate-threads-on-exit* nil) -(exit :code 104) diff --git a/tests/fast-eval.impure.lisp b/tests/fast-eval.impure.lisp index 946e508b3..4ac68f3be 100644 --- a/tests/fast-eval.impure.lisp +++ b/tests/fast-eval.impure.lisp @@ -11,8 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-sb-fasteval -(sb-ext:exit :code 104) +#-sb-fasteval (invoke-restart 'run-tests::skip-file) (setf sb-ext:*evaluator-mode* :interpret) diff --git a/tests/fcb-threads.impure.lisp b/tests/fcb-threads.impure.lisp index 110beb14b..a2c47a21b 100644 --- a/tests/fcb-threads.impure.lisp +++ b/tests/fcb-threads.impure.lisp @@ -15,7 +15,7 @@ ;;; - garbage_collect: no SP known for thread 0x802bea000 (OS 34367133952) ;;; - failed AVER: (NOT (SB-THREAD::AVL-FIND ADDR SB-THREAD::OLD)) -#+(or (not sb-thread) freebsd) (sb-ext:exit :code 104) +#+(or (not sb-thread) freebsd) (invoke-restart 'run-tests::skip-file) (setf (generation-number-of-gcs-before-promotion 0) 5) (setf (generation-number-of-gcs-before-promotion 1) 3) @@ -157,7 +157,7 @@ (f 5 5 200 t)) ;;; The next test hasn't been made to run on windows, but should. -#+win32 (exit :code 104) +#+win32 (invoke-restart 'run-tests::skip-file) ;;; Check that you get an error trying to join a foreign thread (defglobal *my-foreign-thread* nil) diff --git a/tests/filecompile.impure.lisp b/tests/filecompile.impure.lisp index 07f45e013..9604f5e85 100644 --- a/tests/filecompile.impure.lisp +++ b/tests/filecompile.impure.lisp @@ -9,7 +9,7 @@ (scratch-file-name "fasl"))))) (assert (search expect err-string)))))) -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (unlock-package "SB-INT") (unlock-package "SB-IMPL") diff --git a/tests/finalize.impure.lisp b/tests/finalize.impure.lisp index 947ac21c4..85b5cfb35 100644 --- a/tests/finalize.impure.lisp +++ b/tests/finalize.impure.lisp @@ -1,5 +1,4 @@ -#+interpreter (sb-ext:exit :code 104) -#+sb-safepoint (sb-ext:exit :code 104) ; tends to hang +#+(or sb-safepoint interpreter) (invoke-restart 'run-tests::skip-file) (defvar *tmp* 0.0) ; don't remove - used by the setq below (defglobal *count* 0) diff --git a/tests/full-eval.impure.lisp b/tests/full-eval.impure.lisp index c7717d31e..515c6be59 100644 --- a/tests/full-eval.impure.lisp +++ b/tests/full-eval.impure.lisp @@ -11,8 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-(or sb-eval sb-fasteval) -(sb-ext:exit :code 104) +#-(or sb-eval sb-fasteval) (invoke-restart 'run-tests::skip-file) (setf sb-ext:*evaluator-mode* :interpret) diff --git a/tests/gc-search.impure.lisp b/tests/gc-search.impure.lisp index d0548435f..696479f1f 100644 --- a/tests/gc-search.impure.lisp +++ b/tests/gc-search.impure.lisp @@ -1,5 +1,5 @@ -#-immobile-space (sb-ext:exit :code 104) +#-immobile-space (invoke-restart 'run-tests::skip-file) (defun make-page-full-of-fdefns () ;; Make a bunch of fdefns until we're aligned at a page boundary. diff --git a/tests/gc-threads.impure.lisp b/tests/gc-threads.impure.lisp index d298212db..a2bf0e58c 100644 --- a/tests/gc-threads.impure.lisp +++ b/tests/gc-threads.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (with-test (:name (:two-threads-running-gc) :broken-on :sb-safepoint) diff --git a/tests/gethash-concurrency.impure.lisp b/tests/gethash-concurrency.impure.lisp index b2091293e..68adca249 100644 --- a/tests/gethash-concurrency.impure.lisp +++ b/tests/gethash-concurrency.impure.lisp @@ -1,6 +1,6 @@ ;;; HASH TABLES -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (use-package "SB-THREAD") (use-package "SB-SYS") diff --git a/tests/immobile-space.impure.lisp b/tests/immobile-space.impure.lisp index 5ff003cf9..604b353ec 100644 --- a/tests/immobile-space.impure.lisp +++ b/tests/immobile-space.impure.lisp @@ -1,5 +1,5 @@ -#-immobile-space (sb-ext:exit :code 104) +#-immobile-space (invoke-restart 'run-tests::skip-file) ;;; If an instance was allocated but its layout not stored yet ;;; it could crash diff --git a/tests/interrupt-atomic-incf.impure.lisp b/tests/interrupt-atomic-incf.impure.lisp index 76fa70e5c..83fe98618 100644 --- a/tests/interrupt-atomic-incf.impure.lisp +++ b/tests/interrupt-atomic-incf.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (use-package "SB-THREAD") diff --git a/tests/interrupt-consing.impure.lisp b/tests/interrupt-consing.impure.lisp index d47ef337c..7e4d7ed37 100644 --- a/tests/interrupt-consing.impure.lisp +++ b/tests/interrupt-consing.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (use-package "SB-THREAD") diff --git a/tests/interrupted-sleep.impure.lisp b/tests/interrupted-sleep.impure.lisp index 162561ad8..72b4d3176 100644 --- a/tests/interrupted-sleep.impure.lisp +++ b/tests/interrupted-sleep.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) ;; test that SLEEP actually sleeps for at least the given time, even ;; if interrupted by another thread exiting/a gc/anything diff --git a/tests/kill-non-lisp-thread.impure.lisp b/tests/kill-non-lisp-thread.impure.lisp index c3ca816ce..11fe79eb6 100644 --- a/tests/kill-non-lisp-thread.impure.lisp +++ b/tests/kill-non-lisp-thread.impure.lisp @@ -11,8 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#+(or :win32 (not :sb-thread)) -(sb-ext:exit :code 104) +#+(or :win32 (not :sb-thread)) (invoke-restart 'run-tests::skip-file) (use-package :sb-alien) diff --git a/tests/mutex.impure.lisp b/tests/mutex.impure.lisp index 0e687edd0..917237cfe 100644 --- a/tests/mutex.impure.lisp +++ b/tests/mutex.impure.lisp @@ -1,4 +1,4 @@ -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (use-package "SB-THREAD") diff --git a/tests/package-locks.impure.lisp b/tests/package-locks.impure.lisp index 7c6f2bc98..75b011cb7 100644 --- a/tests/package-locks.impure.lisp +++ b/tests/package-locks.impure.lisp @@ -11,7 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#+sb-devel (sb-ext:exit :code 104) ; packages are not locked for devs +#+sb-devel (invoke-restart 'run-tests::skip-file) ; packages are not locked for devs (load "compiler-test-util.lisp") diff --git a/tests/session.impure.lisp b/tests/session.impure.lisp index 01626cca6..76f8c4b5e 100644 --- a/tests/session.impure.lisp +++ b/tests/session.impure.lisp @@ -11,7 +11,7 @@ ;;;; absoluely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) (setf sb-unix::*on-dangerous-wait* :error) diff --git a/tests/sprof.impure.lisp b/tests/sprof.impure.lisp index 0335388a5..bc7835d0a 100644 --- a/tests/sprof.impure.lisp +++ b/tests/sprof.impure.lisp @@ -5,7 +5,7 @@ ;;; but I need to try to see it behaving badly (if it does), ;;; and there's really no other way than to watch for bad output. -#+win32 (sb-ext:exit :code 104) +#+win32 (invoke-restart 'run-tests::skip-file) (require :sb-sprof) (load "../contrib/sb-sprof/test.lisp") diff --git a/tests/style-warnings.impure.lisp b/tests/style-warnings.impure.lisp index 08cc46605..ea75f83fb 100644 --- a/tests/style-warnings.impure.lisp +++ b/tests/style-warnings.impure.lisp @@ -17,7 +17,7 @@ ;;;; more information. ;; These tests don't work unless compiling -#+interpreter (sb-ext:exit :code 104) +#+interpreter (invoke-restart 'run-tests::skip-file) (defun f-with-macro (arg) (list arg)) (defun f2-with-macro (a b) (list a b)) diff --git a/tests/system.impure.lisp b/tests/system.impure.lisp index c3b943726..e00df4c76 100644 --- a/tests/system.impure.lisp +++ b/tests/system.impure.lisp @@ -11,7 +11,7 @@ (in-package "SB-VM") -#-(and (or x86 x86-64) (not interpreter)) (sb-ext:exit :code 104) +#-(and (or x86 x86-64) (not interpreter)) (invoke-restart 'run-tests::skip-file) (test-util:with-test (:name :basic-cpuid) (flet ((to-ascii (bits) diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index 28122cb0b..14cb2db47 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -70,7 +70,7 @@ (process-all-interrupts)) (check-deferrables-unblocked-or-lose 0)) -#-sb-thread (sb-ext:exit :code 104) +#-sb-thread (invoke-restart 'run-tests::skip-file) ;;;; Now the real tests... diff --git a/tests/timer.impure.lisp b/tests/timer.impure.lisp index 34eea64ef..04caf6ae2 100644 --- a/tests/timer.impure.lisp +++ b/tests/timer.impure.lisp @@ -9,7 +9,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#+interpreter (sb-ext:exit :code 104) +#+interpreter (invoke-restart 'run-tests::skip-file) (with-test (:name :heap) (let* ((size 1000) diff --git a/tests/traceroot.impure.lisp b/tests/traceroot.impure.lisp index 394cd4894..3ba7624e7 100644 --- a/tests/traceroot.impure.lisp +++ b/tests/traceroot.impure.lisp @@ -18,7 +18,7 @@ ;;;; And also sb-safepoint gets a crash in C. #-(and gencgc sb-thread (not sb-safepoint) (or (and arm64 (not darwin)) ppc64 x86-64)) -(sb-ext:exit :code 104) +(invoke-restart 'run-tests::skip-file) (setq sb-ext:*evaluator-mode* :compile) (defvar *fred*) diff --git a/tests/unwind-to-frame-and-call.impure.lisp b/tests/unwind-to-frame-and-call.impure.lisp index fc1c5c464..171c5fb60 100644 --- a/tests/unwind-to-frame-and-call.impure.lisp +++ b/tests/unwind-to-frame-and-call.impure.lisp @@ -14,7 +14,7 @@ ;;; The debugger doesn't have any native knowledge of the interpreter (when (eq sb-ext:*evaluator-mode* :interpret) - (sb-ext:exit :code 104)) + (invoke-restart 'run-tests::skip-file)) (declaim (optimize debug)) diff --git a/tests/win32-foreign-stack-unwind.impure.lisp b/tests/win32-foreign-stack-unwind.impure.lisp index 674915074..dfb87d4a6 100644 --- a/tests/win32-foreign-stack-unwind.impure.lisp +++ b/tests/win32-foreign-stack-unwind.impure.lisp @@ -11,8 +11,8 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-win32 (exit :code 104) ;; This is extremely win32-specific. -#-x86 (exit :code 104) ;; And our AMD64 backend does not aim to support it. +#-win32 (invoke-restart 'run-tests::skip-file) ;; This is extremely win32-specific. +#-x86 (invoke-restart 'run-tests::skip-file) ;; And our AMD64 backend does not aim to support it. (use-package :sb-alien) diff --git a/tests/win32.impure.lisp b/tests/win32.impure.lisp index e3006d661..1de4ef8d3 100644 --- a/tests/win32.impure.lisp +++ b/tests/win32.impure.lisp @@ -9,7 +9,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-win32 (exit :code 104) +#-win32 (invoke-restart 'run-tests::skip-file) (with-test (:name :dbg-print-exception-c) (handler-case diff --git a/tests/win64-exceptions.impure.lisp b/tests/win64-exceptions.impure.lisp index a0a42bf6a..ab7369962 100644 --- a/tests/win64-exceptions.impure.lisp +++ b/tests/win64-exceptions.impure.lisp @@ -11,7 +11,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-(and win32 x86-64) (exit :code 104) ;; This is extremely win64-specific. +#-(and win32 x86-64) (invoke-restart 'run-tests::skip-file) ;; This is extremely win64-specific. (with-scratch-file (dll "dll") (run-program "gcc" `("-shared" "-o" ,dll "win64-exceptions.c") diff --git a/tests/x86-64-codegen.impure.lisp b/tests/x86-64-codegen.impure.lisp index 9f4d0c237..dcf423abe 100644 --- a/tests/x86-64-codegen.impure.lisp +++ b/tests/x86-64-codegen.impure.lisp @@ -9,7 +9,7 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-x86-64 (sb-ext:exit :code 104) +#-x86-64 (invoke-restart 'run-tests::skip-file) ;;; This trivial function failed to compile due to rev 88d078fe (defun foo (&key k)