All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Cc: Theodore Ts'o <tytso@mit.edu>
Subject: [RFC PATCH 4/4] check: add deprecated options warning
Date: Tue, 12 May 2026 21:25:39 +0800	[thread overview]
Message-ID: <20260512132539.931482-5-zlang@kernel.org> (raw)
In-Reply-To: <20260512132539.931482-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>
---
 check | 72 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 59 insertions(+), 13 deletions(-)

diff --git a/check b/check
index d19498e6..012b566c 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,19 +290,57 @@ 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+=("$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+=("$1")
+			;;
 		esac
 		shift
 	done
-- 
2.54.0


  parent reply	other threads:[~2026-05-12 13:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 13:25 [RFC PATCH 0/4] Rewrite the check argument parsing Zorro Lang
2026-05-12 13:25 ` [RFC PATCH 1/4] check: refactor argument parsing with getopt Zorro Lang
2026-05-12 13:25 ` [RFC PATCH 2/4] check: update usage and README to reflect new argument parsing Zorro Lang
2026-05-12 13:25 ` [RFC PATCH 3/4] check: consolidate argument handling into function Zorro Lang
2026-05-12 13:25 ` Zorro Lang [this message]
2026-08-13 15:30 ` [RFC PATCH 0/4] Rewrite the check argument parsing Zorro Lang

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=20260512132539.931482-5-zlang@kernel.org \
    --to=zlang@kernel.org \
    --cc=fstests@vger.kernel.org \
    --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.