[CS-FSLUG] off topic? gcc help

Tim Young Tim.Young at LightSys.org
Mon Jul 19 08:33:24 CDT 2010


  Sorry my response below was so cryptic. I was needing to run off to 
do some stuff and wanted to at least get that information out there 
before I ran out the door. I will have to run in and out a few times 
today, and will probably just send the half-finished emails as I am 
doing so.

Basically, runtest uses "expect." Expect is a tool that is 
"expecting" certain results, and knows how to respond when it finds 
what it is looking for. For example, I have written telnet expect 
scripts that will log into my DSL modem and reset it if it is down. 
My script opens a telnet session, waiting for a username prompt. When 
it gets a username prompt, it sends the username. It does the same 
for the password, and then does some more tinkering to see what the 
status of the connection is.

In the case of the testing tools, it compiles the code for check-gcc, 
and executes the stuff, expecting certain results. If it gets the 
results it is looking for, "Yay." Otherwise, it lets you know that too.

I am not quite sure where TCL comes into play, but since runtest asks 
for that too, you will need to have it.

Ok. So where do you go from here?
This is half from memory. Sadly I am running around enough not to 
have time to set up a test scenario and do a trial-run for you. That 
would make things a lot smoother for you if I did that. :(

I am assuming you are on your OS on your small CPU. And that you have 
copied the GCC that you were given over to that OS.
First of all, you need to successfully configure gcc.
Have you run the ./configure with all the flags and gotten 
./configure to finish without errors?

Finding expect and tcl for your platform may be difficult. You may 
need to download them like you did for gcc. runtest does have some 
capabilities to run telnet and ssh. So you may be able to have 
expect/tcl on a different box. I have not looked too deeply into that.

Then, from your CPU/OS you will want to try to run "make check-gcc" 
and see what happens.

- Tim Young

On 7/19/2010 6:46 AM, Tim Young wrote:
> Well, looking at DejaGnu more, it looks like the runtest actually 
> does the compiling, running, and verification of the results. I did 
> not actually see what tests were for gcc.
>
> runtest needs "expect" and "tcl."
>
> and you also have: (http://gcc.gnu.org/install/test.html)
>
>
> /How can you run the testsuite on selected tests?/
>
> /In order to run sets of tests selectively, there are targets `make 
> check-gcc' and `make check-g++' in the gccmake check' in a 
> subdirectory of the object directory. / subdirectory of the object 
> directory. You can also just run `
>
> /A more selective way to just run all gcc execute tests in the 
> testsuite is to use /
>
> / make check-gcc RUNTESTFLAGS="execute.expother-options"
> /
>
> /Likewise, in order to run only the g++ “old-deja” tests in the 
> testsuite with filenames matching `9805*', you would use /
>
> / make check-g++ RUNTESTFLAGS="old-deja.exp=9805*other-options"
> /
>
> /The *.exp files are located in the testsuite directories of the 
> GCC source, the most important ones being compile.exp, execute.exp, 
> dg.exp and old-deja.exp. To get a list of the possible *.exp files, 
> pipe the output of `make check' into a file and look at the 
> `Running ... .exp' lines. /
>
> / /- Tim Young/
> /
> On 7/16/2010 12:57 PM, warm38 at juno.com wrote:
>> On Fri, 16 Jul 2010 12:00:01 -0500 christiansource-request at ofb.biz 
>> <mailto:christiansource-request at ofb.biz> writes:
>> > Date: Thu, 15 Jul 2010 14:58:37 -0500
>> > From: Tim Young <Tim.Young at LightSys.org 
>> <mailto:Tim.Young at LightSys.org>>
>> > To: "A Christian virtual Free Software and Linux Users Group."
>> > <christiansource at ofb.biz <mailto:christiansource at ofb.biz>>
>> > Subject: Re: [CS-FSLUG] off topic? gcc help
>> > Message-ID: <4C3F686D.2000801 at LightSys.org 
>> <mailto:4C3F686D.2000801 at LightSys.org>>
>> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> >
>> > Well, I think you may get a number of different answers to your
>> > question. I think there are a number of ways to go from here, and
>> > different ways to do it.
>> I go to
>> http://wiki.osdev.org/GCC_Cross-Compiler
>> and
>> http://gcc.gnu.org/install/build.html
>> http://gcc.gnu.org/install/test.html
>> http://gcc.gnu.org/simtest-howto.html
>> to learn how to
>> 1 build a cross compiler for a tiny 8-bit processor (2k 
>> instructions, 32 bytes of RAM)
>> 2 run the gcc compiler tests (gcc-4.4.3/gcc/testsuite) for 
>> compiler verification/regression testing
>> 3 automating the run of the executables generated by the 
>> cross-compiler in a simulator
>> I was given a simulator that only runs under cygwin (linus/bash on 
>> winXP).
>> I am unable to build the cross-compiler on cygwin. I JUST now 
>> tried to build it on Ubuntu 10.04.
>> It bombed at exactly the same place as cygwin while doing a make:
>> ----------
>> *** BFD does not support target xxx-unknown-none.
>> *** Look in bfd/config.bfd for supported targets.
>> ----------
>> Building the cross-compiler looks like it is the place where it 
>> also builds the testsuite. I may be wrong, but I'm trying to find 
>> SOME clue as to how to run DejaGnu (runtest) against the gcc 
>> testsuite. I HAVE NO CLUE.
>>
>> > runtest assumes that you already have a number of tests all set up
>> > and ready to go. If so, you will need to know the directories where
>> >
>> > those tests are, etc. So a question: Have you been given a number
>> > of
>> > tests to run?
>> Yep, I am supposed to come up with some code for Regression 
>> testing the brand new C compiler.
>> It is supposed to check out all aspects of the Compiler. It cant 
>> do long, float, double nor arrays bigger than 32 bytes. And no 
>> libraries that would blow the 2K instruction limit.
>>
>> > If you have not been given tests, do you have much information 
>> about
>> >
>> > how thoroughly you need to test the gcc compiler? If all you need
>> > is
>> > to know that it can compile something very simple, then we just 
>> need
>> Hello world comes out to be 346 instructions. Now to test:
>> 1. Recursive function calls (to test 'call stack'-related 
>> functionality)
>> 2. Pointers
>> (a) Array-pointer interchangeability
>> (b) Type casting
>> (c) Function arguments
>> 3. typedef
>> 4. multi-dimensional arrays
>> 5. Statements:
>> (a) switch (including nested switch)
>> (b) do/while
>> (c) goto, break, continue
>> (d) for (includes tests for exclusion of the initialization, test, 
>> and update parts of the for statement)
>> 6. Structures (accessing members of structures, operations on 
>> members, pointers to structures)
>> 7. Returning Arrays (as static array or pointer-based function 
>> argument)
>> 8. Preprocessor
>> (a) Macro definition and expansion for simple values and 
>> function-like macros)
>> (b) Variadic Macros
>> (c) Conditional inclusion
>> 9. Variable-length argument lists
>> 10. Special keywords (const, volatile, extern, inline, sizeof, 
>> static)
>> 11. Operators:
>> (a) Arithmetic (+, -, *, /, %)
>> (b) Boolean (!, &&, ||)
>> (c) Bitwise (~, &, |, ^, >>, <<)
>> (d) Referencing and dereferencing (related to pointer manipulation)
>> (e) Conditional evaluation
>> (f) Member selection (for structures, unions, pointer-based, etc)
>> 12. Nests:
>> (a) Loops
>> (b) Function calls
>> (c) Preprocessor Macros
>> (d) Structures
>> 13. Interrupt handling
>>
>> > to give you some simple C code and have you compile a "Hello
>> > World".
>> >
>> > If none of these make sense, can you just ramble a bit more about
>> > what you need to do with gcc? Is this for a class? What platform
>> It is for a JOB that I am woefully inadequate for, I am finding out.
>> I have 2 weeks to get it done. 8-b
>> (And it took me a week just to get a working compiler, but not by 
>> building it, it was sent to me -- they did it but I cannot using 
>> their instructions, not on cygwin and not on ubuntu. <gag><choke>)
>>
>> > are you doing this on? Is there an end goal, like needing to
>> > compile
>> > a program that already exists?
>> Well, the testsuite code already exist, IF I can use it, otherwise 
>> I'll have to come up with a pile on my own.
>> Thanks for the encouragement by at least responding.
>>
>> > - Tim Young
>> >
>> > On 7/15/2010 1:52 PM, warm38 at juno.com <mailto:warm38 at juno.com> 
>> wrote:
>> > > My Linux bash scripting is old, and I've never built gcc (well,
>> > years
>> > > ago I built gcc for the 68HC1x), but now I gotta test a port of
>> > the gcc
>> > > compiler.
>> > >
>> > > I know that "runtest" is involved, but no clue how to set it 
>> up to
>> > run.
>> > >
>> > > Anyone out there willing to help me get started? Or at least give
>> > me a
>> > > pointer where I can get help?
>> > > (gcc.org answer is Read The Freaking Manual and I have read the
>> > online
>> > > docs, but I'm not speaking the same language and there are a LOT
>> > of
>> > > assumptions they make that leave me clueless).
>> > >
>> > > I'm mail bombing anyone with more than ten cents worth of
>> > knowledge about
>> > > computers, especially of the Linux variety.
>> > >
>> > > wade
>>
>>
>> ____________________________________________________________
>> *Penny Stock Jumping 2000%*
>> Sign up to the #1 voted penny stock newsletter for free today!
>> <http://thirdpartyoffers.juno.com/TGL3142/4c409e09f2781356970st01vuc>AwesomePennyStocks.com 
>> <http://thirdpartyoffers.juno.com/TGL3142/4c409e09f2781356970st01vuc>
>>
>>
>> _______________________________________________
>> ChristianSource FSLUG mailing list
>> Christiansource at ofb.biz
>> http://cs.uninetsolutions.com
>
> _______________________________________________
> ChristianSource FSLUG mailing list
> Christiansource at ofb.biz
> http://cs.uninetsolutions.com
>




More information about the Christiansource mailing list