Skip to content

Commit 51e719e

Browse files
committed
increment version number, update tests for new path format and version number
1 parent 507c506 commit 51e719e

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

llvm/lib/CAS/OnDiskGraphDB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static constexpr StringLiteral DataPoolTableName = "llvm.cas.data";
8181
static constexpr StringLiteral IndexFile = "index";
8282
static constexpr StringLiteral DataPoolFile = "data";
8383

84-
static constexpr StringLiteral FilePrefix = "v9.";
84+
static constexpr StringLiteral FilePrefix = "v10.";
8585
static constexpr StringLiteral FileSuffixData = ".data";
8686
static constexpr StringLiteral FileSuffixLeaf = ".leaf";
8787
static constexpr StringLiteral FileSuffixLeaf0 = ".leaf+0";

llvm/test/CAS/logging.test

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ RUN: FileCheck %s --input-file %t/cas/v1.log
88
RUN: FileCheck %s --input-file %t/cas/v1.log --check-prefix=STANDALONE
99

1010

11-
// CHECK: resize mapped file '{{.*}}v9.index'
12-
// CHECK: mmap '{{.*}}v9.index' [[INDEX:0x[0-9a-f]+]]
13-
// CHECK: resize mapped file '{{.*}}v9.data'
14-
// CHECK: mmap '{{.*}}v9.data' [[DATA:0x[0-9a-f]+]]
11+
// CHECK: resize mapped file '{{.*}}v10.index'
12+
// CHECK: mmap '{{.*}}v10.index' [[INDEX:0x[0-9a-f]+]]
13+
// CHECK: resize mapped file '{{.*}}v10.data'
14+
// CHECK: mmap '{{.*}}v10.data' [[DATA:0x[0-9a-f]+]]
1515
// CHECK: resize mapped file '{{.*}}v4.actions'
1616
// CHECK: mmap '{{.*}}v4.actions' [[ACTIONS:0x[0-9a-f]+]]
1717

@@ -22,16 +22,16 @@ RUN: FileCheck %s --input-file %t/cas/v1.log --check-prefix=STANDALONE
2222

2323
// CHECK: resize mapped file '{{.*}}v4.actions'
2424
// CHECK: close mmap '{{.*}}v4.actions'
25-
// CHECK: resize mapped file '{{.*}}v9.data'
26-
// CHECK: close mmap '{{.*}}v9.data'
27-
// CHECK: resize mapped file '{{.*}}v9.index'
28-
// CHECK: close mmap '{{.*}}v9.index'
25+
// CHECK: resize mapped file '{{.*}}v10.data'
26+
// CHECK: close mmap '{{.*}}v10.data'
27+
// CHECK: resize mapped file '{{.*}}v10.index'
28+
// CHECK: close mmap '{{.*}}v10.index'
2929

3030
// CHECK: validate-if-needed '{{.*}}cas' boot=[[BOOT:[0-9]+]] last-valid=0 check-hash=1 allow-recovery=0 force=0 llvm-cas={{.*}}llvm-cas
3131
// CHECK: validate-if-needed '{{.*}}cas' boot=[[BOOT]] last-valid=[[BOOT]] check-hash=0 allow-recovery=1 force=1 llvm-cas={{.*}}llvm-cas
3232

33-
// STANDALONE: standalone file create '[[PATH:.*v9.[0-9a-f]*.leaf]].[[SUFFIX:[0-9a-f]*]]'
34-
// STANDALONE: standalone file rename '[[PATH]].[[SUFFIX]]' to '[[PATH]]'
33+
// STANDALONE: standalone file create '[[ROOT_PATH:.*/]][[FILENAME:v10.[0-9a-f]*.leaf]].[[SUFFIX:[0-9a-f]*]]'
34+
// STANDALONE: standalone file rename '[[ROOT_PATH]][[FILENAME]].[[SUFFIX]]' to '[[ROOT_PATH]]{{[0-9a-f]+}}/[[FILENAME]]'
3535

3636
//--- input/a
3737
Input 1

