TestFrameworkDriver simplification#1
TestFrameworkDriver simplification#1iignatev wants to merge 32 commits intochhagedorn:TestingFrameworkfrom
Conversation
… immediately, started adding Bad tests, some refactorings
…checks with TriState, fix tests, fix compilation scheduling for BaseTests, add SanityTest, cleanup naming of public interface
…ormat reporting, added bad CompileCommand tests, added more interface methods to TestFramework and TestInfo
… IR failure reporting and refactored the constraint matching of the IR test, add individual store/loads selection
3bcc364 to
d805c76
Compare
|
Hi Igor Thanks a lot for trying this out! This simplified way to write a jtreg test is great! I took your change and tried to update the framework such that the user is not even aware of the driver and can just directly set the things up in the To achieve that I split the
I also renamed the package according to your suggestion to Here is the diff to the previous version: Update vs. previous version What do you think? Cheers, |
|
LGTM. re: |
|
btw, reading the framework code(just to be clear I read only some of it and not very thoroughly, so I might misintererpted your intention), I noticed this: |
Thank you Igor for your review! That sounds good, thanks for taking care of the
I see, that is a problem. Yes, I just wanted to pass all flags that would normally be passed to a compiler jtreg test with |
|
changing it even to simple
|
|
You're right, that's a useless exercise to run the VM which calls I updated the Changes: openjdk@b011f22 |
|
why do we need to run also, does JVM under test have to be created by "TestFramework runner" VM, ie can't it be initiated by the 1st "driver" VM? |
|
Yes, the "TestFramework runner" VM in |
|
ok, I think it would be easier to understand if "TestFramework runner" VM did its job of query JVM and constructing (partial?) command line, passed it back to "driver" VM, and "driver" VM took care of spawning "test" VM. and it actually seems that "TestFramework runner" VM has to be run w/ all external flags, otherwise, the flags' value won't be correct. |
d3dab56 to
152effc
Compare
|
(Sorry, I somehow forgot to hit "Comment" yesterday) I agree, that's a much better idea instead of having the test VM nested in the runner VM nested in the driver VM. And you're also right, we need the external flags to accurately prepare the test VM flags. I updated that such that we are now calling a "flag" VM with WB access from the driver VM in So, we have this workflow now: Here is the updated version (relevant changes in Cheers, |
9ec9f28 to
c049042
Compare
|
Hi Christian, sounds good to me, one thing though: instead of using stdout to pass flags from "flag" VM to "driver" VM, I'd recommend you to use a dedicated file, socket, etc. that will make this communication more robust and independent of the will of JVM to produce warning/error or any other messages to stdout. |
|
Thanks Igor! That sounds better instead of relying on the stdout. I tried a socket implementation for the flag VM and also reused it to pass the encoding from The relevant changes are around Cheers, |
|
it would seem you forget to |
|
Hi Igor, it's inside the file |
|
strange, I used search in the repo functionality and it didn't find anything... anyhow, you shouldn't use a specific port as there is no guarantee that it will be available, what you should do instead is to use an ephemeral port when you create a socket and pass it as an argument/property to "flag" VM: instead of using |
|
Yeah, I thought that it's probably not a good idea to use a hardcoded port. Thanks for the pointers. I adapted that approach and pass the port as property to the flag and test VM and use Here are the changes, the relevant parts are again around |
|
looks good. I'll try to find time next week to go thru the code as a whole. does TestingFramework have the latest code? |
8263412 (and its follow-up fixes) moved |
Thanks a lot! I'm currently changing some things in
Great! |
|
Hi Igor, I pushed the updates yesterday and just before. I'm in the process of adding now more documentation to the code which I will push incrementally. You can already take a look at the code or wait for some more documentation. There is no hurry I think. Thanks again for all your help, I highly appreciate it! |
Hi Christian,
I've taken the 1st stub at simplifying TestFrameworkDriver. as you can see, now we can just have
@run driver $Testin the tests w/$Test::mainbeing as simple asTestFrameworkDriver.main(args). to make this work, I, unfortunately, have to create a "packagefull" version ofClassFileInstaller(so it can be called from packages other than default). I haven't thoroughly tested that change, in other words, there can be tests that would start to fail b/c of that, and I am not 100% sure about the location ofClassFileInstaller, I actually was thinking about putting it (as well asRedefineClassHelper) intojdk.test.lib.helpers. in any case, we can discuss that later.Cheers,
-- Igor