opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[dv] Add test for V2 and run dvsim.py with option -i V2

Open tunghoang290780 opened this issue 6 years ago • 3 comments

I want to run regression tests for V2 for I2C using dvsim.py with option -i V2. Below is what I did

  • Define V2 test names in i2c_testplan.hjson (with tag milestone: V2)
  • Define V2 test name and its i2c_vseq name in i2c_sim_cfg.hjson

However, when running /dvsim.py /i2c_sim_cfg.hjson -i V2 ..., there is an error as below. I am aware that V2 test list has been built by SimCfg.py. Meaning that I might be missing the definition of V2 tests in some other specific files (besides ones I changed). Could anyone help me to resolve this issue?

  File "/wdc/proj/cto/top/work/hoang.tung/opentitan/util/dvsim/SimCfg.py", line 341, in _create_build_and_run_list
    regression.tests, run_list_names)
  File "/wdc/proj/cto/top/work/hoang.tung/opentitan/util/dvsim/SimCfg.py", line 317, in get_overlapping_tests
    if test.name in run_list_names:
AttributeError: 'NoneType' object has no attribute 'name'

tunghoang290780 avatar Jul 01 '20 06:07 tunghoang290780

Can you try fixing these errors:

sriyer@sriyer:~/ot_alt$ ./util/dvsim/dvsim.py hw/ip/i2c/dv/i2c_sim_cfg.hjson --list regressions
INFO: [SimCfg] [scratch_dir]: [i2c]: [/usr/local/google/home/sriyer/ot_alt/scratch/i2c.sim.xcelium/flash_ctrl_sanity]
ERROR: [Modes] Test "i2c_error" added to regression "V2" not found!
ERROR: [Modes] Test "i2c_stress_all_with_rand_reset" added to regression "V2" not found!
ERROR: [Modes] Test "i2c_perf" added to regression "V2" not found!
ERROR: [Modes] Test "i2c_stress" added to regression "V2" not found!
INFO: [SimCfg] ---- List of regressions in i2c ----

If tests are not yet developed, then they should not be added to the i2c_testplan.hjson. The corresponding tests entry in the testplan should be left empty. I will nevertheless, fix this issue.

sriyerg avatar Jul 01 '20 07:07 sriyerg

Fix available in #2688.

sriyerg avatar Jul 01 '20 07:07 sriyerg

@sriyerg thanks for the quick patch

tunghoang290780 avatar Jul 01 '20 16:07 tunghoang290780