...

Text file src/internal/trace/v2/testdata/README.md

Documentation: internal/trace/v2/testdata

     1# Trace test data
     2
     3## Trace golden tests
     4
     5Trace tests can be generated by running
     6
     7```
     8go generate .
     9```
    10
    11with the relevant toolchain in this directory.
    12
    13This will put the tests into a `tests` directory where the trace reader
    14tests will find them.
    15
    16A subset of tests can be regenerated by specifying a regexp pattern for
    17the names of tests to generate in the `GOTRACETEST` environment
    18variable.
    19Test names are defined as the name of the `.go` file that generates the
    20trace, but with the `.go` extension removed.
    21
    22## Trace test programs
    23
    24The trace test programs in the `testprog` directory generate traces to
    25stdout.
    26Otherwise they're just normal programs.
    27
    28## Trace debug commands
    29
    30The `cmd` directory contains helpful tools for debugging traces.
    31
    32* `gotraceraw` parses traces without validation.
    33  It can produce a text version of the trace wire format, or convert
    34  the text format back into bytes.
    35* `gotracevalidate` parses traces and validates them.
    36  It performs more rigorous checks than the parser does on its own,
    37  which helps for debugging the parser as well.
    38  In fact, it performs the exact same checks that the tests do.

View as plain text