On 05/15/2017 07:35 PM, Omar Sandoval wrote: > On Mon, May 15, 2017 at 03:13:52PM +0300, Dmitry Monakhov wrote: >> Omar Sandoval <osandov@xxxxxxxxxxx> writes: >> >>> Hi, everyone, >>> >>> At LSF/MM, we talked about the need for somewhere to dump tests for the >>> block layer/storage stack. I've put together a test suite inspired by >>> xfstests here: https://github.com/osandov/blktests. >>> >>> I started out with the opinion that we should reuse xfstests for this, >>> but it became clear that the requirements for testing block devices are >>> slightly different, and it diverged significantly from there. In >>> particular, blktests supports: >>> >>> - Per-device tests. You can configure a list of test devices and the >>> per-device tests will run on each one (currently in serial, we can >>> support parallel runs in the future if needed). >>> - No-device tests. Some tests don't need to run on real hardware, and we >>> can just set up a null-blk or scsi-debug device. >>> - Performance numbers. In addition to the output comparison pass/fail >>> that xfstests supports, blktests can also report arbitrary test >>> metrics which don't affect whether the test passes but can be useful >>> for spotting regressions. >> Cool. Thank you. >> It would be nice to have hermetic kvm environment similar to >> xfstests-bld [1] . I'm a volunteer to do that. > > Fine with me. Currently I think the only things we shell out to besides > basic coreutils and util-linux stuff are fio and parted. IMHO this should be easily done inside an initrd as well. There's no need for a full fledged disk image like the xfstests-bld uses (actually a coworker of mine did the same with xfstests and dracut). All you'll need to do is (untested): dracut --install "fio parted" --include "$BLKTESTS_DIR" "/blktests"\ --modules "bash base" --add-drivers "loop" --no-compress --no-hostonly\ --no-hostobly-cmdline --force --tmpdir $MY_TMPDIR \ --kver `make kernelrelease` and then add this to your qemu-kvm via -initrd -- Johannes Thumshirn Storage jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850