mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2024-12-24 21:34:48 +03:00
zfstest: improve reset behaviour
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
078c28aac6
commit
b13cf56109
@ -2613,11 +2613,20 @@ sub setup_zfs {
|
||||
sub cleanup_zfs {
|
||||
|
||||
print "destroy $pool\/$subvol\n" if $verbose;
|
||||
run_command("zfs destroy $zpath -r");
|
||||
eval { run_command("zfs destroy $zpath -r"); };
|
||||
if ($@) {
|
||||
print "cleanup failed: $@\nretrying once\n" if $verbose;
|
||||
eval { run_command("zfs destroy $zpath -r"); };
|
||||
if ($@) {
|
||||
clean_up_zpool();
|
||||
setup_zpool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub setup_zpool {
|
||||
|
||||
unlink 'zpool.img';
|
||||
eval {
|
||||
run_command("dd if=/dev/zero of=zpool.img bs=1M count=8000 ");
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user