[lld] r318426 - [ELF] Fix broken LTO cache test NFC

Andrew Ng via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 09:25:12 PST 2017


Author: anng
Date: Thu Nov 16 09:25:12 2017
New Revision: 318426

URL: http://llvm.org/viewvc/llvm-project?rev=318426&view=rev
Log:
[ELF] Fix broken LTO cache test NFC

Commit r318397 fixed the cache pruning interval which broke this test
as it was assuming that the cache pruning was always being
performed. Explicitly set prune interval to 0s to ensure this.

Modified:
    lld/trunk/test/ELF/lto/cache.ll

Modified: lld/trunk/test/ELF/lto/cache.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/cache.ll?rev=318426&r1=318425&r2=318426&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/cache.ll (original)
+++ lld/trunk/test/ELF/lto/cache.ll Thu Nov 16 09:25:12 2017
@@ -7,7 +7,7 @@
 ; Create two files that would be removed by cache pruning due to age.
 ; We should only remove files matching the pattern "llvmcache-*".
 ; RUN: touch -t 197001011200 %t.cache/llvmcache-foo %t.cache/foo
-; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy prune_after=1h -o %t3 %t2.o %t.o
+; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy prune_after=1h:prune_interval=0s -o %t3 %t2.o %t.o
 
 ; Two cached objects, plus a timestamp file and "foo", minus the file we removed.
 ; RUN: ls %t.cache | count 4
@@ -16,11 +16,11 @@
 ; RUN: %python -c "print(' ' * 65536)" > %t.cache/llvmcache-foo
 
 ; This should leave the file in place.
-; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=128k -o %t3 %t2.o %t.o
+; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=128k:prune_interval=0s -o %t3 %t2.o %t.o
 ; RUN: ls %t.cache | count 5
 
 ; This should remove it.
-; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=32k -o %t3 %t2.o %t.o
+; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=32k:prune_interval=0s -o %t3 %t2.o %t.o
 ; RUN: ls %t.cache | count 4
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"




More information about the llvm-commits mailing list