fstests: add support for working with dm-log-writes target

Cherry-picked the relevant common bits from commit 70d41e17164b
in Josef Bacik's fstests tree (https://github.com/josefbacik/fstests).
Quoting from Josef's commit message:

  This patch adds the supporting code for using the dm-log-writes
  target.  The dmlogwrites code is similar to the dmflakey code, it just
  gives us functions to build and tear down a dm-log-writes target.  We
  add a new LOGWRITES_DEV variable to take in the device we will use as
  the log and add checks for that.

[Amir:]
- Removed unneeded _test_falloc_support
- Moved _require_log_writes to dmlogwrites
- Document _require_log_writes
- Address review comments by Eryu Guan

Cc: Josef Bacik <jbacik@fb.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Amir Goldstein
2017-09-07 13:03:09 +03:00
committed by Eryu Guan
parent b65b808ee3
commit 520cddd8d0
3 changed files with 112 additions and 0 deletions
+2
View File
@@ -91,6 +91,8 @@ Preparing system for tests:
- set TEST_XFS_SCRUB=1 to have _check_xfs_filesystem run
xfs_scrub -vd to scrub the filesystem metadata online before
unmounting to run the offline check.
- setenv LOGWRITES_DEV to a block device to use for power fail
testing.
- or add a case to the switch in common/config assigning
these variables based on the hostname of your test