Use INVOKE-RESTART, not EXIT, to bail out of test files

This commit is contained in:
Douglas Katzman 2022-06-02 13:31:22 -04:00
parent 1c380f8242
commit dd911e0079
40 changed files with 42 additions and 47 deletions

View file

@ -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

View file

@ -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:

View file

@ -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"))

View file

@ -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

View file

@ -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.

View file

@ -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)

View file

@ -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"

View file

@ -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")

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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")

View file

@ -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)

View file

@ -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)

View file

@ -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.

View file

@ -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)

View file

@ -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")

View file

@ -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

View file

@ -1,4 +1,4 @@
#-sb-thread (sb-ext:exit :code 104)
#-sb-thread (invoke-restart 'run-tests::skip-file)
(use-package "SB-THREAD")

View file

@ -1,4 +1,4 @@
#-sb-thread (sb-ext:exit :code 104)
#-sb-thread (invoke-restart 'run-tests::skip-file)
(use-package "SB-THREAD")

View file

@ -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

View file

@ -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)

View file

@ -1,4 +1,4 @@
#-sb-thread (sb-ext:exit :code 104)
#-sb-thread (invoke-restart 'run-tests::skip-file)
(use-package "SB-THREAD")

View file

@ -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")

View file

@ -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)

View file

@ -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")

View file

@ -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))

View file

@ -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)

View file

@ -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...

View file

@ -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)

View file

@ -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*)

View file

@ -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))

View file

@ -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)

View file

@ -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

View file

@ -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")

View file

@ -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)