-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Dockerfile for Astor 1.1 #312
Conversation
When changing maven to use jdk8, everything seems to work as expected. |
Yes. We have seen that GZoltar works fine with j8 (in our previous experiments the problem of j8 came from Defects4J) but does not work in j11 |
…tory, Dockerfile stops after finished run
Good Afternoon @martinezmatias , Astor now terminates for Math280 (without finding a solution) but at least all Gzoltar Issues seem to be ironed out. There are three points where I could need feedback:
After your feedback I'd de-hardcode the docker-part and try to run some of the examples with docker compose. Best |
Would also close #132 if I am not mistaken. Pretty cool what you are doing here @lapplislazuli |
It is possible: in the command line you can use the existing parameter
I did not understand when you say "added the new Gzoltar-Libraries as new dependencies". As far I understood, you removed the Gzoltar 1.X from the Pom.xml, and retrieves the path from the configuration file.
I see the strategy and I would say that It works. However, I wonder what will happen if a user want to create a jar with all the dependencies (i.e. we usually create it for deploying on our experiments infractucture): in that case, they fat jar will not contain the classes from Gzoltar (as the dependency is not any more in the pom) but, at the same time, the path to Gzoltar from the configuration file will probably not exist. Do you see my point?
We have defined an extension point Thanks a lot for the great progress on the issue! |
@martinezmatias I am a bit stuck again 🤷♂️ In older Gzoltar there seems to be information on the file under inspection, in newer there is not. The best I have is package + class name, but that is not enough to match the CtClass Elements later, which gives the following errors: I could also not spot any options in formatters on gzoltar side. Here is the full log of the run Do you think we can go with a heuristic CtClass-match that does not need the file? edit: OK I used the fully qualified classname (package+class) and now it's doing something, just the ctClasses for the Tests are missing but I want to filter them out anyway. In terms of where to put gzoltar.jar's I also see issues with building the astor-with-dependencies. Gzoltar would have to be treated similar to resources I guess. |
…ualified classname in gzoltar testresults
The error you point is when Astor cannot find the location of the suspicious. I suspect it happens when the suspicious is located inside a) anonymous class, b) inner class.
When we run Astor in Eclipse is simple: if Gzoltar is a dependency (declared on the pom.xml) then it will be included in the classpath of Astor. In other words, if inside of Astor we call to
It could be an option, however, It adds some complexity on the execution process. Regards |
… running, added a filter on test methods for suspicious code
Goude Middag @martinezmatias, The new patients are LauncherJunitProcess and the JunitNoLogExecutor.
Where the last line is an actual blank line. If I try to start the process in a similar fashion:
it fails with the following error:
Despite the astor classes being in classpath. In general, the Launcher looks a bit scary. Can you help me understand why there is magic with stdin and stdout instead of creating tempfiles? And why is the timezone fixed to LA? ==================================================== On the other side the |
I imagine that the timezone was set to LA because Defects4J required that.
The idea -at that time- was that the JunitNoLogExecutor runs the test cases and returns the results (i.e. number of total executed test and number of failing/passing). The challenge was to communicate that class with the rest of Astor (i.e. the LaucherJUnitProcess). The simplest way I found and that time (but not sure if it was the best) it was that JunitNoLogExecutor prints the results on stdout and LaucherJUnitProcess parsers the output from JunitNoLogExecutor process to get the results (see here)
Sorry, the argument is Regards |
Good Morning @martinezmatias , I am gravely stuck by now 😅 Good things first: The In general I understand what's going on in the JunitExecutor, but it seems that the attributes it tries to put in do not align anymore. Usually some class is missing, that can either be a non-found test-class or a junit-dependency missing. So I fiddled with the JunitExecutor manually (try to run it with the command on console) and one thing that I noticed is the provided command tries to run single tests, as in test-methods not test-classes.
I saw that astoroutdel is set as the delimiter, but what is 221 - 1 supposed to mean? Can you have a look at the current state of the PR ? |
astor/src/main/java/fr/inria/astor/core/validation/junit/LaucherJUnitProcess.java Line 263 in bcc8463
Astor tries to run first the class(es) that include failing tests.
First of all, thanks for the many improvements introduced. The main problem is see in the PR is that it covers several issues: e.g., upgrate Gzoltar + dockerfile + fixes to be able to run on Docker. Thanks! |
@martinezmatias thanks for the quick response. |
FTR, Astor now supports GZoltar 1.7, hence the conflicts here, see master |
closing stale pull requests, thanks again @lapplislazuli |
Good Afternoon @martinezmatias ,
this is the work in progress of adding a dockerfile, however I still run into some issues that would need a second pair of eyes and are at least easily reproducible.
Changes
The current changes are:
To build run
Which takes ~5 minutes on my mac.
Occurring Errors
When running with any mode of gzoltar, it fails as gzoltar does not find suspicious code.
This behaviour is identical on my machine outside of the container and occurs for any bug I checked so far.
To produce the error, run
My supervisor ran the current version on Java8 and while failing somewhere else, gzoltar found suspicious pieces.
Could it be that gzoltar does not function (correctly) above java 8?
When running with CoCoSpoon, the process starts but terminates after 100 generations without finding a solution.
What's weird about this is that I set the generations to 3000.
To produce this error, run
I attached the logs from the runs above.
jGenProg_math280.log
jkali_math280.log
jMutRepair_math280.log
Aimed Solution
On a sidenote while working with everything, in general I would like to have 3 Docker images
Then experiments and getting started's could be easily described as docker-compose-files.