From c430f08c80cde6a9e1ffa164ebd68d70435ce66b Mon Sep 17 00:00:00 2001 From: Andrew Ng Date: Thu, 16 Nov 2017 17:25:12 +0000 Subject: [PATCH] [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. llvm-svn: 318426 --- lld/test/ELF/lto/cache.ll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lld/test/ELF/lto/cache.ll b/lld/test/ELF/lto/cache.ll index 6731f52..2df8baf 100644 --- a/lld/test/ELF/lto/cache.ll +++ b/lld/test/ELF/lto/cache.ll @@ -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" -- 2.7.4