On 1/13/25 2:56 AM, Stefan Schulze Frielinghaus via Gcc wrote:
Hi everyone,

In order to better test our s390 builtins, I have been coming up with a
small tool in order to automatically generate tests.  The tool consumes
s390-builtins.def and generates currently

$ ls -1 | wc -l
4703

many files which consume

$ du -s -h .
19M     .

space in total.  Since these are so many generated files which consume
in total quite some space, I tend to not check in the files itself but
would rather like to generate those automatically whenever the s390
testsuite is run.  Generation time is negligible:

$ time ./foo.py --workdir=/gcc/src --test
./foo.py --workdir=/gcc/src --test  0.16s user 0.18s system 96% cpu 0.346 total

This has also the benefit that one cannot forget to regenerate the tests
whenever s390-builtins.def is changed.

The tool is written in python.  This in turn would mean that whoever
wants to run the s390 testsuite also needs python (and a proper version
of it).  I guess this is acceptable as long as I require a python
version which matches with gcc_cv_prog_python3_modern.

Do we have a similar setup I could try to follow in the sense that I
need to integrate the generator tool into the testsuite and have it
generate testcases automatically into some (build) directory which
dejagnu then sources?  Any pointers are highly appreciated.
We've got the ABI compatibility tests that are generated.

Peek at gcc.dg/compat/struct-layout-1.exp and see if gives you any insights. The generator in that case is C, but it might give you a structure to work within.

I'd also suggest wandering the aarch64 testsuite directory to see if it's got anything generated (particular for builtin testing).

Jeff

Cheers,
Stefan

Reply via email to