check: don't leave the scratch filesystem mounted after _notrun
[xfstests-dev.git] / README
diff --git a/README b/README
index 4af331b4fa06e9313e5607b202fd04dcd82d0199..18f7a6bc3ff0cf9adaed7700df8a58592df898bb 100644 (file)
--- a/README
+++ b/README
@@ -6,15 +6,16 @@ _______________________
 - install prerequisite packages
   For example, for Ubuntu:
        sudo apt-get install xfslibs-dev uuid-dev libtool-bin \
-       e2fsprogs automake gcc libuuid1 quota attr libattr1-dev make \
+       e2fsprogs automake gcc libuuid1 quota attr make \
        libacl1-dev libaio-dev xfsprogs libgdbm-dev gawk fio dbench \
-       uuid-runtime python sqlite3
+       uuid-runtime python sqlite3 liburing-dev libcap-dev
   For Fedora, RHEL, or CentOS:
        yum install acl attr automake bc dbench dump e2fsprogs fio \
        gawk gcc indent libtool lvm2 make psmisc quota sed \
        xfsdump xfsprogs \
-       libacl-devel libattr-devel libaio-devel libuuid-devel \
-       xfsprogs-devel btrfs-progs-devel python sqlite
+       libacl-devel libaio-devel libuuid-devel \
+       xfsprogs-devel btrfs-progs-devel python sqlite liburing-devel \
+       libcap-devel
        (Older distributions may require xfsprogs-qa-devel as well.)
        (Note that for RHEL and CentOS, you may need the EPEL repo.)
 - run make
@@ -109,6 +110,13 @@ Preparing system for tests:
              - Set TEST_FS_MODULE_RELOAD=1 to unload the module and reload
                it between test invocations.  This assumes that the name of
                the module is the same as FSTYP.
+             - Set DUMP_CORRUPT_FS=1 to record metadata dumps of XFS or ext*
+               filesystems if a filesystem check fails.
+             - Set DUMP_COMPRESSOR to a compression program to compress
+               metadumps of filesystems.  This program must accept '-f' and the
+               name of a file to compress; and it must accept '-d -f -k' and
+               the name of a file to decompress.  In other words, it must
+               emulate gzip.
 
         - or add a case to the switch in common/config assigning
           these variables based on the hostname of your test
@@ -132,7 +140,8 @@ Running tests:
     - ./check '*/001' '*/002' '*/003'
     - ./check '*/06?'
     - Groups of tests maybe ran by: ./check -g [group(s)]
-      See the 'group' file for details on groups
+      See the tests/*/group.list files after building xfstests to learn about
+      each test's group memberships.
     - If you want to run all tests regardless of what group they are in
       (including dangerous tests), use the "all" group: ./check -g all
     - To randomize test order: ./check -r [test(s)]
@@ -166,8 +175,8 @@ Test script environment:
 
     When developing a new test script keep the following things in
     mind.  All of the environment variables and shell procedures are
-    available to the script once the "common/rc" file has been
-    sourced.
+    available to the script once the "common/preamble" file has been
+    sourced and the "_begin_fstest" function has been called.
 
      1. The tests are run from an arbitrary directory.  If you want to
        do operations on an XFS filesystem (good idea, eh?), then do
@@ -241,6 +250,22 @@ Test script environment:
          in the ./new script. It can contain only alphanumeric characters
          and dash. Note the "NNN-" part is added automatically.
 
+     6. Test group membership: Each test can be associated with any number
+       of groups for convenient selection of subsets of tests.  Group names
+       can be any sequence of non-whitespace characters.  Test authors
+       associate a test with groups by passing the names of those groups as
+       arguments to the _begin_fstest function.  For example, the code:
+
+       _begin_fstest auto quick subvol snapshot
+
+       associates the current test with the "auto", "quick", "subvol", and
+       "snapshot" groups.  It is not necessary to specify the "all" group
+       in the list because that group is computed at run time.
+
+       The build process scans test files for _begin_fstest invocations and
+       compiles the group list from that information.  In other words, test
+       files must call _begin_fstest or they will not be run.
+
 Verified output:
 
     Each test script has a name, e.g. 007, and an associated