commit | ab2472ee1c54f7fc69011815e15515846ae40eea | [log] [tgz] |
---|---|---|
author | Sun Ke <sunke32@huawei.com> | Sat Nov 30 12:05:40 2019 |
committer | Omar Sandoval <osandov@fb.com> | Thu Dec 19 22:30:46 2019 |
tree | b116f9e4176d8514e5314e282a149b427a9af04a | |
parent | e86852d221f38536fbb1ee595f2276d8a13d4be3 [diff] |
nbd/003:add mount and clear_sock test for nbd Add the test case to check nbd device. This test case catches regressions fixed by commit 92b5c8f0063e4 "nbd: replace kill_bdev() with __invalidate_device() again". Establish the nbd connection. Run two processes. The first one do mount and umount, and the other one do clear_sock ioctl. Signed-off-by: Sun Ke <sunke32@huawei.com> [Omar: simplify] Signed-off-by: Omar Sandoval <osandov@fb.com>
blktests is a test framework for the Linux kernel block layer and storage stack. It is inspired by the xfstests filesystem testing framework.
The dependencies are minimal, but make sure you have them installed:
Some tests require the following:
Build blktests with make
. Optionally, install it to a known location with make install
(/usr/local/blktests
by default, but this can be changed by passing DESTDIR
and/or prefix
).
Add the list of block devices you want to test on in a file named config
(note: these tests are potentially destructive):
TEST_DEVS=(/dev/nvme0n1 /dev/sdb)
And as root, run the default set of tests with ./check
.
Do not add anything to the TEST_DEVS
array containing data that you want to keep.
See here for more detailed information on configuration and running tests.
The ./new
script creates a new test from a template. The generated template contains more detailed documentation.
Pull requests on GitHub and patches to linux-block@vger.kernel.org are both accepted. See here for more information on contributing.