[PATCH] D97068: Run non-filechecked commands in update_cc_test_checks.py

Jon Roelofs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 8 17:21:01 PST 2021


jroelofs added a comment.

In D97068#2611696 <https://reviews.llvm.org/D97068#2611696>, @ggeorgakoudis wrote:

> In D97068#2611269 <https://reviews.llvm.org/D97068#2611269>, @thakis wrote:
>
>> Looks like this breaks tests on mac: http://45.33.8.238/macm1/5075/step_6.txt
>>
>> Please take a look, and revert for now if it takes a while to fix.
>
> Hey @thakis, it should be an easy fix. I see no check lines are generated and I suspect something may be going wrong with the `cp` runline, but it's hard to know without replicating it. Is there any way you can give me temporary access to the mac machine to test things out?
>
> Otherwise, I will simplify the test to exclude the `cp` runline.

The issue has something to do with Darwin's USER_LABEL_PREFIX mangling inserting an `_` prefix. This "fixes" the test, but doesn't solve whatever underlying problem is there:

  diff --git a/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c b/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
  index bf18179392dc..a0a826c3d0b4 100644
  --- a/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
  +++ b/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
  @@ -1,7 +1,7 @@
   // Check that the non-clang/non-filechecked runlines execute
   // RUN: cp %s %s.copy.c
  -// RUN: %clang_cc1 -fopenmp %s.copy.c -emit-llvm-bc -o %t-host.bc
  -// RUN: %clang_cc1 -fopenmp -fopenmp-host-ir-file-path %t-host.bc %s.copy.c -emit-llvm -o - | FileCheck %s
  +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp %s.copy.c -emit-llvm-bc -o %t-host.bc
  +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-host-ir-file-path %t-host.bc %s.copy.c -emit-llvm -o - | FileCheck %s
   
   void use(int);
   
  diff --git a/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected b/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
  index ffc8caac0f23..3ad33fc683bd 100644
  --- a/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
  +++ b/clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c.expected
  @@ -1,8 +1,8 @@
   // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
   // Check that the non-clang/non-filechecked runlines execute
   // RUN: cp %s %s.copy.c
  -// RUN: %clang_cc1 -fopenmp %s.copy.c -emit-llvm-bc -o %t-host.bc
  -// RUN: %clang_cc1 -fopenmp -fopenmp-host-ir-file-path %t-host.bc %s.copy.c -emit-llvm -o - | FileCheck %s
  +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp %s.copy.c -emit-llvm-bc -o %t-host.bc
  +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-host-ir-file-path %t-host.bc %s.copy.c -emit-llvm -o - | FileCheck %s
   
   void use(int);
   

You should be able to replicate the failure locally by setting an apple triple instead, i.e. `-triple x86_64-apple-macosx`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97068/new/

https://reviews.llvm.org/D97068



More information about the cfe-commits mailing list