From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Cc: Theodore Ts'o <tytso@mit.edu>,
Ojaswin Mujoo <ojaswin@linux.ibm.com>,
"Darrick J . Wong" <djwong@kernel.org>
Subject: [PATCH 4/4] check: add deprecated options warning
Date: Wed, 26 Aug 2026 18:28:57 +0800 [thread overview]
Message-ID: <20260826102857.3224318-5-zlang@kernel.org> (raw)
In-Reply-To: <20260826102857.3224318-1-zlang@kernel.org>
To notify xfstests users of deprecated options, add a warning which
does not interfere with test results or golden output.
Signed-off-by: Zorro Lang <zlang@kernel.org>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
---
check | 77 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 63 insertions(+), 14 deletions(-)
diff --git a/check b/check
index df209f1f..bca30215 100755
--- a/check
+++ b/check
@@ -275,6 +275,14 @@ _prepare_test_list()
rm -f $tmp.list
}
+deprecated_opt_warn()
+{
+ local old=$1
+ shift
+
+ echo "[WARN] $old is deprecated, replace it with $*"
+}
+
# Backward compatible with the old options mode. Translate word-style options
# that getopt would misinterpret into long options.
compat_old_option()
@@ -282,20 +290,61 @@ compat_old_option()
check_args=()
while [ $# -gt 0 ]; do
case "$1" in
- -nfs) check_args+=("--fs" "nfs") ;;
- -afs) check_args+=("--fs" "afs") ;;
- -glusterfs) check_args+=("--fs" "glusterfs") ;;
- -cifs) check_args+=("--fs" "cifs") ;;
- -9p) check_args+=("--fs" "9p") ;;
- -fuse) check_args+=("--fs" "fuse") ;;
- -virtiofs) check_args+=("--fs" "virtiofs") ;;
- -pvfs2) check_args+=("--fs" "pvfs2") ;;
- -tmpfs) check_args+=("--fs" "tmpfs") ;;
- -ubifs) check_args+=("--fs" "ubifs") ;;
- -overlay) check_args+=("--fs" "overlay") ;;
- -udiff) check_args+=("--udiff") ;;
- -\?) check_args+=("--help") ;;
- *) check_args+=("$1") ;;
+ -nfs)
+ check_args+=("--fs" "nfs")
+ deprecated_opt_warn "-nfs" "--fs nfs"
+ ;;
+ -afs)
+ check_args+=("--fs" "afs")
+ deprecated_opt_warn "-afs" "--fs afs"
+ ;;
+ -glusterfs)
+ check_args+=("--fs" "glusterfs")
+ deprecated_opt_warn "-glusterfs" "--fs glusterfs"
+ ;;
+ -cifs)
+ check_args+=("--fs" "cifs")
+ deprecated_opt_warn "-cifs" "--fs cifs"
+ ;;
+ -9p)
+ check_args+=("--fs" "9p")
+ deprecated_opt_warn "-9p" "--fs 9p"
+ ;;
+ -fuse)
+ check_args+=("--fs" "fuse")
+ deprecated_opt_warn "-fuse" "--fs fuse"
+ ;;
+ -virtiofs)
+ check_args+=("--fs" "virtiofs")
+ deprecated_opt_warn "-virtiofs" "--fs virtiofs"
+ ;;
+ -pvfs2)
+ check_args+=("--fs" "pvfs2")
+ deprecated_opt_warn "-pvfs2" "--fs pvfs2"
+ ;;
+ -tmpfs)
+ check_args+=("--fs" "tmpfs")
+ deprecated_opt_warn "-tmpfs" "--fs tmpfs"
+ ;;
+ -ubifs)
+ check_args+=("--fs" "ubifs")
+ deprecated_opt_warn "-ubifs" "--fs ubifs"
+ ;;
+ -overlay)
+ check_args+=("--fs" "overlay")
+ deprecated_opt_warn "-overlay" "--fs overlay"
+ ;;
+ -udiff)
+ check_args+=("--udiff")
+ deprecated_opt_warn "-udiff" "--udiff"
+ ;;
+ -\?)
+ check_args+=("--help")
+ deprecated_opt_warn "-\?" "-h or --help"
+ ;;
+ *)
+ check_args+=("$1")
+ ;;
esac
shift
done
--
2.55.0
prev parent reply other threads:[~2026-08-26 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 10:28 [PATCH 0/4] Rewrite the check argument parsing Zorro Lang
2026-08-26 10:28 ` [PATCH 1/4] check: refactor argument parsing with getopt Zorro Lang
2026-08-31 8:16 ` Ojaswin Mujoo
2026-08-26 10:28 ` [PATCH 2/4] check: update usage and README to reflect new argument parsing Zorro Lang
2026-08-26 10:28 ` [PATCH 3/4] check: consolidate argument handling into function Zorro Lang
2026-08-26 10:28 ` Zorro Lang [this message]
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=20260826102857.3224318-5-zlang@kernel.org \
--to=zlang@kernel.org \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.