zvol test setup is non deterministic
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.
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 24e268f3071ecc622f716e7801683c84f4d4f9db Author: Matthew Ahrens <email@example.com> Date: 2016-05-16T20:47:57.000Z 6404 zvol_swap_006_pos can occasionally fail due to swaplen being < 16 6405 zvol test setup is non deterministic Reviewed by: George Wilson <firstname.lastname@example.org> Reviewed by: John Kennedy <email@example.com> Reviewed by: Will Andrews <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>