This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas testsuite approch
- From: "Svein E. Seldal" <Svein dot Seldal at solidas dot com>
- To: binutils <binutils at sources dot redhat dot com>
- Date: Mon, 16 Sep 2002 00:32:07 +0200
- Subject: gas testsuite approch
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