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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 09:42:09 PST 2017


BTW, I reverted r318397 since a gold test was also failing. I didn't
reply to r318397 since it looks like the email list is broken and
missing the email for r318397.

Cheers,
Rafael

Andrew Ng via llvm-commits <llvm-commits at lists.llvm.org> writes:

> 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"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list