Thursday, September 2, 2010

Testsuite for gcc-2.95.3

I was supposed to run the gcc testsuite for verifying the gnu toolchain we are maintaining. The gcc version we use is a very old one (gcc-2.95.3). To my surprise, I found that the testsuite folder of gcc-2.95.3 is empty. I checked the previous versions of gcc-2.95.3 (gcc-2.9.2, gcc-2.9.2.1) also. Those versions has a folder for testsuite under gcc-2.95.x.x/gcc. But there is no test files within it.

On surfing, I found that during the time of gcc-2.95, testsuites weren't part of the release. They have used the c-torture testsuite which was maintained separately from gcc. Only from gcc-3.0 the testsuites are part of the gcc release.


And the tests with gcc-3.0 cannot be used for the versions earlier to it. This is because, from version 3.0 gcc conforms to c99 specification. Versions earlier to it don't follow the c99 specification. So, many tests written for gcc-3.0 would fail for the versions earlier to it. For example, tests with gcc-3.0 may fail for gcc-2.95.3 since it (2.95.3) doesn't follow c99 specification.


So for testing gcc-2.95.3, I used the c-torture testsuite which were once used for gcc-2.95. The c-torture testsuite itself has the scripts to run the tests. The readme file explains on running the tests. For cross compilers, the script to run the executable tests should be modified to generate the binaries of the tests. Then the binaries shall be loaded into the appropriate system for execution.

No comments: