This is an archive of the discontinued LLVM Phabricator instance.

[flang] Expand coverage of co_sum unit test
ClosedPublic

Authored by rouson on Dec 21 2021, 2:55 PM.

Details

Summary

This patch makes the co_sum test more similar to the other collectives tests by

  1. Adding 'a' argument types,
  2. Varying the 'a' argument types more frequently throughout the test,
  3. Clarifying the To Do comment, and
  4. Replacing several "to be determined" error messages

Diff Detail

Event Timeline

rouson created this revision.Dec 21 2021, 2:55 PM
rouson requested review of this revision.Dec 21 2021, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2021, 2:55 PM
ktras added inline comments.Jan 5 2022, 4:28 PM
flang/test/Semantics/collectives01.f90
43

There is a trailing comma in the argument list.

ktras requested changes to this revision.Jan 6 2022, 9:16 AM

Please update some of the expected error messages as I suggest in the inline comments. Please also replace the character with ' where they exist in the expected error messages.

flang/test/Semantics/collectives01.f90
71
72
76
This revision now requires changes to proceed.Jan 6 2022, 9:16 AM
ktras added a comment.EditedJan 6 2022, 9:34 AM

This patch does a great job of expanding coverage by testing many more possibilities for correct and incorrect calls. One additional check could be to add a co_sum call which contains the optional arguments, but not the required a argument. Also, I see that you check that the intent-spec of the a argument is not being violated, but stat and errmsg also have to be intent(out) and intent(inout), respectively, and additional checks for those could be added.

rouson updated this revision to Diff 397939.Jan 6 2022, 10:58 AM
rouson marked 4 inline comments as done.
  1. Fixed on typo: removed a trailing comma.
  2. Added check for missing mandatory 'a' argument.
  3. Added test for 'stat' argument intent(out) .
  4. Added check for 'errmsg' argument intent(inout).
  5. Replaced non-standard single-quote characters.
ktras accepted this revision.Jan 19 2022, 2:48 PM

The updated patch based on feedback looks great! LGTM.

This revision is now accepted and ready to land.Jan 19 2022, 2:48 PM

I forgot to put the differential number in my commit message for commit e065570. How do I close this differential?

rouson closed this revision.Feb 2 2022, 3:32 PM