This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Run test-suite with flang-new
ClosedPublic

Authored by rovka on Jul 27 2022, 5:22 AM.

Details

Summary

At the moment, clang-aarch64-full-2stage is running the
llvm-test-suite with flang-to-external-fc, which is a wrapper script
involving both flang and gfortran.

This patch switches to using the flang-new driver, therefore removing
our dependence on gfortran.

However, support for generating executables with flang-new is still
experimental and needs a few flags to help it along.

Furthermore, we need an environment variable when running the
test-suite (https://flang.llvm.org/docs/FortranLLVMTestSuite.html#:~:text=to%20set%20the-,NO_STOP_MESSAGE,-environment%20variable%20to).

Diff Detail

Event Timeline

rovka created this revision.Jul 27 2022, 5:22 AM
Herald added a project: Restricted Project. · View Herald Transcript
rovka requested review of this revision.Jul 27 2022, 5:22 AM

so it would be nice if we could source this from the worker instead (I don't know how to do that).

So that you don't have to make a change to zorg each time one is fixed? I'm sure it's possible but it's probably more trouble than it's worth vs. waiting for a change to zorg to make it's way to the bot.

You could make the filter list in the test suite instead. I did one a while back that was based on a flag being supported https://github.com/llvm/llvm-test-suite/commit/9fb1916e98466baa2677f32b61626b03afc978a7, maybe you can get a "is llvm flang" check in there.

Also why exactly is NO_STOP_MESSAGE needed? I guess fortran tests do some stdout comparison and this would otherwise print a line that gets in the way.

I'm not sure where but it would be worth noting that running the test suite like this requires a build of libpgmath and cmake >= 3.24.

I think we (Linaro) are the primary (if not only) people running it but even we will forget at some point.

rovka planned changes to this revision.Jul 27 2022, 5:52 AM

@DavidSpickett You're right, it's probably better to put the list in the test-suite. I'll update accordingly.

Also why exactly is NO_STOP_MESSAGE needed? I guess fortran tests do some stdout comparison and this would otherwise print a line that gets in the way.

Yep, that's exactly it :) This is documented here.

Hi Diana,

You decided to put the filter list in the test-suite, so this is just for the sake of completeness.

Since you plan to fix those failing tests in the very near future, you may want to either leave them failing and fix them while the builder is in the staging, or set the LIT_FILTER_OUT envvar for your build-worker account locally on that machine.

Setting it locally for the bot account environment is a straightforward, it will be listed in the envvars in the buildbot, and you will be able to change it easily without circling changes to zorg.

it will be listed in the envvars in the buildbot

This is good to know, my worry with setting it locally was I thought you'd have to have access to the bot itself to see the value.

@DavidSpickett You're right, it's probably better to put the list in the test-suite. I'll update accordingly.

Also why exactly is NO_STOP_MESSAGE needed? I guess fortran tests do some stdout comparison and this would otherwise print a line that gets in the way.

Yep, that's exactly it :) This is documented here.

Perhaps worth adding a comment somewhere so that the rationale for this is clearer (either in the code or in the commit message).

zorg/buildbot/builders/ClangBuilder.py
512

What's this flag for? libpgmath?

rovka updated this revision to Diff 448532.Jul 29 2022, 12:33 AM
rovka edited the summary of this revision. (Show Details)

Updated after review comments. Thanks!

zorg/buildbot/builders/ClangBuilder.py
512

No, this is actually not needed anymore, I'll remove it (IIRC when I started experimenting with this, the runtime libraries weren't being properly installed, but I fixed that in the meantime). Thanks for catching this!

This revision is now accepted and ready to land.Jul 29 2022, 10:17 AM
This revision was landed with ongoing or failed builds.Aug 3 2022, 3:08 AM
This revision was automatically updated to reflect the committed changes.
rovka added a comment.Aug 17 2022, 4:58 AM

Hi Galina,

I think the staging buildmaster got restarted after this change, but not the production one. Could you please restart the production buildmaster when you get a chance?

Thanks!