FS/XFS testing framework
 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 0/4] Rewrite the check argument parsing
Date: Tue, 12 May 2026 21:25:35 +0800	[thread overview]
Message-ID: <20260512132539.931482-1-zlang@kernel.org> (raw)

The patchset here were motivated by a previous RFC discussion regarding:
https://lore.kernel.org/fstests/afzmt7SFA4jWhi6U@zlang-mailbox/T/#t

This patchset refactors the argument parsing logic in the 'check' script.
The current positional parameter handling is becoming hard to maintain as
we add more options.

I've replaced the manual parsing loop with *getopt* to provide a more
standard CLI experience, and ensured the functionality remains identical
to the previous implementation.

Besides that, I also tried to make below 3 changes:
1) Introduced --fs <fstyp> option, to replace all those filesystem-specific
   options, e.g. -nfs, -overlay, -cifs and so on.
2) Updated all long-format options to strictly use the double-dash (--) prefix.
3) For backward compatibility, I tried to support legacy non-standard options
   to ensure existing user workflows aren't broken. A deprecation warning is
   now issued when these old options are used.

I hope this patchset can facilitate future additions and adjustments to
arguments, making the code logic cleaner and more standardized.

Any concerns or review points, please feel free to tell me :)

Thanks,
Zorro

Zorro Lang (4):
  check: refactor argument parsing with getopt
  check: update usage and README to reflect new argument parsing
  check: consolidate argument handling into function
  check: add deprecated options warning

 README         |  10 +-
 README.overlay |  18 +-
 check          | 435 ++++++++++++++++++++++++++++++++-----------------
 common/config  |   8 +-
 common/rc      |   2 +-
 5 files changed, 303 insertions(+), 170 deletions(-)

-- 
2.54.0


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 13:25 Zorro Lang [this message]
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 ` [RFC PATCH 4/4] check: add deprecated options warning 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-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox