-
Notifications
You must be signed in to change notification settings - Fork 350
[Fortran/gfortran] Enable passing tests #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you @tarunprabhu for doing this update! My update for polymorphism in the regression tests match yours, I triaged the remaining 40 tests that were under the polymorphism TODO and do not pass. I will move them to appropriate categories once you merged this. However, I am seeing 63 failures in other areas when running your patch, I think most of them (61) are related to tests that expect runtime errors, that flang correctly raise, but the test suite does not expect the error (e.g: regression/maxloc_bounds_3.f90). I attached the full list of these 61 tests runtime_error_failures.txt. I also have a two more failures (regression/quad_1.f90 and regression/ieee/ieee_9.f90) because my build did not use libquadmath (the support for using it was recently added and is optional if not available on the system). I would advise not enabling them unconditionally and to add a test suite option to conditionally enable/disable such tests relying on quad math library (FLANG_RUNTIME_F128_MATH_LIB). |
A few tests are failing for me on aarch64 with optimization: Compile failure ( Three runtime failures:
|
@jeanPerier, thanks for trying this out. what options do you use to configure flang and the test suite? I see 11 failures on my end, not 61. I can just disable the 61 tests in your list, so we can get this merged in, but I'd prefer to take a closer look at the failures before I do so.
|
I could still reproduce my 61 failures with today's flang, here is my config where FLANG_DIR/LIT_DIR is just my llvm build directory (release build on X86-64):
I am missing some option here? |
This is odd. It looks pretty straightforward to me. The only difference between this and my configure line is that I don't explicitly specify the I tried with @AlexisPerry, could you run the tests with your build. The latest commits in this PR should address the AArch64 failures, but I would like to see what someone else with a (possibly) different build configuration on X86 gets. |
I have a pretty vanilla build of flang and llvm-test-suite and I'm still getting errors building the tests:
and
|
These are not part of the Fortran tests. You can add the following to your configure line to build only the Fortran tests and ignore the rest.
|
@tarunprabhu, I think I found the issue. the To be more specific, it seems my std::system returns 34304 in this case for which WEXITSTATUS is 134 and WSTOPSIG is 0 (which is what the utility expect to be different from zero when --crash is provided). I am building on an ubuntu machine with libc version 2.35. llvm-not works for me. And if I change the "not" code to use the APPLE path with spawn and wait, "not" also works for me. Except that in both case I see only 3 failures, which is less than expected because segfaults are considered a pass by "not" in bounds checking test, while the test intends to check for a clean abort with an error message (this may be the reason why you are seeing different number of failures in debug vs release, in release mode, some of the bad code causing segfaults may be "optimized out" causing not to complain that the test did not fail). I think we should not consider segmentation faults a pass in an xfail test.
All that to say:
|
I think this is UBUNTU specific. It looks like they have a modified glibc and that std::system does not return the "usual" return codes, but instead a code that is shifted by 8 bits. I could reproduce on all 5 different ubuntu systems I could get a hand on (with ubuntu version 18, 20 and 22), but I could not reproduce on any other linux distributions I tried. Could anyone else with an ubuntu machine try to reproduce? Maybe it would be safer to stay away from std::system (that calls sh) when possible (llvm not uses spwan or exec/fork under the hood via LLVM sys library in https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/Unix/Program.inc). |
Thanks a lot for the investigation, Jean. That was very helpful. I think it is safer to disable all 61 tests so we don't encounter failures on Ubuntu machines while I fix the |
After some reconfiguring, I am now able to build and run the tests. I get 174 failures, and am digging into the details now. |
Ok, 172 of them seem to be that flang-new produces a "Fortran STOP" in the output file that is not in the reference output file. gfortran-regression-execute-regression__random_3_f90.test produces the error
gfortran-regression-execute-regression__where_2_f90.test produces the error
|
This is needed by the FCVS tests. This is documented somewhere but I can't seem to find it now. |
Thank you. That takes care of the bulk of the failures I see. Now I only get the aforementioned other two. |
These tests now pass. There are some tests that only pass on certain platforms, so they are left disabled.
b50b9df
to
eb32c2f
Compare
@tblah, @jeanPerier, @AlexisPerry Could you run this again and ensure that all tests pass? I have disabled a number of tests that you have identified as failing on various platforms and configurations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All pass for me, thanks for your work on this.
Please wait for confirmation from everyone else before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed: 6205 (100.00%) on my Ubuntu machine.
Thanks @tarunprabhu for addressing my comments and enabling these tests!
Passed 5184 (100%) on my node. LGTM! |
Thanks @AlexisPerry, @jeanPerier and @tblah for the reviews and for checking. |
These tests now pass. There are some tests that only pass on certain platforms, so they are left disabled.