[flang-commits] [flang] dfa7f4c - [flang][test] Adjust Driver/pass-plugin-not-found.f90 error message

Rainer Orth via flang-commits flang-commits at lists.llvm.org
Thu Nov 24 07:21:21 PST 2022


Author: Rainer Orth
Date: 2022-11-24T16:20:33+01:00
New Revision: dfa7f4ca8b6054c6148a14fd23bf400782136fda

URL: https://github.com/llvm/llvm-project/commit/dfa7f4ca8b6054c6148a14fd23bf400782136fda
DIFF: https://github.com/llvm/llvm-project/commit/dfa7f4ca8b6054c6148a14fd23bf400782136fda.diff

LOG: [flang][test] Adjust Driver/pass-plugin-not-found.f90 error message

The `Driver/pass-plugin-not-found.f90` test `FAIL`s on Solaris since part
of the error message differs from what the test expects: Solaris has

  error: unable to load plugin 'X.Y': 'Could not load library 'X.Y':
ld.so.1: flang-new: X.Y: open failed: No such file or directory'

while the test expects

  error: unable to load plugin 'X.Y': 'Could not load library 'X.Y': X.Y:
cannot open shared object file: No such file or directory'

The last part is emitted by the system `dlerror` and is thus unportable.
Hopefully the error text itself is the same everywhere.

The following patch adjusts the expected message accordingly.

Tested on `x86_64-pc-linux-gnu` and `amd64-pc-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D138663

Added: 
    

Modified: 
    flang/test/Driver/pass-plugin-not-found.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/pass-plugin-not-found.f90 b/flang/test/Driver/pass-plugin-not-found.f90
index a93567af64672..c0a5672fdb743 100644
--- a/flang/test/Driver/pass-plugin-not-found.f90
+++ b/flang/test/Driver/pass-plugin-not-found.f90
@@ -5,4 +5,5 @@
 ! RUN: not %flang -fpass-plugin=X.Y %s 2>&1 | FileCheck %s --check-prefix=ERROR
 ! RUN: not %flang_fc1 -emit-llvm -o /dev/null -fpass-plugin=X.Y %s 2>&1 | FileCheck %s --check-prefix=ERROR
 
-! ERROR: error: unable to load plugin 'X.Y': 'Could not load library 'X.Y': X.Y: cannot open shared object file: No such file or directory'
+! The exact wording of the error message depends on the system dlerror.
+! ERROR: error: unable to load plugin 'X.Y': 'Could not load library 'X.Y': {{.*}}: No such file or directory'


        


More information about the flang-commits mailing list