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

Francois Pichet pichet2000 at gmail.com
Sat Sep 18 23:32:45 PDT 2010


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.
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?



More information about the cfe-dev mailing list