Deterministic execution of Java Threads, tool support

advertisements

I am looking for a tool or api which allows deterministic execution of Java threads for testing purposes. Thus, allowing context switches in java code at certain locations in byte code. For instance, I want a thread t1 to preempt for another thread t2 at say line N in the bytecode/sourcecode and so on. To make the case simpler lets ignore the synchronization or locks. Is there any tool, if possible open source customized JVM available. I am aware of a few tools like dejavu, LEAP but I would like to know about recommended open source tools from some one who has experience with such tools.

Cheers, Pulkit


I'm not aware of any tools that do exactly what you want, and in general that's going to be tough, simply because JITs etc.. will blur what a "line" means. So you'll either get lousy code that meets your goals, or the real code that won't. Either way bugs could slip through. I'd suggest you look at ConTest for a good perspective on how testing in this general area can be done.