[lld] r261682 - Use a different error in test.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 15:38:27 PST 2016


"No such file or directory" part of the error message is system-dependent
because (I believe) it is what strerror returned. It is probably better to
remove ": No such file or directory" from this test.

On Tue, Feb 23, 2016 at 12:36 PM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: rafael
> Date: Tue Feb 23 14:36:20 2016
> New Revision: 261682
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261682&view=rev
> Log:
> Use a different error in test.
>
> This opens the way for -r being implemented.
>
> Modified:
>     lld/trunk/test/ELF/invalid-linkerscript.test
>
> Modified: lld/trunk/test/ELF/invalid-linkerscript.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid-linkerscript.test?rev=261682&r1=261681&r2=261682&view=diff
>
> ==============================================================================
> --- lld/trunk/test/ELF/invalid-linkerscript.test (original)
> +++ lld/trunk/test/ELF/invalid-linkerscript.test Tue Feb 23 14:36:20 2016
> @@ -9,46 +9,46 @@
>
>  # RUN: mkdir -p %t.dir
>
> -## Note that we are using "-r option is not supported" as a marker
> -## that the linker keep going when it found an error. That specific
> +## Note that we are using "cannot open no-such-file: No such file or
> directory"
> +## as a marker that the linker keep going when it found an error. That
> specific
>  ## error message is not related to the linker script tests.
>
>  # RUN: echo foobar > %t1
> -# RUN: not ld.lld -r %t1 2>&1 | FileCheck -check-prefix=ERR1 %s
> +# RUN: not ld.lld %t1 no-such-file 2>&1 | FileCheck -check-prefix=ERR1 %s
>  # ERR1: unknown directive: foobar
> -# ERR1: -r option is not supported
> +# ERR1: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "foo \"bar" > %t2
> -# RUN: not ld.lld -r %t2 2>&1 | FileCheck -check-prefix=ERR2 %s
> +# RUN: not ld.lld %t2 no-such-file 2>&1 | FileCheck -check-prefix=ERR2 %s
>  # ERR2: unclosed quote
> -# ERR2: -r option is not supported
> +# ERR2: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "/*" > %t3
> -# RUN: not ld.lld -r %t3 2>&1 | FileCheck -check-prefix=ERR3 %s
> +# RUN: not ld.lld %t3 no-such-file 2>&1 | FileCheck -check-prefix=ERR3 %s
>  # ERR3: unclosed comment
> -# ERR3: -r option is not supported
> +# ERR3: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "EXTERN (" > %t4
> -# RUN: not ld.lld -r %t4 2>&1 | FileCheck -check-prefix=ERR4 %s
> +# RUN: not ld.lld %t4 no-such-file 2>&1 | FileCheck -check-prefix=ERR4 %s
>  # ERR4: unexpected EOF
> -# ERR4: -r option is not supported
> +# ERR4: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "EXTERN (" > %t5
> -# RUN: not ld.lld -r %t5 2>&1 | FileCheck -check-prefix=ERR5 %s
> +# RUN: not ld.lld %t5 no-such-file 2>&1 | FileCheck -check-prefix=ERR5 %s
>  # ERR5: unexpected EOF
> -# ERR5: -r option is not supported
> +# ERR5: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "EXTERN xyz" > %t6
> -# RUN: not ld.lld -r %t6 2>&1 | FileCheck -check-prefix=ERR6 %s
> +# RUN: not ld.lld %t6 no-such-file 2>&1 | FileCheck -check-prefix=ERR6 %s
>  # ERR6: ( expected, but got xyz
> -# ERR6: -r option is not supported
> +# ERR6: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "INCLUDE /no/such/file" > %t7
> -# RUN: not ld.lld -r %t7 2>&1 | FileCheck -check-prefix=ERR7 %s
> +# RUN: not ld.lld %t7 no-such-file 2>&1 | FileCheck -check-prefix=ERR7 %s
>  # ERR7: cannot open /no/such/file
> -# ERR7: -r option is not supported
> +# ERR7: cannot open no-such-file: No such file or directory
>
>  # RUN: echo "OUTPUT_FORMAT(x y z)" > %t8
> -# RUN: not ld.lld -r %t8 2>&1 | FileCheck -check-prefix=ERR8 %s
> +# RUN: not ld.lld %t8 no-such-file 2>&1 | FileCheck -check-prefix=ERR8 %s
>  # ERR8: unexpected token: y
> -# ERR8: -r option is not supported
> \ No newline at end of file
> +# ERR8: cannot open no-such-file: No such file or directory
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160223/4d7d4395/attachment.html>


More information about the llvm-commits mailing list