From 27eeb76a474a898f1b2e37ba7f19f1bdcd6d3072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 10 Jun 2024 14:33:03 +0200 Subject: [PATCH] tests: move test zfs volume to /home on qubes vm Normal user doesn't have write access to /rw, save the file in user home, in a .cache subdir. (cherry picked from commit 5a31a27aa45fb7670861d715a1a668d080ede140) --- qubes/tests/storage_zfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubes/tests/storage_zfs.py b/qubes/tests/storage_zfs.py index 6ab948ae3..28e601faa 100644 --- a/qubes/tests/storage_zfs.py +++ b/qubes/tests/storage_zfs.py @@ -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: