https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80759
--- Comment #9 from Daniel Santos <daniel.santos at pobox dot com> --- Thank you again for the assistance. (In reply to r...@cebitec.uni-bielefeld.de from comment #8) > Daniel, > > > Would you be so kind as to test this on Solaris for me please? I don't have > > access to a Solaris machine and I've never set it up before, so I wouldn't > > even > > know where to start to try to build an OpensSolaris VM. > > sure, though there's no need at all (except for the .struct part) to do > the testing on Solaris. I believe there are ready-made Solaris/x86 > VirtualBox images, though. I've found a few, so going to try them out when I get some time. Oracle even has something on their downloads. I haven't used Solaris since the early aughts. > For the multilib problem, you can easily > configure gcc for i686-pc-linux-gnu with --enable-targets=all on a > Linux/x86_64 box (with a few necessary 32-bit development packages > added), so the default multilib is non-x86_64, while the x86_64 multilib > is only used with -m64. Hmm, I seem to be having problems getting this to work. Would I configure with --target=i686-pc-linux-gnu --enable-targets=all --enable-multilib? > However, I still don't understand why you are jumping through all these > hoops in ms-sysv.exp doing the compilations etc. manually rather than > just relying on dg-runtest or similar. This would avoid all this > multilib trouble nicely, and massivly reduce ms-sysv.exp. Well quite frankly because dg-runtest, et. al. don't offer support for tests that use code generators. The generated headers using the default options are between 4.4 and 6 MiB in size and there are more things that need to be tested (-fsplit-stack to name one) that isn't tested now. I would also like to add a feature where defining an environment variable generates more comprehensive tests that I wouldn't want to run for every test (as it could take hours with --enable-checking=all,rtl). The most behaviorally similar test currently in the tree is gcc/testsuite/gcc.dg/compat/struct-layout-1.exp, which builds a generator (using remote_exec), runs the generator (remote_exec again) to generate sources for all tests and then builds and runs each test using (using compat-execute). Calls to remote_exec are not automatically parallelized. I don't fully understand how the gcc/testsuite/lib/compat.exp library works, but I'm guessing that calls to compat-execute are parallelized by dejagnu. The scheme that struct-layout-1 uses builds the generator and creates sources for all of the tests in job directory (i.e., gcc/testsuite/gcc{,1,2,3,4,5,6,etc.}/gcc.dg-struct-layout-1). They take up 1.21 MiB per job, so -j48 results in 58 MiB of space usage. My generator and generated sources are larger, and currently take about 11.65 MiB per job, so -j48 would eat 559 MiB of disk space, even though there are only 6 tests at the moment. This could be mitigated if there was a way to build and run the generator only once and have the output go to a directory shared across jobs, but I'm not yet aware of any such existing mechanism. This doesn't mean that my approach is the only solution. In fact, I built this with Mike Stump's counsel and later discovered that when I ran multiple jobs, each test was run once per job, so -j8 would run all of the tests 8 times, rather than split them apart! That's when I added the parallelization scheme. So if you have some better ideas on how to accomplish this then please do present them. Or maybe I'm misunderstanding something about the way dg-runtest, gcc_target_compile, etc. work in relation to parallelism? My understanding is that if I use them in succession for a single test run (i.e., build the generator, run the generator, build & run the test) that they could end up being run on different jobs and then fail. > One or two nits about PR management, btw.: it is good practice to take > the PR if you're working on it. And just add the URL to the patch > submissing into the URL field. > > Thanks. > > Rainer I very much appreciate hints and guidance about proper PR management, coding standards, etiquette, procedures, norms, etc.! I'm still pretty new to this project but I find it really enjoyable. However, I don't seem to have the privileges to change those fields. Do I need to seek advanced privileges from somebody?