[dv] Document how to reproduce CI (Private) failure related to #5786 Signed-off-by: Weicai Yang <weicai@google.com>
diff --git a/doc/ug/getting_started_dv.md b/doc/ug/getting_started_dv.md index c3946b8..540d063 100644 --- a/doc/ug/getting_started_dv.md +++ b/doc/ug/getting_started_dv.md
@@ -88,3 +88,27 @@ The [UART DV](https://github.com/lowRISC/opentitan/tree/master/hw/ip/uart/dv) area can be used as a canonical example for making progress. If it is not clear on how to proceed, feel free to file an issue requesting assistance. + +## Reproduce a DV failure in CI + +Follow these steps to reproduce the failure + +1. Make sure the version of VCS is the same as the [one](https://github.com/lowRISC/opentitan-private-ci/blob/master/jobs.yml#L5) running in CI. + +2. CI runs against an auto-generated merge commit, which effectively is generated by merging the pull request (PR) into the master branch. +This "merge" branch is updated automatically by GitHub whenever the PR branch is pushed, or when the PR is closed and re-open. +Retrieve this exact branch by running the following (assuming "upstream" is the name of your lowrisc/opentian repository). +```console +$ git fetch upstream pull/<PR_number>/merge +$ git checkout -b <temp_branch> FETCH_HEAD +``` + +3. This is the command that CI runs for the smoke regression. +```console +$ util/dvsim/dvsim.py hw/top_earlgrey/dv/top_earlgrey_sim_cfgs.hjson -i smoke --fixed-seed=1 +``` +We can only run the failed test with `--fixed-seed=1` to reproduce the failure. +Assume there is a failure in the `uart_smoke` test. Here is the run command to reproduce it. +```console +$ util/dvsim/dvsim.py hw/ip/uart/dv/uart_sim_cfg.hjson -i uart_smoke --fixed-seed=1 [--waves] +```