sbcl-devel

Attached are test cases which stress-test the package system a little,
in particular resolving name conflicts.
They can be loaded with:
sbcl --load package-tests.lisp
Results for sbcl 1.0.19.7:
[...]
Summary: 10 checks failed in 8 tests:
(USE-PACKAGE-1) (USE-PACKAGE-CONFLICT-SET) (EXPORT-1) (EXPORT-1A)
(EXPORT-ENSURE-EXPORTED) (EXPORT-3-INTERN) (IMPORT-NIL-2)
(IMPORT-SINGLE-CONFLICT).
There are about three issues AFAICT:
1. Name conflict resolution involving CL:NIL does not work reliably
because
(shadowing-import NIL "FOO") is used instead of
(shadowing-import (list NIL) "FOO")
2. EXPORT does not export a symbol if it causes a conflict
(despite resolving the conflict). Bug introduced in 0.8.16.4,
AFAICT.
3. Sometimes, conflict resolution does not make the chosen symbol
accessible.
I have solutions for these three issues ready (modulo cleanup), and
all tests but (USE-PACKAGE-CONFLICT-SET) and (IMPORT-SINGLE-CONFLICT)
succeed then. Those two require some more work, and are not actually
harmful, just annoying.
Note that not all of the included checks are failing for SBCL and some
trigger on the same error, but I had one or the other failing when I
was fixing the above issues. I don't think the tests provide FULL
coverage of all possible corner cases, but it's a start.
How to proceed? I propose the following course of actions:
* It seems sbcl's tests currently just error out with an ASSERT. I
would like to see some minimalistic test framework included in SBCL's
run-tests.
(I am not sure where to put it.) The one included in the attached
file is <80 lines and does the job for me.
* Commit the test cases
* In the mean time, I will clean up and send two patches which solve
the above issues.
Cheers,
Michael

On Fri, Aug 1, 2008 at 2:28 PM, Michael Weber <michaelw+sbcl@...> wrote:
> * It seems sbcl's tests currently just error out with an ASSERT. I would
> like to see some minimalistic test framework included in SBCL's run-tests.
> (I am not sure where to put it.) The one included in the attached file is
> <80 lines and does the job for me.
There is one there already:
(with-test (:name whatever)
(...test code that signals an error if it fails...))
Cheers,
-- Nikodemus