* [PATCH] fsx: add missing -T option to getopt_long()
@ 2026-01-12 13:44 fdmanana
2026-01-13 16:02 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: fdmanana @ 2026-01-12 13:44 UTC (permalink / raw)
To: fstests; +Cc: linux-btrfs, Filipe Manana
From: Filipe Manana <fdmanana@suse.com>
Currently fsx fails with an invalid argument error when we pass the -T
option (do not use dontcache IO) to it because it's not listed in the
gepopt_long() call.
Fix this and add T to the getopt_long() call.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
ltp/fsx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ltp/fsx.c b/ltp/fsx.c
index 626976dd..8626662b 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -3160,7 +3160,7 @@ main(int argc, char **argv)
setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
while ((ch = getopt_long(argc, argv,
- "0ab:c:de:fg:hi:j:kl:m:no:p:qr:s:t:uw:xyABD:EFJKHzCILN:OP:RS:UWXZ",
+ "0ab:c:de:fg:hi:j:kl:m:no:p:qr:s:t:uw:xyABD:EFJKHzCILN:TOP:RS:UWXZ",
longopts, NULL)) != EOF)
switch (ch) {
case 'a':
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] fsx: add missing -T option to getopt_long()
2026-01-12 13:44 [PATCH] fsx: add missing -T option to getopt_long() fdmanana
@ 2026-01-13 16:02 ` Christoph Hellwig
2026-01-13 17:12 ` Darrick J. Wong
2026-01-18 17:18 ` Zorro Lang
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2026-01-13 16:02 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fsx: add missing -T option to getopt_long()
2026-01-12 13:44 [PATCH] fsx: add missing -T option to getopt_long() fdmanana
2026-01-13 16:02 ` Christoph Hellwig
@ 2026-01-13 17:12 ` Darrick J. Wong
2026-01-18 17:18 ` Zorro Lang
2 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2026-01-13 17:12 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Mon, Jan 12, 2026 at 01:44:09PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> Currently fsx fails with an invalid argument error when we pass the -T
> option (do not use dontcache IO) to it because it's not listed in the
> gepopt_long() call.
>
> Fix this and add T to the getopt_long() call.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Oops, I totally didn't notice this omission: :(
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> ltp/fsx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index 626976dd..8626662b 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -3160,7 +3160,7 @@ main(int argc, char **argv)
> setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
>
> while ((ch = getopt_long(argc, argv,
> - "0ab:c:de:fg:hi:j:kl:m:no:p:qr:s:t:uw:xyABD:EFJKHzCILN:OP:RS:UWXZ",
> + "0ab:c:de:fg:hi:j:kl:m:no:p:qr:s:t:uw:xyABD:EFJKHzCILN:TOP:RS:UWXZ",
> longopts, NULL)) != EOF)
> switch (ch) {
> case 'a':
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] fsx: add missing -T option to getopt_long()
2026-01-12 13:44 [PATCH] fsx: add missing -T option to getopt_long() fdmanana
2026-01-13 16:02 ` Christoph Hellwig
2026-01-13 17:12 ` Darrick J. Wong
@ 2026-01-18 17:18 ` Zorro Lang
2 siblings, 0 replies; 4+ messages in thread
From: Zorro Lang @ 2026-01-18 17:18 UTC (permalink / raw)
To: fdmanana; +Cc: fstests, linux-btrfs, Filipe Manana
On Mon, Jan 12, 2026 at 01:44:09PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> Currently fsx fails with an invalid argument error when we pass the -T
> option (do not use dontcache IO) to it because it's not listed in the
> gepopt_long() call.
>
> Fix this and add T to the getopt_long() call.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> ---
Wow, so no one used this option before :) I just tried to search in xfstests,
I didn't find any test cases or common helpers use the -T option of fsx, that's
why we didn't find this issue before. I think you might test with FSX_AVOID="-T"
or run fsx with -T manually. Anyway, thanks for finding and fixing this issue!
Reviewed-by: Zorro Lang <zlang@redhat.com>
Thanks,
Zorro
> ltp/fsx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index 626976dd..8626662b 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -3160,7 +3160,7 @@ main(int argc, char **argv)
> setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
>
> while ((ch = getopt_long(argc, argv,
> - "0ab:c:de:fg:hi:j:kl:m:no:p:qr:s:t:uw:xyABD:EFJKHzCILN:OP:RS:UWXZ",
> + "0ab:c:de:fg:hi:j:kl:m:no:p:qr:s:t:uw:xyABD:EFJKHzCILN:TOP:RS:UWXZ",
> longopts, NULL)) != EOF)
> switch (ch) {
> case 'a':
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-18 17:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 13:44 [PATCH] fsx: add missing -T option to getopt_long() fdmanana
2026-01-13 16:02 ` Christoph Hellwig
2026-01-13 17:12 ` Darrick J. Wong
2026-01-18 17:18 ` Zorro Lang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox