Skip to contentSkip to conversation

cifs: add documentation on how to run xfstest

PATCH New Ronnie Sahlberg 1 participant 3 messages May 21, 2018

lore
Share & tools
lore
#0 lore raw

cover cifs: add documentation on how to run xfstest

List, All,

Please find a patch that adds a basic README file for cifs testing and some useful configuration templates and exclusion files.

The exclusion files are currently only for SMB3, the dialect where most crunch/interest is right now, but will later be expanded to include also earlier dialects.

The purpose of the exclusion files and the reason for having them in the git tree is to avoid the current situation where all cifs developers have their own scripts and their own list of tests ro run or not to run. These are all, of course, not synchronized so I expect everyone to run slightly different tests.
If we have this in git then we have one canonical list of tests that are run and also explanations for why some tests are expected to fail.
In particular the latter would be useful for newcomers as it might not be immediately obvious why a whole bunch of tests would fail and if it is expected or not.

#1 lore raw

PATCH 1/1 cifs: Add README.cifs, example configs and blacklist files

This is an initial patch to provide quickstart instructions for how to use xfstest for CIFS.
It contains configuration examples as well as exclusion files for tests that are either broken for SMB3 or just take unreasonably long for causal testing.

Future patches will add similar exclude files for other dialects such as SMB2, SMB2.1 and CIFS.

The aim is to have one canonical place where we have documentation on how to set xfstest up for cifs testing and one canonical place where we document which tests work and which does not.

---
 README.cifs                          |  87 ++++++++++++++++++++++++++++
 tests/cifs/exclude.known-broken-smb3 | 108 +++++++++++++++++++++++++++++++++++
 tests/cifs/exclude.very-slow         |   4 ++
 tests/cifs/local.config.example      |  32 +++++++++++
 4 files changed, 231 insertions(+)
 create mode 100644 README.cifs
 create mode 100644 tests/cifs/exclude.known-broken-smb3
 create mode 100644 tests/cifs/exclude.very-slow
 create mode 100644 tests/cifs/local.config.example
README.cifs new file +87 -0
new file mode 100644
index 00000000..71907a06
@@ -0,0 +1,87 @@
+This describes how to run xfstests for the CIFS filesystem.
+
+There is additional information on testing cifs with xfstest on the samba
+wiki : https://wiki.samba.org/index.php/Xfstesting-cifs
+
+
+
+Quick Setup
+===========
+
+local.config
+------------
+Xfstests needs two cifs shares. One normal share and one scratch share.
+The data on the scratch share will be destroyed so set this up as a dedicate
+share on your server and do not store anything important in it.
+
+The first thing we need is to set up some stanzas for different smb dialects.
+These dialects can then be selected using the -s command line option making
+it a convenient way to pick a specific version of smb to test.
+
+In the root of the xfstests directory, edit the local.config and replace the
+content with the example below.
+This example is also available in the file ./tests/cifs/local.config.examples.
+
+Change SERVER, SHARE, SCRATCH, USERNAME, PASSWORD to match your shares.
+
+Create the /mnt/test and /mnt/share mountpoints.
+
+---local.config---begin---
+[cifs]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb2]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb21]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb3]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+---local.config---end---
+
+
+Your first test
+---------------
+With some luck you should be ready to run your first xfstest now.
+This will run only the cifs-specific tests and should finish within a few
+seconds.
+
+    sudo ./check -s smb3 -g cifs/quick
+
+Running full set of tests
+=========================
+When runnig the "full" set of tests there are multiple tests that are
+known to fail. Reasons can be that they just don't map well to cifs,
+we are missing features in cifs or there are bugs that needs to be fixed.
+
+For regression testing is useful to run all the tests that are known to work.
+We can acheive this per protocol version using exclude files and filter
+out the known broken tests.
+
+SMB3
+----
+
+    sudo ./check -s smb3 -E tests/cifs/exclude.known-broken-smb3 \
+        -E tests/cifs/exclude.very-slow
tests/cifs/exclude.known-broken-smb3 new file +108 -0

109 lines not on this page · raw message

tests/cifs/exclude.very-slow new file +4 -0
new file mode 100644
index 00000000..aaee0537
@@ -0,0 +1,4 @@
+# Exclude list for tests that are very slow on a network
+#
+generic/129
+generic/438
tests/cifs/local.config.example new file +32 -0
new file mode 100644
index 00000000..01e4e1b6
@@ -0,0 +1,32 @@
+[cifs]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb2]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb21]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb3]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
Signature · 1 line
2.13.3
#2 lore raw

Re: [PATCH] cifs: Add README.cifs, example configs and blacklist files

Please ignore this patch. It is residuals from before I got git-send-email setup correctly. The real patch is "[PATCH] cifs: Add README.cifs"

Sorry,
Ronnie Sahlberg

----- Original Message -----
From: "Ronnie Sahlberg" <[email protected]>
To: "fstests" <[email protected]>
Cc: "Steve French" <[email protected]>
Sent: Thursday, 17 May, 2018 1:55:53 PM
Subject: [PATCH] cifs: Add README.cifs, example configs and blacklist files

This is an initial patch to provide quickstart instructions for how to use xfstest for CIFS.
It contains configuration examples as well as exclusion files for tests that are either broken for SMB3 or just take unreasonably long for causal testing.

Future patches will add similar exclude files for other dialects such as SMB2, SMB2.1 and CIFS.

The aim is to have one canonical place where we have documentation on how to set xfstest up for cifs testing and one canonical place where we document which tests work and which does not.

---
 README.cifs                          |  87 ++++++++++++++++++++++++++++
 tests/cifs/exclude.known-broken-smb3 | 108 +++++++++++++++++++++++++++++++++++
 tests/cifs/exclude.very-slow         |   4 ++
 tests/cifs/local.config.example      |  32 +++++++++++
 4 files changed, 231 insertions(+)
 create mode 100644 README.cifs
 create mode 100644 tests/cifs/exclude.known-broken-smb3
 create mode 100644 tests/cifs/exclude.very-slow
 create mode 100644 tests/cifs/local.config.example
README.cifs new file +87 -0
new file mode 100644
index 00000000..71907a06
@@ -0,0 +1,87 @@
+This describes how to run xfstests for the CIFS filesystem.
+
+There is additional information on testing cifs with xfstest on the samba
+wiki : https://wiki.samba.org/index.php/Xfstesting-cifs
+
+
+
+Quick Setup
+===========
+
+local.config
+------------
+Xfstests needs two cifs shares. One normal share and one scratch share.
+The data on the scratch share will be destroyed so set this up as a dedicate
+share on your server and do not store anything important in it.
+
+The first thing we need is to set up some stanzas for different smb dialects.
+These dialects can then be selected using the -s command line option making
+it a convenient way to pick a specific version of smb to test.
+
+In the root of the xfstests directory, edit the local.config and replace the
+content with the example below.
+This example is also available in the file ./tests/cifs/local.config.examples.
+
+Change SERVER, SHARE, SCRATCH, USERNAME, PASSWORD to match your shares.
+
+Create the /mnt/test and /mnt/share mountpoints.
+
+---local.config---begin---
+[cifs]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb2]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb21]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb3]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+---local.config---end---
+
+
+Your first test
+---------------
+With some luck you should be ready to run your first xfstest now.
+This will run only the cifs-specific tests and should finish within a few
+seconds.
+
+    sudo ./check -s smb3 -g cifs/quick
+
+Running full set of tests
+=========================
+When runnig the "full" set of tests there are multiple tests that are
+known to fail. Reasons can be that they just don't map well to cifs,
+we are missing features in cifs or there are bugs that needs to be fixed.
+
+For regression testing is useful to run all the tests that are known to work.
+We can acheive this per protocol version using exclude files and filter
+out the known broken tests.
+
+SMB3
+----
+
+    sudo ./check -s smb3 -E tests/cifs/exclude.known-broken-smb3 \
+        -E tests/cifs/exclude.very-slow
tests/cifs/exclude.known-broken-smb3 new file +108 -0

109 lines not on this page · raw message

tests/cifs/exclude.very-slow new file +4 -0
new file mode 100644
index 00000000..aaee0537
@@ -0,0 +1,4 @@
+# Exclude list for tests that are very slow on a network
+#
+generic/129
+generic/438
tests/cifs/local.config.example new file +32 -0
new file mode 100644
index 00000000..01e4e1b6
@@ -0,0 +1,32 @@
+[cifs]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=1.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb2]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb21]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=2.1,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
+[smb3]
+FSTYP=cifs
+TEST_DEV=//SERVER/SHARE
+TEST_DIR=/mnt/test
+TEST_FS_MOUNT_OPTS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+MOUNT_OPTIONS='-ousername=USERNAME,password=PASSWORD,noperm,vers=3.0,mfsymlinks,actimeo=0'
+SCRATCH_DEV=//SERVER/SCRATCH
+SCRATCH_MNT=/mnt/scratch
Signature · 6 lines
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html