If cov_db_dir is empty (which it is for Verilator), then dvsim will both crash with an exception about . not being a valid path, and it will recursively delete the current directory. That really is what Python does by default. Mental.
~/d1$ touch foo
~/d1$ python3
Python 3.13.7 (main, Mar 3 2026, 12:19:54) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
>>> from pathlib import Path
>>> import shutil
>>> shutil.rmtree(Path(""))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
import platform
File "/usr/lib/python3.13/shutil.py", line 763, in rmtree
_rmtree_safe_fd(stack, onexc)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.13/shutil.py", line 707, in _rmtree_safe_fd
onexc(func, path, err)
~~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/shutil.py", line 658, in _rmtree_safe_fd
os.rmdir(name, dir_fd=dirfd)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: PosixPath('.')
>>>
~/d1$ ls
~/d1$
And yeah Path("").exists() is True! I'm struggling to think why that makes any sense.
Anyway fix here, I think. It may not be complete but it works for me: df68de6
If
cov_db_diris empty (which it is for Verilator), then dvsim will both crash with an exception about.not being a valid path, and it will recursively delete the current directory. That really is what Python does by default. Mental.And yeah
Path("").exists()isTrue! I'm struggling to think why that makes any sense.Anyway fix here, I think. It may not be complete but it works for me: df68de6