llvm/test/CAS/validate-if-needed.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
RUN: rm -rf %t && mkdir %t
22
RUN: llvm-cas --cas %t/cas --ingest %S/Inputs > %t/cas.id
3-
RUN: mv %t/cas/v1.1/v9.data %t/cas/v1.1/v9.data.bak
3+
RUN: mv %t/cas/v1.1/v10.data %t/cas/v1.1/v10.data.bak
44

55
# INVALID: bad record
66
# VALID: validated successfully
@@ -12,15 +12,15 @@ RUN: not llvm-cas --cas %t/cas --validate-if-needed 2>&1 | FileCheck %s -check-p
1212
RUN: not llvm-cas --cas %t/cas --validate-if-needed 2>&1 | FileCheck %s -check-prefix=INVALID
1313

1414
# Validation happens once per boot.
15-
RUN: mv %t/cas/v1.1/v9.data.bak %t/cas/v1.1/v9.data
15+
RUN: mv %t/cas/v1.1/v10.data.bak %t/cas/v1.1/v10.data
1616
RUN: llvm-cas --cas %t/cas --validate-if-needed | FileCheck %s -check-prefix=VALID
1717
RUN: llvm-cas --cas %t/cas --validate-if-needed | FileCheck %s -check-prefix=SKIPPED
1818
# Wrong timestamp triggers re-validation.
1919
RUN: echo '123' > %t/cas/v1.validation
2020
RUN: llvm-cas --cas %t/cas --validate-if-needed | FileCheck %s -check-prefix=VALID
2121
RUN: llvm-cas --cas %t/cas --validate-if-needed | FileCheck %s -check-prefix=SKIPPED
2222
# Skipped validation does not catch errors.
23-
RUN: mv %t/cas/v1.1/v9.data %t/cas/v1.1/v9.data.bak
23+
RUN: mv %t/cas/v1.1/v10.data %t/cas/v1.1/v10.data.bak
2424
RUN: llvm-cas --cas %t/cas --validate-if-needed | FileCheck %s -check-prefix=SKIPPED
2525

2626
# Unless forced.
@@ -33,7 +33,7 @@ RUN: llvm-cas --cas %t/cas --validate-if-needed --allow-recovery | FileCheck %s
3333
RUN: llvm-cas --cas %t/cas --validate-if-needed --force | FileCheck %s -check-prefix=VALID
3434
RUN: rm -rf %t/cas/v1.1
3535
RUN: cp -r %t/cas/corrupt.0.v1.1 %t/cas/v1.1
36-
RUN: mv %t/cas/v1.1/v9.data %t/cas/v1.1/v9.data.bak
36+
RUN: mv %t/cas/v1.1/v10.data %t/cas/v1.1/v10.data.bak
3737
RUN: llvm-cas --cas %t/cas --validate-if-needed --allow-recovery --force | FileCheck %s -check-prefix=RECOVERED
3838
RUN: ls %t/cas/corrupt.1.v1.1
3939

llvm/test/tools/llvm-cas/validation.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN: llvm-cas --cas %t/cas --ingest %S/Inputs > %t/cas.id
1212
RUN: llvm-cas --cas %t/cas --validate
1313
RUN: llvm-cas --cas %t/cas --validate --check-hash
1414

15-
RUN: rm %t/cas/v1.1/v9.data
15+
RUN: rm %t/cas/v1.1/v10.data
1616
RUN: not llvm-cas --cas %t/cas --validate
1717
RUN: not llvm-cas --cas %t/cas --validate --check-hash
1818

llvm/tools/llvm-cas-test/llvm-cas-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static int checkLockFiles() {
271271
ExitOnError ExitOnErr("llvm-cas-test: check-lock-files: ");
272272

273273
SmallString<128> DataPoolPath(CASPath);
274-
sys::path::append(DataPoolPath, "v1.1/v9.data");
274+
sys::path::append(DataPoolPath, "v1.1/v10.data");
275275

276276
auto OpenCASAndGetDataPoolSize = [&]() -> Expected<uint64_t> {
277277
auto Result = createOnDiskUnifiedCASDatabases(CASPath);

0 commit comments

Comments
 (0)