There are two slightly different ways to add a test case. One is to add the test case to an existing directory. The other is to create a new directory to hold your test. The existing test directories represent several styles of testing, all of which are slightly different. Examine the testsuite subdirectories for the tool of interest to see which approach is most suitable.
Adding a GCC test may be very simple: just add the source file to any test directory beginning with gcc. and it will be tested on the next test run.
Adding a test by creating a new directory involves: