Skip to content

Add basic ZFS tests - #31618

Merged
orivej merged 1 commit into
NixOS:masterfrom
adisbladis:zfs-tests
Nov 16, 2017
Merged

orivej merged 1 commit into
NixOS:masterfrom
adisbladis:zfs-tests

Conversation

@adisbladis

@adisbladis adisbladis commented Nov 13, 2017 •

Copy link
Copy Markdown
Member
Motivation for this change

Add some basic testing for zfs to be able to discover regressions in newer kernels more easily.

These are all currently failing because of linuxPackages_4_14 being both lts and latest (but did succeed when testing with linuxPackages_4_13).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Mic92

Mic92 commented Nov 13, 2017 •

Copy link
Copy Markdown
Member

We also have a test in nixos/tests/installer.nix

Comment thread nixos/tests/zfs/default.nix Outdated

@Mic92 Mic92 Nov 13, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTS might be redundant. We will most likely see the bug first in latest.

@adisbladis
adisbladis force-pushed the zfs-tests branch 2 times, most recently from df1827c to 471c5aa Compare November 13, 2017 19:26
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 13, 2017

@copumpkin copumpkin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps factor out the common stuff for both? The duplication sounds like it'll be quite annoying to maintain if we make the tests more sophisticated. It seems like they could live in the same file. See how something like the installer test works, for example

@adisbladis

Copy link
Copy Markdown
Member Author

@copumpkin Good feedback. It's done 👍

Also implemented tests for zfs encryption.

@jcumming

jcumming commented Nov 14, 2017 •

Copy link
Copy Markdown
Contributor

It would be nice to have a test that ran ztest, too:

    # we don't directly create a zfs filesystem here we create a ext3 
    # filesystem and the the zfs unit tests use it.. 
    $machine->succeed("mkfs.ext3 -L ztest /dev/vdb"); 
    $machine->succeed("mkdir /ztest"); 
    $machine->succeed("mount LABEL=ztest /ztest"); 
    $machine->succeed("modprobe zfs");  
    $machine->succeed("echo Running ZFS unit tests, this may take a while..."); 
    $machine->succeed("ztest -f /ztest -T 120 -t1 -VVV");  # single threaded 
    $machine->succeed("ztest -f /ztest -T 120 -VVV");  # multi threaded 

@adisbladis adisbladis mentioned this pull request Nov 16, 2017
6 of 8 tasks
@orivej
orivej merged commit f79e3e2 into NixOS:master Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants