Project

General

Profile

Bug #6405

zvol test setup is non deterministic

Added by Matthew Ahrens over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-10-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

The volsize of $TESTPOOL/$TESTVOL for zvol_misc_002_pos must be less than half the pool size, otherwise the test will fail (because it fills the zvol and then creates a snapshot, and there is a refereservation on zvols by default).

Furthermore, the size of $TESTPOOL/$TESTVOL should be held constant between each test.

The problem is that default_zvol_setup calls `set_dumpsize $TESTPOOL/$TESTVOL`, which sets the volsize based on the amount of allocated kernel memory (which determines the minimum dump device size). Therefore we will reset the size to a non-deterministic size before each test.

We should not call set_dumpsize except from specific tests that need to use it as a dump device. Each test should reset the size of the zvol back to what it was to begin with.

Also available in: Atom PDF