[flang-dev] [EXTERNAL] flang test questions

Kiran Chandramohan via flang-dev flang-dev at lists.llvm.org
Wed Jul 21 05:24:50 PDT 2021


I believe, Pat and Damian are talking about execution tests for Fortran intrinsics. While these are not testing the intermediate representations, these are unit-tests that only apply to Flang. And when we make changes to the compiler, it will be good to test (with check-flang) that they pass. I don't know what is the framework that is being chosen for running these tests, but for the trivial cases, we do not need CMake. There are already end-to-end tests running in the fir-dev branch. https://github.com/flang-compiler/f18-llvm-project/blob/fir-dev/flang/test/Lower/end-to-end-character-assignment.f90

--Kiran
________________________________
From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of Andrzej Warzynski via flang-dev <flang-dev at lists.llvm.org>
Sent: 21 July 2021 09:35
To: McCormick, Pat <pat at lanl.gov>; Damian Rouson <rouson at lbl.gov>
Cc: via flang-dev <flang-dev at lists.llvm.org>
Subject: Re: [flang-dev] [EXTERNAL] flang test questions

I agree with Pat. For me, anything that tests one of Flang's internal
representations (parse-tree, FIR, LLVM IR) or the generated diagnostics,
belongs somewhere within flang/test (i.e. with other regression tests).
I always run all of them (ninja check-flang) when developing a patch. I
rarely use the test-suite. Not sure about the others. Btw, LLVM's
test-suite requires CMake support, which we don't have. But perhaps I'm
missing something here!

As for the actual location for new tests, I've just submitted a patch to
move all of regression tests for lowering the intrinsics into
f18-llvm-project/flang/test/Lower/intrinsic-procedures [1]. These tests
only look at FIR. We may want a different directory for LLVM IR. It
would be very nice to keep all tests for intrinsics in sync :)

Thanks for working on this!

-Andrzej

[1] https://github.com/flang-compiler/f18-llvm-project/pull/927/

On 20/07/2021 16:17, McCormick, Pat via flang-dev wrote:
> Hi Damian,
>
> For a bit broader visibility…
>
> We recently added a (temporary?) directory for intrinsic tests under
> "flang/test/Intrinsics” but we still need to decide how to best
> integrate it into the testing infrastructure.  For now, my vote would be
> that it is OK to land your tests there and we can then decide where
> these tests should live in the long run.  Personally, I think the
> intrinsic specific details (both lowering and “correctness") make a bit
> more sense as part flang's testing vs. rolling them all the way up to
> the llvm  level.  But that’s just my take — others should chime in if
> there is a better path…
>
> —Pat
>
>
>
>> On Jul 20, 2021, at 2:02 AM, Damian Rouson via flang-dev
>> <flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>> wrote:
>>
>>
>>
>> On Mon, Jul 19, 2021 at 11:30 PM Kiran Chandramohan
>> <Kiran.Chandramohan at arm.com <mailto:Kiran.Chandramohan at arm.com>> wrote:
>>
>>
>>     >>Am Di., 13. Juli 2021 um 14:59 Uhr schrieb Damian Rouson via flang-dev
>>     >><flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>>:
>>     >>> I'm getting started with writing tests for flang and have a few questions. First, would you recommend contributing tests to the llvm-test-suite repository at https://github.com/llvm/llvm-test-suite?
>>     <https://github.com/llvm/llvm-test-suite?>
>>
>>     > Yes, I think the llvm-test-suite should feature more Fortran tests.
>>     > See the documentation at [1] and [2] as an example for how tests are
>>     > added. For instance, NASA Advanced Supercomputing Parallel Benchmarks
>>     > [3] could be added.
>>
>>     If these are tests for Fortran intrinsics then wouldn't the better
>>     place be somewhere in the flang directory? Like in unit-tests or
>>     something?
>>
>>
>> After some discussion offline, I decided to put the tests in the LLVM
>> repository -- presumably the flang directory -- instead of in
>> llvm-test-suite.
>>
>> Damian
>> _______________________________________________
>> flang-dev mailing list
>> flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
>> <https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev>
>
>
> _______________________________________________
> flang-dev mailing list
> flang-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
>
_______________________________________________
flang-dev mailing list
flang-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20210721/31df6124/attachment-0001.html>


More information about the flang-dev mailing list