OSDN Git Service

[gold] Fix broken thin LTO cache test NFC
authorAndrew Ng <anng.sw@gmail.com>
Fri, 17 Nov 2017 12:00:57 +0000 (12:00 +0000)
committerAndrew Ng <anng.sw@gmail.com>
Fri, 17 Nov 2017 12:00:57 +0000 (12:00 +0000)
Fix test as it is assuming that the cache pruning is always being
performed by default. Explicitly set prune interval to 0s to ensure
pruning is always performed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318520 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/gold/X86/cache.ll

index d507fc1..5a0c7ab 100644 (file)
@@ -32,7 +32,7 @@
 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
 ; RUN:     --plugin-opt=thinlto \
 ; RUN:     --plugin-opt=cache-dir=%t.cache \
-; RUN:     --plugin-opt=cache-policy=prune_after=1h \
+; RUN:     --plugin-opt=cache-policy=prune_after=1h:prune_interval=0s \
 ; RUN:     -o %t3.o %t2.o %t.o
 
 ; Two cached objects, plus a timestamp file and "foo", minus the file we removed.
@@ -46,7 +46,7 @@
 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
 ; RUN:     --plugin-opt=thinlto \
 ; RUN:     --plugin-opt=cache-dir=%t.cache \
-; RUN:     --plugin-opt=cache-policy=cache_size_bytes=128k \
+; RUN:     --plugin-opt=cache-policy=cache_size_bytes=128k:prune_interval=0s \
 ; RUN:     -o %t3.o %t2.o %t.o
 ; RUN: ls %t.cache | count 5
 
@@ -55,7 +55,7 @@
 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
 ; RUN:     --plugin-opt=thinlto \
 ; RUN:     --plugin-opt=cache-dir=%t.cache \
-; RUN:     --plugin-opt=cache-policy=cache_size_bytes=32k \
+; RUN:     --plugin-opt=cache-policy=cache_size_bytes=32k:prune_interval=0s \
 ; RUN:     -o %t3.o %t2.o %t.o
 ; RUN: ls %t.cache | count 4