ZTS: init zfs test suite nixos tests (WIP)#110873
ZTS: init zfs test suite nixos tests (WIP)#110873Mindavi wants to merge 2 commits intoNixOS:masterfrom
Conversation
|
It looks like there is a test set |
|
It does mention a |
ef215be to
a6dfc11
Compare
|
I marked this as stale due to inactivity. → More info |
a6dfc11 to
365a4df
Compare
365a4df to
fe8bc20
Compare
There was a problem hiding this comment.
They're also quite large, multiple dozen MiB.
There was a problem hiding this comment.
Is there no better way to provide these dependencies? How do upstream testers declare these binaries? It'd probably be best to just get them from $PATH which is hermetic anyways.
There was a problem hiding this comment.
Hmm, the PATH is being modified when these tests are run, which is slighly hocus-pocus to me.
|
@Atemu do you have a tip on how to run those tests in parallel on my machine? Is there some way to run them all instead of having to |
|
Usually, you can build a set of drvs with nix-build but the tests evaluate to lambdas which nix-build is somehow able to eval to a drv? I don't understand this magic well enough. An easy way of doing this is to generate a list instead of a set; just |
|
I did some experiments with making multiple outputs and by doing that properly, there was no loop in the references anymore. I should look into that some time (this PR isn't high-priority for me, just a nice to have). |
|
It would be amazing if we had the full ZTS as a multiple output derivation. This would allow us to run the full ZTS as a single-shot test when bumping the ZFS version. With zfsUnstable there are often demands to “unlock” it for kernel version that have not been marked as compatible by upstream. If such a configuration passes the ZTS I would be much more comfortable approving such a merge, see also #145458 |
5552c0b to
b0f2219
Compare
|
Rebased on top of latest master, but the deadman test now crashes the kernel and hangs indefinitely. I think this is starting to be ready to go though. The tests are now put in a separate 'zfs_tests' output, to ensure they're properly separated. Only thing that'd still be nice is if we could remove all hardcoded paths to the tools, but since the ZTS does a little dance for setting up the PATH that I don't fully understand, I'm not 100% sure how to approach that properly. |
|
@ofborg test zfs |
|
@ofborg build zfs |
|
Hmm, so I should add it to passthru and to the toplevel tests file still, I think. |
Atemu
left a comment
There was a problem hiding this comment.
Two things:
- The test isn't discoverable in
nixosTests - We need to be able to test a matrix of zfs and kernel versions.
There was a problem hiding this comment.
Oh boy, look at the time! It's time to resurrect this PR yet again :)
I think these scripts could use makeWrapper instead of awkwardly patching them. Most variables use the pattern LOSETUP=${LOSETUP:-/sbin/losetup}, so they can be overridden using makeWrapper ... --set LOSETUP "${util-linux}/bin/losetup".
Also what's up with all the ksh stuff? I've read through zfs-tests.sh and to me it looks like ksh is only used on FreeBSD.
There was a problem hiding this comment.
I agree! Hopefully I can find some time soon to maybe clean this up :). Of course, feel free to contribute if you feel like it.
17a6018 to
47314aa
Compare
|
I rebased this on top of master, didn't change anything else for now (other than solve a minor merge conflict). Seems to be still working in this form. |
d0483ba to
496808d
Compare
496808d to
f82ce38
Compare
|
I'm not really interested in getting this working anymore. I'm not that big of a ZFS user and I did this at some point to scratch an itch. It seems like the tests are now broken and there were some features I couldn't figure out how to implement (test all zfs versions). Hopefully someone can pick up from where I left, if someone's still interested in this. |
Motivation for this change
#108649
Using the official test suite is nice. Currently some random tests are enabled, the hardest part of this whole story seems to be: which tests should be enabled?
Note that running the 'sanity' tests already takes over 40 minutes, which is unacceptable. @adisbladis and me had a quick chat over on IRC (https://logs.nix.samueldr.com/nixos/2021-01-10, search for Mindavi and adisbladis), and we determined that ~10 mins is a good amount of time to shoot for (this is quite arbitrary, and based on the fact that ZFS is a fundamental part of the system).
There are some things I'd like feedback on:
overrideandoverrideAttrs(they're both needed).All the currently enabled tests are passing, but (as can be seen in the test script) some of the tests fail. I'm not sure why, and the failing tests may be contributing to the long sanity test time as well.
This one in particular seems to be a culprit:
It can be seen multiple times in a failure log.
I think the first step for this should be that we decide on where to put this and how to handle the ZFS conditional building / inclusion of the test suite. After this is merged, it's possible to look into what tests are best to run. This set will at least do something in the good direction. If you have suggestions, please let me know. I don't want to be bikeshedding about which ones to run exactly now though. I'll trust any good advice on this, as long as the runtime stays acceptable.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)@adisbladis
@Atemu
Attached is a test log of some of the failing tests, with the data of the logfiles that the ZTS generates included.
zfs-tests-failing-tests-dump.txt