This is an archive of the discontinued LLVM Phabricator instance.

[Flang][test] Don't set PATH in flang/test/Semantics/common.sh
ClosedPublic

Authored by ro on Apr 21 2020, 3:03 AM.

Details

Summary

Currently, many Flang :: Semantics tests FAIL on Solaris. The failure mode is always the
same:

actual at 67: Name in ALLOCATE statement must be a variable name
expect at 67: ERROR: Name in ALLOCATE statement must be a variable name

It turns out the issue is twofold here:

  • The awk script embedded in flang/test/Semantics/common.sh uses a string value for FS, which isn't supported by traditional awk as documented in the GNU autoconf manual.
    • Even though /usr/gnu/bin (with gawk installed as awk) is in my build environment's PATH, still /bin/awk is used

Although the proper fix would probably be to avoid the unportability, it's easy to avoid it for now.
common.sh above is the only script in the whole tree that for unknown reasons overrides
PATH to /usr/bin:/bin, unnecessarily creating this mess in the first place. Just
removing that setting easily avoids the issue.

Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11. Ok for master?

Diff Detail

Event Timeline

ro created this revision.Apr 21 2020, 3:03 AM
Herald added a project: Restricted Project. · View Herald Transcript
DavidTruby accepted this revision.Apr 21 2020, 5:11 AM

LGTM, I'm not sure why setting path here would be necessary

This revision is now accepted and ready to land.Apr 21 2020, 5:11 AM
This revision was automatically updated to reflect the committed changes.