Skip to content

Commit

Permalink
tests: move test zfs volume to /home on qubes vm
Browse files Browse the repository at this point in the history
Normal user doesn't have write access to /rw, save the file in user
home, in a .cache subdir.
  • Loading branch information
marmarek committed Jun 10, 2024
1 parent fb11985 commit 5a31a27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qubes/tests/storage_zfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def freebytes(directory: str, without: str) -> int:
return free

if os.path.ismount("/rw") and freebytes("/rw", f"/rw/{name}.img") > want:
data_file = f"/rw/{name}.img"
os.makedirs(os.path.expanduser("~/.cache"), exist_ok=True)
data_file = os.path.expanduser(f"~/.cache/{name}.img")
elif freebytes("/var/tmp", f"/var/tmp/{name}.img") > want:
data_file = f"/var/tmp/{name}.img"
else:
Expand Down

0 comments on commit 5a31a27

Please sign in to comment.