From 363472bd2ab749d249709987728450c9fccbb09a Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Fri, 22 Nov 2024 10:42:17 +1100 Subject: [PATCH] fixup! tests: zfs: add native zfs encryption tests --- test/suites/storage_driver_zfs.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/suites/storage_driver_zfs.sh b/test/suites/storage_driver_zfs.sh index aa6e65f4c5..dbf41b99ef 100644 --- a/test/suites/storage_driver_zfs.sh +++ b/test/suites/storage_driver_zfs.sh @@ -79,6 +79,9 @@ do_zfs_encryption() { -O keylocation="file://$zpool_keyfile" \ "$zpool_name" "$zpool_vdev" + zpool status + zfs get -H -o name,property,value keystatus "$zpool_name" + incus storage create zpool_encrypted zfs source="$zpool_name" # Make sure that incus sees that the pool is imported. @@ -95,6 +98,9 @@ do_zfs_encryption() { # Restart Incus. incus admin waitready + zpool status + zfs get -H -o name,property,value keystatus "$zpool_name" + # The keys should've been re-imported automatically by Incus. zfs get -H -o name,property,value keystatus "$zpool_name" | grep -q "$zpool_name\tkeystatus\tavailable" incus storage list -f csv -c nDs | grep -q "zpool_encrypted,zfs,CREATED" @@ -110,6 +116,7 @@ do_zfs_encryption() { incus admin shutdown # The pool should be exported now. + zpool status ! zpool status "$zpool_name" 2>/dev/null # Restart Incus.