From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>, Zorro Lang <zlang@redhat.com>
Cc: "Darrick J . Wong" <darrick.wong@oracle.com>,
Luis Chamberlain <mcgrof@kernel.org>,
fstests@vger.kernel.org
Subject: [PATCH 3/3] common: add run option to skip tests for known issues
Date: Sun, 17 Apr 2022 20:40:23 +0300 [thread overview]
Message-ID: <20220417174023.3244263-4-amir73il@gmail.com> (raw)
In-Reply-To: <20220417174023.3244263-1-amir73il@gmail.com>
Some tests are written before a fix is merged upstream and some tests
are written without a known available fix at all. Such is the case with
test overlay/061.
Introduce a helper _known_issues_on_fs() which can be used to document
this situation and print a hint on failure.
The helper supports specifying specifc fs with the known issue for
generic tests as well as the notation ^FS1 ^FS2 to indicate a known issue
on all filesystems expect for FS1 FS2.
Setting the variable SKIP_KNOWN_ISSUES=yes, will cause all tests
annotated as known issues for the tested fs to be skipped.
A future improvement may provide a run option to skip tests based on
_known_issues_before_kernel when running the tests on an older kernel
version.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
README | 2 ++
common/rc | 16 +++++++++++++++-
tests/overlay/061 | 2 ++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/README b/README
index 7da66cb6..8abc3840 100644
--- a/README
+++ b/README
@@ -241,6 +241,8 @@ Misc:
this option is supported for all filesystems currently only -overlay is
expected to run without issues. For other filesystems additional patches
and fixes to the test suite might be needed.
+ - set SKIP_KNOWN_ISSUES=yes to skip tests for bug without a known fix.
+ Those tests are annotated with _known_issue_on_fs helper.
______________________
USING THE FSQA SUITE
diff --git a/common/rc b/common/rc
index 2e9dc408..3cf60a7e 100644
--- a/common/rc
+++ b/common/rc
@@ -1597,8 +1597,23 @@ _supported_fs()
_notrun "not suitable for this filesystem type: $FSTYP"
}
+_known_issue_on_fs()
+{
+ # Only "supported" fs have the known issue
+ _check_supported_fs $* || return
+
+ if [ "$SKIP_KNOWN_ISSUES" = "yes" ]; then
+ _notrun "known issue for this filesystem type: $FSTYP"
+ fi
+
+ echo "HINT: You _MAY_ be hit by a known issue for filesystem type $FSTYP." >> $seqres.hints
+ echo >> $seqres.hints
+}
+
_known_issue_before_kernel()
{
+ # TODO: don't run if $SKIP_KNOWN_ISSUES and kernel version < $1
+
echo "HINT: You _MAY_ be hit by a known issue on kernel version < $1." >> $seqres.hints
echo >> $seqres.hints
}
@@ -4929,7 +4944,6 @@ _require_kernel_config()
_has_kernel_config $1 || _notrun "Installed kernel not built with $1"
}
-
init_rc
################################################################################
diff --git a/tests/overlay/061 b/tests/overlay/061
index b80cf5a0..36be3391 100755
--- a/tests/overlay/061
+++ b/tests/overlay/061
@@ -22,6 +22,8 @@ _begin_fstest posix copyup
# real QA test starts here
_supported_fs overlay
+_known_issue_on_fs overlay
+
_require_scratch
_require_xfs_io_command "open"
--
2.35.1
next prev parent reply other threads:[~2022-04-17 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-17 17:40 [PATCH 0/3] Annonate fstests with possible reasons for failure Amir Goldstein
2022-04-17 17:40 ` [PATCH 1/3] common: support black listing fs in _supported_fs() Amir Goldstein
2022-04-18 4:33 ` Zorro Lang
2022-04-17 17:40 ` [PATCH 2/3] common: print hints for reasons of test failures Amir Goldstein
2022-04-18 4:52 ` Zorro Lang
2022-04-18 5:26 ` Amir Goldstein
2022-04-18 15:18 ` Theodore Ts'o
2022-04-18 15:50 ` Amir Goldstein
2022-04-17 17:40 ` Amir Goldstein [this message]
2022-04-18 5:05 ` [PATCH 3/3] common: add run option to skip tests for known issues Zorro Lang
2022-04-18 5:56 ` Amir Goldstein
2022-04-18 9:06 ` Zorro Lang
2022-04-18 10:03 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220417174023.3244263-4-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=mcgrof@kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox