diff mbox series

[v2,7/6] Doc changes for afs

Message ID 1185265.1682712377@warthog.procyon.org.uk (mailing list archive)
State New, archived
Headers show
Series xfstests: Add support for using xfstests to test AFS | expand

Commit Message

David Howells April 28, 2023, 8:06 p.m. UTC
Documentation changes for afs.
    
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
---
 README                 |    3 ++-
 README.config-sections |    7 +++++++
 common/rc              |    4 +++-
 doc/testing-afs.txt    |   36 ++++++++++++++++++++++++++++++++++++
 4 files changed, 48 insertions(+), 2 deletions(-)

Comments

Zorro Lang April 30, 2023, 6:12 a.m. UTC | #1
On Fri, Apr 28, 2023 at 09:06:17PM +0100, David Howells wrote:
>     
> Documentation changes for afs.
>     
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: linux-afs@lists.infradead.org
> ---

This patch looks good.

>  README                 |    3 ++-
>  README.config-sections |    7 +++++++
>  common/rc              |    4 +++-
>  doc/testing-afs.txt    |   36 ++++++++++++++++++++++++++++++++++++

Hmm... In the past, fs specific docs are in README.* (e.g. README.overlay).
But I think it's time to move those README.* docs to doc/ directory. I'll
tidy the doc/ later.

Welcome more suggestions from others.

For this one ...

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  4 files changed, 48 insertions(+), 2 deletions(-)
> 
> diff --git a/README b/README
> index 4ee877a9..7eb6ac1b 100644
> --- a/README
> +++ b/README
> @@ -291,9 +291,10 @@ Running tests:
>      - 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)]
> -    - You can explicitly specify NFS/CIFS/OVERLAY, otherwise
> +    - You can explicitly specify NFS/AFS/CIFS/OVERLAY, otherwise
>        the filesystem type will be autodetected from $TEST_DEV:
>          - for running nfs tests: ./check -nfs [test(s)]
> +        - for running afs tests: ./check -afs [test(s)]
>          - for running cifs/smb3 tests: ./check -cifs [test(s)]
>          - for overlay tests: ./check -overlay [test(s)]
>            The TEST and SCRATCH partitions should be pre-formatted
> diff --git a/README.config-sections b/README.config-sections
> index 4f1a4dc6..a42d9d7b 100644
> --- a/README.config-sections
> +++ b/README.config-sections
> @@ -128,3 +128,10 @@ TEST_DIR=/mnt/gluster/test
>  TEST_DEV=192.168.1.1:testvol
>  SCRATCH_MNT=/mnt/gluster/scratch
>  SCRATCH_DEV=192.168.1.1:scratchvol
> +
> +[afs]
> +FSTYP=afs
> +TEST_DEV=%example.com:xfstest.test
> +TEST_DIR=/mnt/xfstest.test
> +SCRATCH_DEV=%example.com:xfstest.scratch
> +SCRATCH_MNT=/mnt/xfstest.scratch
> diff --git a/common/rc b/common/rc
> index 4dfc3301..e3805fcf 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1617,9 +1617,11 @@ _require_scratch_nocheck()
>  		fi
>  		;;
>  	afs)
> +		# We only support RW volumes (marked with a '%')
> +		# We don't support RO volumes (marked with a '#')
>  		echo $SCRATCH_DEV | grep -q "^%" > /dev/null 2>&1
>  		if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
> -			_notrun "this test requires a valid \$SCRATCH_DEV"
> +			_notrun "this test requires a valid \$SCRATCH_DEV (must be a RW volume)"
>  		fi
>  		if [ ! -d "$SCRATCH_MNT" ]; then
>  			_notrun "this test requires a valid \$SCRATCH_MNT"
> diff --git a/doc/testing-afs.txt b/doc/testing-afs.txt
> new file mode 100644
> index 00000000..75ed1331
> --- /dev/null
> +++ b/doc/testing-afs.txt
> @@ -0,0 +1,36 @@
> +				 ===========
> +				 TESTING AFS
> +				 ===========
> +
> +xfstests can be used with the Linux kernel AFS filesystem (kafs).  kafs mounts
> +each volume as a separate volume and, as such, allows them to be individually
> +mounted on arbitrary paths.  This allows xfstests to be easily configured to
> +use specific volumes.  This doesn't work with OpenAFS, say, as that operates
> +with everything in a single superblock.
> +
> +xfstests requires that the volumes specified by forced to use RW volumes by
> +prefixing the mount device with '%' rather than '#' as per the format of a
> +mountpoint string:
> +
> +	%<volume>
> +
> +using the workstation cell, or:
> +
> +	%<cell>:<volume>
> +
> +using an explicit cell.
> +
> +For example:
> +
> +	FSTYP=afs
> +	TEST_DEV=%example.com:xfstest.test
> +	TEST_DIR=/mnt/xfstest.test
> +	SCRATCH_DEV=%example.com:xfstest.scratch
> +	SCRATCH_MNT=/mnt/xfstest.scratch
> +
> +will use the xfstest.test and xfstest.scratch volumes located in the
> +example.com cell.
> +
> +
> +Note that AFS in general and kafs in particular lack a number of features that
> +can be tested for and so a lot of tests will be skipped.
>
diff mbox series

Patch

diff --git a/README b/README
index 4ee877a9..7eb6ac1b 100644
--- a/README
+++ b/README
@@ -291,9 +291,10 @@  Running tests:
     - 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)]
-    - You can explicitly specify NFS/CIFS/OVERLAY, otherwise
+    - You can explicitly specify NFS/AFS/CIFS/OVERLAY, otherwise
       the filesystem type will be autodetected from $TEST_DEV:
         - for running nfs tests: ./check -nfs [test(s)]
+        - for running afs tests: ./check -afs [test(s)]
         - for running cifs/smb3 tests: ./check -cifs [test(s)]
         - for overlay tests: ./check -overlay [test(s)]
           The TEST and SCRATCH partitions should be pre-formatted
diff --git a/README.config-sections b/README.config-sections
index 4f1a4dc6..a42d9d7b 100644
--- a/README.config-sections
+++ b/README.config-sections
@@ -128,3 +128,10 @@  TEST_DIR=/mnt/gluster/test
 TEST_DEV=192.168.1.1:testvol
 SCRATCH_MNT=/mnt/gluster/scratch
 SCRATCH_DEV=192.168.1.1:scratchvol
+
+[afs]
+FSTYP=afs
+TEST_DEV=%example.com:xfstest.test
+TEST_DIR=/mnt/xfstest.test
+SCRATCH_DEV=%example.com:xfstest.scratch
+SCRATCH_MNT=/mnt/xfstest.scratch
diff --git a/common/rc b/common/rc
index 4dfc3301..e3805fcf 100644
--- a/common/rc
+++ b/common/rc
@@ -1617,9 +1617,11 @@  _require_scratch_nocheck()
 		fi
 		;;
 	afs)
+		# We only support RW volumes (marked with a '%')
+		# We don't support RO volumes (marked with a '#')
 		echo $SCRATCH_DEV | grep -q "^%" > /dev/null 2>&1
 		if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
-			_notrun "this test requires a valid \$SCRATCH_DEV"
+			_notrun "this test requires a valid \$SCRATCH_DEV (must be a RW volume)"
 		fi
 		if [ ! -d "$SCRATCH_MNT" ]; then
 			_notrun "this test requires a valid \$SCRATCH_MNT"
diff --git a/doc/testing-afs.txt b/doc/testing-afs.txt
new file mode 100644
index 00000000..75ed1331
--- /dev/null
+++ b/doc/testing-afs.txt
@@ -0,0 +1,36 @@ 
+				 ===========
+				 TESTING AFS
+				 ===========
+
+xfstests can be used with the Linux kernel AFS filesystem (kafs).  kafs mounts
+each volume as a separate volume and, as such, allows them to be individually
+mounted on arbitrary paths.  This allows xfstests to be easily configured to
+use specific volumes.  This doesn't work with OpenAFS, say, as that operates
+with everything in a single superblock.
+
+xfstests requires that the volumes specified by forced to use RW volumes by
+prefixing the mount device with '%' rather than '#' as per the format of a
+mountpoint string:
+
+	%<volume>
+
+using the workstation cell, or:
+
+	%<cell>:<volume>
+
+using an explicit cell.
+
+For example:
+
+	FSTYP=afs
+	TEST_DEV=%example.com:xfstest.test
+	TEST_DIR=/mnt/xfstest.test
+	SCRATCH_DEV=%example.com:xfstest.scratch
+	SCRATCH_MNT=/mnt/xfstest.scratch
+
+will use the xfstest.test and xfstest.scratch volumes located in the
+example.com cell.
+
+
+Note that AFS in general and kafs in particular lack a number of features that
+can be tested for and so a lot of tests will be skipped.