[cfe-dev] Windows Lit problems again. What should we do?

Daniel Dunbar daniel at zuster.org
Sun Sep 19 13:04:19 PDT 2010


On Sat, Sep 18, 2010 at 11:32 PM, Francois Pichet <pichet2000 at gmail.com> wrote:
> Some clang lit tests are failing sporadically on Windows since Friday
>
> Why?  Because revision 114187 (Use a temporary file for output which
> gets renamed after all the writing is finished.) is causing problem on
> Windows:
>
> The command:
> FileCheck blabla <%t %s doesn't work on Windows now.
>
> example:
>
> 1// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o %t %s
> 2// RUN: FileCheck --check-prefix CHECK-FRAGILE < %t %s
>
> 3// RUN: %clang_cc1 -triple x86_64-apple-darwin10
> -fobjc-nonfragile-abi -emit-llvm -o %t %s
> 4// RUN: FileCheck --check-prefix CHECK-NONFRAGILE < %t %s
>
> The reason is that when "FileCheck < %t %s" is called (line 2), the
> lifetime of the handle to file "%t" is controlled by Windows. We don't
> know exactly when it is released.

I don't completely follow the sequence of events causing a failure. I
would need to look closer, but this sounds to me like either a clang
bug or a lit bug.

Presumably one of the two processes is either keeping a handle longer
than it should, or is creating a handle before it should.

I might find some time to investigate this today. Is it deterministic?
Is any particular test most likely to trigger it?

 - Daniel

> Then clang is called again (line 3) and because of revision 114187,
> the clang frontend try to move a file to "%t" but Windows refuses
> because the handle from the previous < redirection (line 2) is not
> released.
>
> Hence we get error from the bot like:
> "error: unable to rename temporary
> 'D:/public/zorg/buildbot/osuosl/slave/clang-i686-xp-msvc9/llvm/build/tools/clang/test/CodeGenObjC/Output/image-info.m.tmp-000000'
> to output file 'D:\public\zorg\buildbot\osuosl\slave\clang-i686-xp-msvc9\llvm\build\tools\clang\test\CodeGenObjC\Output\image-info.m.tmp':
> 'Can't move 'D:/public/zorg/buildbot/osuosl/slave/clang-i686-xp-msvc9/llvm/build/tools/clang/test/CodeGenObjC/Output/image-info.m.tmp-000000'
> to 'D:/public/zorg/buildbot/osuosl/slave/clang-i686-xp-msvc9/llvm/build/tools/clang/test/CodeGenObjC/Output/image-info.m.tmp':
> Access is denied."
>
> is that clear?
>
> well I can think of 1 solutions:
>
> 1: change all instances of
> // RUN: FileCheck (blabla) < %t %s
> by
> // RUN: FileCheck (blabla.) -input-file %t %s
>
> is that ok or is there a better way?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list