[squeak-dev] Debugging a primitive failure

Frank Shearar frank.shearar at gmail.com
Mon Jan 6 11:40:21 UTC 2014


I'm taking another run at making all Monticello tests load into new
environments that get thrown away in #tearDown. (This ought to
strongly test the Environment code loading, as well as prevent
monkeying with global state.)

To that end I've added

MCTestCase >> #setUp
    environment := Environment withName: ('{1} test environment'
format: {self className}).
    environment import: Smalltalk globals.

MCTestCase >> #tearDown
    environment destroy.
    environment := nil.
    self clearPackageCache. "This line already existed"

Since I had the most trouble with MCPackageTest, I changed the first
line of the test from "self mockPackage unload" to

    [MCPackageLoader installSnapshot: self mockSnapshot.
        self mockPackage unload] on: EnvironmentRequest do: [:e | e
resume: environment].

All was well, except that the test fails. It fails because I get a
primSize fail on the changes file! After this, it seems like the
changes file is corrupted, in that attempts to save any changes result
in a primSize error..

One other datum of possible import is that I'm asked whether I want to
automatically create a pool dictionary (as in my recent mail to the
list).

At any rate, I've managed to do this three times in a row. Something's
not right somewhere. How might I start trying to debug this?

I would try save the image and offer it up for inspection, but of
course I can't do that because that involves the changes file. I can't
even file out a changeset, class or method. I'm going to try redo the
changes I made, and prep a changeset. To be clear: I only see the
failure when I run the test, and that somehow breaks the changes file.

frank


More information about the Squeak-dev mailing list