FS/XFS testing framework
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] Rewrite the check argument parsing
@ 2026-05-12 13:25 Zorro Lang
  2026-05-12 13:25 ` [RFC PATCH 1/4] check: refactor argument parsing with getopt Zorro Lang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zorro Lang @ 2026-05-12 13:25 UTC (permalink / raw)
  To: fstests; +Cc: Theodore Ts'o

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-12 13:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [RFC PATCH 4/4] check: add deprecated options warning Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox