[llvm] 99e1b0d - [llvm-ar] Update error messages and tests as per latest preferred style

Galina Kistanova via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 11:48:45 PDT 2020


 Hello Shoaib,  Sameer,

This commit broke test on the lld freebsd builder:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd
. . .

******************** TEST 'LLVM ::
tools/llvm-ar/error-opening-directory.test' FAILED
********************
Script:
--
: 'RUN: at line 1';   rm -rf
/usr/home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/test/tools/llvm-ar/Output/error-opening-directory.test.tmp
&& mkdir -p /usr/home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/test/tools/llvm-ar/Output/error-opening-directory.test.tmp
: 'RUN: at line 4';   mkdir -p
/usr/home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/test/tools/llvm-ar/Output/error-opening-directory.test.tmp/tmpDir
: 'RUN: at line 5';   not
/home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/bin/llvm-ar p
/usr/home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/test/tools/llvm-ar/Output/error-opening-directory.test.tmp/tmpDir
2>&1 |     /home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/bin/FileCheck
/usr/home/buildbot/as-bldslv5/lld-x86_64-freebsd/llvm-project/llvm/test/tools/llvm-ar/error-opening-directory.test
--check-prefix=IS-DIR
-DARCHIVE=/usr/home/buildbot/as-bldslv5/lld-x86_64-freebsd/build/test/tools/llvm-ar/Output/error-opening-directory.test.tmp/tmpDir
--
Exit Code: 1
. . .

The builder was off line and did not send notifications on this.
Please have a look ASAP?

The first red - 399b12700b41cd58484c23639e61cace819229f6
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/39421
Differential Revision: https://reviews.llvm.org/D80838

The second red - 99e1b0dc8fbdd35426ac39a98c05718cd482f48a
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/39414
Differential Revision: https://reviews.llvm.org/D80846

The last green - b56bf30d3cc15896956061fdbeb6d078b63ec91f -
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/39411

Thanks

Galina

On Fri, Jun 5, 2020 at 10:39 AM Shoaib Meenai via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Sameer Arora
> Date: 2020-06-05T10:37:26-07:00
> New Revision: 99e1b0dc8fbdd35426ac39a98c05718cd482f48a
>
> URL:
> https://github.com/llvm/llvm-project/commit/99e1b0dc8fbdd35426ac39a98c05718cd482f48a
> DIFF:
> https://github.com/llvm/llvm-project/commit/99e1b0dc8fbdd35426ac39a98c05718cd482f48a.diff
>
> LOG: [llvm-ar] Update error messages and tests as per latest preferred
> style
>
> It updates two error messages under `performOperation` in the file
> llvm-ar.cpp. Furthermore, it also updates tests that print out these
> error messages: `llvm/test/Object/ar-create.test` and
> `llvm/test/tools/llvm-ar/print.test`.
>
> Reviewed By: jhenderson, MaskRay
>
> Differential Revision: https://reviews.llvm.org/D80846
>
> Added:
>
>
> Modified:
>     llvm/test/Object/ar-create.test
>     llvm/test/tools/llvm-ar/error-opening-directory.test
>     llvm/test/tools/llvm-ar/error-opening-permission.test
>     llvm/test/tools/llvm-ar/print.test
>     llvm/tools/llvm-ar/llvm-ar.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/test/Object/ar-create.test
> b/llvm/test/Object/ar-create.test
> index 4b08c97317a8..07c9ba437359 100644
> --- a/llvm/test/Object/ar-create.test
> +++ b/llvm/test/Object/ar-create.test
> @@ -13,5 +13,5 @@ RUN: rm -f %t.foo.a
>  RUN: llvm-ar r %t.foo.a %t 2>&1 | FileCheck --check-prefix=CREATE %s
>  RUN: rm -f %t.foo.a
>
> -CHECK: llvm-ar{{(.exe|.EXE)?}}: error: error loading '{{[^']+}}.foo.a':
> +CHECK: llvm-ar{{(.exe|.EXE)?}}: error: unable to load '{{[^']+}}.foo.a':
>  CREATE: creating {{.*}}.foo.a
>
> diff  --git a/llvm/test/tools/llvm-ar/error-opening-directory.test
> b/llvm/test/tools/llvm-ar/error-opening-directory.test
> index 63d0c653c37a..10cee214183e 100644
> --- a/llvm/test/tools/llvm-ar/error-opening-directory.test
> +++ b/llvm/test/tools/llvm-ar/error-opening-directory.test
> @@ -5,4 +5,4 @@
>  # RUN: not llvm-ar p %t/tmpDir 2>&1 | \
>  # RUN:    FileCheck %s --check-prefix=IS-DIR -DARCHIVE=%t/tmpDir
>
> -# IS-DIR: error: error opening '[[ARCHIVE]]': {{[iI]}}s a directory
> +# IS-DIR: error: unable to open '[[ARCHIVE]]': {{[iI]}}s a directory
>
> diff  --git a/llvm/test/tools/llvm-ar/error-opening-permission.test
> b/llvm/test/tools/llvm-ar/error-opening-permission.test
> index e78e76cd9513..00f80c0a1848 100644
> --- a/llvm/test/tools/llvm-ar/error-opening-permission.test
> +++ b/llvm/test/tools/llvm-ar/error-opening-permission.test
> @@ -11,4 +11,4 @@
>  # RUN: not llvm-ar p %t/permission.b 2>&1 | \
>  # RUN:   FileCheck %s --check-prefix=NO-PERMISSION
> -DARCHIVE=%t/permission.b
>
> -# NO-PERMISSION: error: error opening '[[ARCHIVE]]': {{[pP]}}ermission
> denied
> +# NO-PERMISSION: error: unable to open '[[ARCHIVE]]': {{[pP]}}ermission
> denied
>
> diff  --git a/llvm/test/tools/llvm-ar/print.test
> b/llvm/test/tools/llvm-ar/print.test
> index 847040f419b4..247a3d44022f 100644
> --- a/llvm/test/tools/llvm-ar/print.test
> +++ b/llvm/test/tools/llvm-ar/print.test
> @@ -75,7 +75,7 @@
>  # RUN: not llvm-ar p %t/missing.a 2>&1 \
>  # RUN:   | FileCheck %s --check-prefix=MISSING-ARCHIVE
> -DARCHIVE=%t/missing.a
>
> -# MISSING-ARCHIVE: error: error loading '[[ARCHIVE]]': {{[nN]}}o such
> file or directory
> +# MISSING-ARCHIVE: error: unable to load '[[ARCHIVE]]': {{[nN]}}o such
> file or directory
>
>  ## Member does not exist:
>  # RUN: not llvm-ar p %t/archive.a %t-missing.txt 2>&1 \
>
> diff  --git a/llvm/tools/llvm-ar/llvm-ar.cpp
> b/llvm/tools/llvm-ar/llvm-ar.cpp
> index 652219568db1..d699d4323f0a 100644
> --- a/llvm/tools/llvm-ar/llvm-ar.cpp
> +++ b/llvm/tools/llvm-ar/llvm-ar.cpp
> @@ -520,7 +520,7 @@ static std::string normalizePath(StringRef Path) {
>
>  static bool comparePaths(StringRef Path1, StringRef Path2) {
>  // When on Windows this function calls CompareStringOrdinal
> -// as Windows file paths are case-insensitive.
> +// as Windows file paths are case-insensitive.
>  // CompareStringOrdinal compares two Unicode strings for
>  // binary equivalence and allows for case insensitivity.
>  #ifdef _WIN32
> @@ -999,7 +999,7 @@ static int performOperation(ArchiveOperation Operation,
>        MemoryBuffer::getFile(ArchiveName, -1, false);
>    std::error_code EC = Buf.getError();
>    if (EC && EC != errc::no_such_file_or_directory)
> -    fail("error opening '" + ArchiveName + "': " + EC.message());
> +    fail("unable to open '" + ArchiveName + "': " + EC.message());
>
>    if (!EC) {
>      Error Err = Error::success();
> @@ -1014,7 +1014,7 @@ static int performOperation(ArchiveOperation
> Operation,
>    assert(EC == errc::no_such_file_or_directory);
>
>    if (!shouldCreateArchive(Operation)) {
> -    failIfError(EC, Twine("error loading '") + ArchiveName + "'");
> +    failIfError(EC, Twine("unable to load '") + ArchiveName + "'");
>    } else {
>      if (!Create) {
>        // Produce a warning if we should and we're creating the archive
> @@ -1100,9 +1100,9 @@ static void runMRIScript() {
>        fail("unknown command: " + CommandStr);
>      }
>    }
> -
> +
>    ParsingMRIScript = false;
> -
> +
>    // Nothing to do if not saved.
>    if (Saved)
>      performOperation(ReplaceOrInsert, &NewMembers);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://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/20200618/72b94a1e/attachment.html>


More information about the llvm-commits mailing list