[M3devel] "exact codegen" testing

Jay K jay.krell at cornell.edu
Sun Jul 4 02:03:05 CEST 2010


m3-sys/m3tests now has infrastructure for "exact codegen" testing.


An interesting thing I just realized, is that it is, well, it is trivial.
And it is applicable to any test.
If the "expected" directory exists, then it gets compared.
  Now, probably in such cases you want to "trim" the code some, such as by turning off or reducing symbols.


This can be used for cross builds -- since assembly is what cross builds produce on the host, and
assembly is what this looks at.


Probably then what is needed is a script to loop through all architectures and update
whichever tests have checked in assembly.
Or a two step, produce them all, present diff to human, update them all.


There is a temporary problem right now that I made the "c" tests run.
They include one with an infinite loop.

I'll undo that now.

"p" tests are now subtely redefined.
Previously: Programs whose output is interesting or for which running them is interesting.
Now: "code" tests that are safe to run (ie. they need not do anything), i.e should always
be built and run, even if running them doesn't do anything interesting, building them does.

I'll move c135 to be a "p" test.

c135 should probably be expanded further.
Specifically with the goal of covering every single M3CG_Op and every boolean parameter combination thereof.
  i.e. extract with sign extend both true and false, though for example extract_n(sign_extend=true) is never
  used by the frontend. Iterating through integer values can't be done for all values, but booleans can be.

There's still a fair amount missing.
Though other tests and building the system itself should provide much/all of it.


 - Jay
 		 	   		  


More information about the M3devel mailing list