32 lines · plain
1RUN: rm -rf %t2RUN: mkdir %t3 4# Ingest a blob which just fits inside the CAS data pool to make sure the validate passes.5RUN: truncate -s 7 %t/file6RUN: cat %t/file | \7RUN: llvm-cas --cas %t/cas --make-blob \8RUN: --data -9RUN: llvm-cas --cas %t/cas --validate --check-hash10 11RUN: llvm-cas --cas %t/cas --validate12RUN: llvm-cas --cas %t/cas --validate --check-hash13 14RUN: rm %t/cas/v1.1/data.v115RUN: not llvm-cas --cas %t/cas --validate16RUN: not llvm-cas --cas %t/cas --validate --check-hash17 18RUN: mkdir %t/ac19 20RUN: llvm-cas --cas %t/ac --make-blob \21RUN: --data /dev/null > %t/empty.casid22RUN: echo "abc" | \23RUN: llvm-cas --cas %t/ac --make-blob \24RUN: --data - >%t/abc.casid25 26RUN: llvm-cas --cas %t/ac --put-cache-key @%t/abc.casid @%t/empty.casid27RUN: llvm-cas --cas %t/ac --validate28# Note: records are 40 bytes (32 hash bytes + 8 byte value), so trim the last29# allocated record, leaving it invalid.30RUN: truncate -s -40 %t/ac/v1.1/actions.v131RUN: not llvm-cas --cas %t/ac --validate32