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.

#1

Updated by Electric Monk almost 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 24e268f3071ecc622f716e7801683c84f4d4f9db

commit  24e268f3071ecc622f716e7801683c84f4d4f9db
Author: Matthew Ahrens <mahrens@delphix.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 <george.wilson@delphix.com>
    Reviewed by: John Kennedy <john.kennedy@delphix.com>
    Reviewed by: Will Andrews <will@freebsd.org>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF