github.com/cockroachdb/pebble@v0.0.0-20231214172447-ab4952c5f87b/vfs/errorfs/testdata/errorfs (about)

     1  parse-dsl
     2  ErrInjected
     3  (ErrInjected Reads)
     4  (ErrInjected (PathMatch "foo/*.sst"))
     5  (ErrInjected (OnIndex 1))
     6  (ErrInjected (Or Reads Writes))
     7  (ErrInjected (And (PathMatch "foo/bar/*.sst") (OnIndex 1)))
     8  (ErrInjected (Or (OnIndex 2) (PathMatch "*.sst")))
     9  (ErrInjected (And Reads (PathMatch "*.sst")))
    10  (ErrInjected (Or Writes (PathMatch "*.sst")))
    11  ----
    12  ErrInjected
    13  (ErrInjected Reads)
    14  (ErrInjected (PathMatch "foo/*.sst"))
    15  (ErrInjected (OnIndex 1))
    16  (ErrInjected (Or Reads Writes))
    17  (ErrInjected (And (PathMatch "foo/bar/*.sst") (OnIndex 1)))
    18  (ErrInjected (Or (OnIndex 2) (PathMatch "*.sst")))
    19  (ErrInjected (And Reads (PathMatch "*.sst")))
    20  (ErrInjected (Or Writes (PathMatch "*.sst")))
    21  
    22  parse-dsl
    23  errInjected
    24  ErrInjected()
    25  (ErrInjected (PathMatch foo/*.sst))
    26  (alwoes (PathMatch "foo/*.sst"))
    27  (ErrInjected (PathMatch "foo/*.sst" ""))
    28  (ErrInjected PathMatch "foo/*.sst")
    29  (ErrInjected (OnIndex ErrInjected))
    30  (Or ErrInjected ErrInjected ErrInjected
    31  (And ErrInjected ErrInjected ErrInjected)
    32  (Or 1 4 5)
    33  (ErrInjected (OnIndex foo))
    34  (ErrInjected (OnIndex 9223372036854775807))
    35  ----
    36  parsing err: dsl: unknown constant "errInjected"
    37  parsing err: dsl: unexpected token ( at pos 12; expected EOF
    38  parsing err: dsl: unexpected token (IDENT, "foo") at pos 25; expected STRING
    39  parsing err: dsl: unknown func "alwoes"
    40  parsing err: dsl: unexpected token (STRING, "\"\"") at pos 37; expected )
    41  parsing err: dsl: unknown constant "PathMatch"
    42  parsing err: dsl: unexpected token (IDENT, "ErrInjected") at pos 23; expected INT
    43  parsing err: dsl: unknown func "Or"
    44  parsing err: dsl: unknown func "And"
    45  parsing err: dsl: unknown func "Or"
    46  parsing err: dsl: unexpected token (IDENT, "foo") at pos 23; expected INT
    47  parsing err: strconv.ParseInt: parsing "9223372036854775807": value out of range
    48  
    49  parse-dsl
    50  (ErrInjected (OpFileReadAt _))
    51  (ErrInjected (OpFileReadAt foo))
    52  (ErrInjected (OpFileReadAt 1052363))
    53  ----
    54  parsing err: dsl: unexpected token (IDENT, "_") at pos 28; expected INT
    55  parsing err: dsl: unexpected token (IDENT, "foo") at pos 28; expected INT
    56  (ErrInjected (FileReadAt 1052363))
    57  
    58  parse-dsl
    59  (ErrInjected (Randomly 0))
    60  (ErrInjected (Randomly 0.1))
    61  (ErrInjected (Randomly 0.2 18520850252))
    62  (ErrInjected (Randomly 1.2 18520850252))
    63  (ErrInjected (Randomly -0.3 18520850252))
    64  (ErrInjected (Randomly 18520850252 0.25))
    65  (ErrInjected (And (PathMatch "*.sst") (Randomly 0.05 185957252)))
    66  (ErrInjected (And (PathMatch "*.sst") (Randomly 0.05)))
    67  ----
    68  parsing err: dsl: unexpected token (INT, "0") at pos 24; expected FLOAT
    69  (ErrInjected (Randomly 0.10))
    70  (ErrInjected (Randomly 0.20 18520850252))
    71  parsing err: errorfs: Randomly proability p must be within p ≤ 1.0
    72  parsing err: dsl: unexpected token - at pos 24; expected FLOAT
    73  parsing err: dsl: unexpected token (INT, "18520850252") at pos 24; expected FLOAT
    74  (ErrInjected (And (PathMatch "*.sst") (Randomly 0.05 185957252)))
    75  (ErrInjected (And (PathMatch "*.sst") (Randomly 0.05)))