This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testsuite for avr-as


On Mon, Dec 06, 2004 at 08:11:45PM -0500, Hans-Peter Nilsson wrote:
> On Tue, 7 Dec 2004, Erik Christiansen wrote:
> > a) Preferred method for generating .d files.
> 
> Method?  Hah!  The output of either objdump or readelf
> redirected, then inspected for sanity and edited to regexpify
> the contents.

Your one sentence is more valuable than the whole DejaGNU manual, at the
moment. Digesting that edifice, in order merely to comprehend the
permissible .d grammar, is a steep climb.

We were wondering how best to handle permissible variability in the
output. You've answered that question too!   :-)

> > b) Rather than further develop our existing prototype test engines, what
> >    script does binutils use to bang through the .s/.d pairs?
> 
> Something tells me you're not aware how the DejaGNU-based
> testsuite (usually) works.  Build binutils, then run "make -k
> check" and watch DejaGnu load and execute the various .exp files
> and run whatever is said there, usually using stuff from the
> installed DejaGnu and gas/testsuite/gas/lib.  (You can do this
> for AVR if you want; some tests are generic.)

I tried running "make -k check" in my obj-avr/, to see if anything
interesting happened. It was kind enough to create a new site.exp file.
Now I just need to figure out how to connect that to our .s/.d pairs,
rather than hare off after " build_triplet i686-pc-linux-gnu", etc.
(A bit of RTFM should help, in time.)

But for a start, your simplest case may suffice:

[snip]

> Sometimes you want to just check that the assembly listing looks
> about right.  See gas/testsuite/gas/mmix/mmix-list.exp.
> Usually the test iterates over ".l" files.

Some quick results, using DejaGnu-compatible .s/.d pairs, would be very
motivating, so I'm even tempted to refresh my TCL acquaintance, and try
just running them through "regexp_diff", once I figure out whether it's
a built-in, or we have to borrow it from one of the scripts.

To bash through a slab of .s/.d pairs for an assembler, which should
give very consistent output, regexp_diff and our 8-line bash script
would do the job, I suspect. Once some more test cases are happening,
the layers of DejaGnu flexibility-providing obfuscation could then be a
second step.

Thanks very much for your help!

Erik


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]