gas testsuite approch

Svein E. Seldal Svein.Seldal@solidas.com
Sun Sep 15 17:13:00 GMT 2002


Hi,

I am working on a testsuite for the tic4x target. But even before being 
able to write target-specific tests I must resolve some generic tests 
that fails on this target.

Take the all/gas.exp test, the "x930509.s" sub-test for example. This 
test is rather simple and the objective is to calculate the difference 
of two (forward) addresses. On a byte-based target, like i386, the 
result of this subtraction will be 4.

However, on a target like the tic4x, the CPU is unaware of bytes 
(sizeof(char)=sizeof(long)=1=32-bits), and will result in the value of 1 
which will make the test fail because the test expects 4.

What will be the best approach to fix this problem? Skip this specific 
test? Generally I don't like the idea to skip tests, because is lowers 
the integrety of the testsuite.

Another approach would be to rewrite the expect statements for this 
specific target, making it expect the value 1 instead of 4. But this 
would require target-specific changes to a global testfile (using 
if-then-else statements). Is this adviceable?

In general, what is the policy for cases like these? This is a specific 
case for this target, and I expect to encounter several more when I 
delve deeper into the tests. But there exists 1000 other targets with 
peculiarities like this that would require similar "hacks" to the global 
testsuits.


Regards,
Svein



More information about the Binutils mailing list