From: skaller <sk...@us...> - 2004-12-28 00:59:28
|
On Tue, 2004-12-28 at 10:32, Janne Hellsten wrote: > skaller wrote: > > Nope -- someone else reported this problem, I just > > coded it into a test. > > Oh OK. Well thanks to the original reporter then :) > > I was not aware of this, so I've been thinking it's a new bug. I'm too lazy to search the archives, but segfaults were reported with Dynarray some time ago. Much more recently someone actually found a problem with 0 length Dynarrays. Dynarray has been around for a while, so it is possible this caused the original problem. This kind of bug is very hard to find, which is a good reason to get rid of unnecessary unsafe accesses and add assertions. IMHO. This should not impact production code where assertions are turned off, and unsafe accesses replace all safe ones. > > Hmm. If we had unit test level control in the test > > harness, we could add/not add Gc.major() after every > > test. > > Yep that's right. We could have it as a flag for Util.run_test. > However, this can also be done in a regression tester fashion by > isolating the test into a new test module (new file) and then adding the > Gc.major () call by hand. That's true. > I think this approach is perfectly reasonable > since GC bugs should not be that frequent. Hmmm. What *other* kinds of bugs do you expect to find?? > There is also a possibility (because we have your mktest) to compile a > fresh new executable out of each test. This way each test would be run > in a separate process and thus they would not interfere with each other. Yes, but the harness generator doesn't handle units (unit tests) only groups of them. > There are also other variations such as randomizing the order of test > execution inside a single process etc etc. Yes, and calling the test multiple times too... > > Ah, you added --module :) > I did not add --test=foo, since there's not much need for it yet. It seems unlikely there will be any 'systematic' naming of tests, so probably the option should be --test=mmm_aa_ttt i.e. specify the whole filename. That test gets added into the test set, which is empty initially if the option is specified. Hmmm.. a more likely option is --exe=foobar which names the output executable, that way you have several testers at once. In particular a standard one, and one you're using to check the tests you're working on. -- John Skaller, mailto:sk...@us... voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net |