You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Activity