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.

(cherry picked from commit 5a31a27)
  • Loading branch information
marmarek committed Jun 25, 2024
1 parent 11529ae commit 27eeb76
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 27eeb76

Please sign in to comment.