From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.de>
Cc: linux-xfs@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>,
"Darrick J . Wong" <djwong@kernel.org>,
ltp@lists.linux.it, Cyril Hrubis <chrubis@suse.cz>
Subject: Re: [LTP] [PATCH 1/1] df01.sh: Use own fsfreeze implementation for XFS
Date: Tue, 18 Oct 2022 10:41:13 +0200 [thread overview]
Message-ID: <Y05mqQxG5NVukQNP@pevik> (raw)
In-Reply-To: <87k04xmt4i.fsf@suse.de>
> Hello,
> Petr Vorel <pvorel@suse.cz> writes:
> > Hi Richie,
> >> Hello,
> >> Petr Vorel <pvorel@suse.cz> writes:
> >> > df01.sh started to fail on XFS on certain configuration since mkfs.xfs
> >> > and kernel 5.19. Implement fsfreeze instead of introducing external
> >> > dependency. NOTE: implementation could fail on other filesystems
> >> > (EOPNOTSUPP on exfat, ntfs, vfat).
> >> > Suggested-by: Darrick J. Wong <djwong@kernel.org>
> >> > Suggested-by: Eric Sandeen <sandeen@redhat.com>
> >> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> >> > ---
> >> > Hi,
> >> > FYI the background of this issue:
> >> > https://lore.kernel.org/ltp/Yv5oaxsX6z2qxxF3@magnolia/
> >> > https://lore.kernel.org/ltp/974cc110-d47e-5fae-af5f-e2e610720e2d@redhat.com/
> >> > @LTP developers: not sure if the consensus is to avoid LTP API
> >> > completely (even use it just with TST_NO_DEFAULT_MAIN), if required I
> >> Why would that be the consensus? :-)
> > $ ls testcases/lib/*.c |wc -l
> > 19
> > $ git grep -l TST_NO_DEFAULT_MAIN testcases/lib/*.c |wc -l
> > 9
> > => 10 tests not use tst_test.h at all.
> > => none is *not* defining TST_NO_DEFAULT_MAIN (not a big surprise),
> > but 2 of them (testcases/lib/tst_device.c, testcases/lib/tst_get_free_pids.c)
> > implement workaround to force messages to be printed from the new library
> > (tst_test.c).
> Possibly the reason for this is that it's not clear whether some core
> library functions will work as expected if we create an executable with
> TST_NO_DEFAULT_MAIN.
> However most stuff works fine.
> > static struct tst_test test = {
> > };
> > tst_test = &test;
> > My opinion also was based on Cyril's comments on nfs05_make_tree.c patch, but he
> > probably meant to just use TST_NO_DEFAULT_MAIN instead of struct tst_test test:
> > https://lore.kernel.org/ltp/YqxFo1iFzHatNRIl@yuki/
> Certainly we shouldn't put a test struct in anything which is not a
> test. Possibly we could create a util struct
> >> > can rewrite to use it just to get SAFE_*() macros (like
> >> > testcases/lib/tst_checkpoint.c) or even with tst_test workarounds
> >> > (testcases/lib/tst_get_free_pids.c).
> >> Yes, it should work fine with TST_NO_DEFAULT_MAIN
> > Both versions IMHO work well, the question what we prefer more.
> > Do you vote for rewriting?
> Yes, avoiding the LTP library caused a number of problems in sparse-ltp
> and the ltx prototype. Then I found linking in the LTP libs with
> TST_NO_DEFAULT_MAIN to ltx and using tst_res(TBROK, ...) etc. worked
> fine.
Well, this simple utility works without LTP library. It's more a matter of
style. OK, I'll send TST_NO_DEFAULT_MAIN version and let the community decide.
Kind regards,
Petr
WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.de>
Cc: linux-xfs@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>,
ltp@lists.linux.it, "Darrick J . Wong" <djwong@kernel.org>
Subject: Re: [LTP] [PATCH 1/1] df01.sh: Use own fsfreeze implementation for XFS
Date: Tue, 18 Oct 2022 10:41:13 +0200 [thread overview]
Message-ID: <Y05mqQxG5NVukQNP@pevik> (raw)
In-Reply-To: <87k04xmt4i.fsf@suse.de>
> Hello,
> Petr Vorel <pvorel@suse.cz> writes:
> > Hi Richie,
> >> Hello,
> >> Petr Vorel <pvorel@suse.cz> writes:
> >> > df01.sh started to fail on XFS on certain configuration since mkfs.xfs
> >> > and kernel 5.19. Implement fsfreeze instead of introducing external
> >> > dependency. NOTE: implementation could fail on other filesystems
> >> > (EOPNOTSUPP on exfat, ntfs, vfat).
> >> > Suggested-by: Darrick J. Wong <djwong@kernel.org>
> >> > Suggested-by: Eric Sandeen <sandeen@redhat.com>
> >> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> >> > ---
> >> > Hi,
> >> > FYI the background of this issue:
> >> > https://lore.kernel.org/ltp/Yv5oaxsX6z2qxxF3@magnolia/
> >> > https://lore.kernel.org/ltp/974cc110-d47e-5fae-af5f-e2e610720e2d@redhat.com/
> >> > @LTP developers: not sure if the consensus is to avoid LTP API
> >> > completely (even use it just with TST_NO_DEFAULT_MAIN), if required I
> >> Why would that be the consensus? :-)
> > $ ls testcases/lib/*.c |wc -l
> > 19
> > $ git grep -l TST_NO_DEFAULT_MAIN testcases/lib/*.c |wc -l
> > 9
> > => 10 tests not use tst_test.h at all.
> > => none is *not* defining TST_NO_DEFAULT_MAIN (not a big surprise),
> > but 2 of them (testcases/lib/tst_device.c, testcases/lib/tst_get_free_pids.c)
> > implement workaround to force messages to be printed from the new library
> > (tst_test.c).
> Possibly the reason for this is that it's not clear whether some core
> library functions will work as expected if we create an executable with
> TST_NO_DEFAULT_MAIN.
> However most stuff works fine.
> > static struct tst_test test = {
> > };
> > tst_test = &test;
> > My opinion also was based on Cyril's comments on nfs05_make_tree.c patch, but he
> > probably meant to just use TST_NO_DEFAULT_MAIN instead of struct tst_test test:
> > https://lore.kernel.org/ltp/YqxFo1iFzHatNRIl@yuki/
> Certainly we shouldn't put a test struct in anything which is not a
> test. Possibly we could create a util struct
> >> > can rewrite to use it just to get SAFE_*() macros (like
> >> > testcases/lib/tst_checkpoint.c) or even with tst_test workarounds
> >> > (testcases/lib/tst_get_free_pids.c).
> >> Yes, it should work fine with TST_NO_DEFAULT_MAIN
> > Both versions IMHO work well, the question what we prefer more.
> > Do you vote for rewriting?
> Yes, avoiding the LTP library caused a number of problems in sparse-ltp
> and the ltx prototype. Then I found linking in the LTP libs with
> TST_NO_DEFAULT_MAIN to ltx and using tst_res(TBROK, ...) etc. worked
> fine.
Well, this simple utility works without LTP library. It's more a matter of
style. OK, I'll send TST_NO_DEFAULT_MAIN version and let the community decide.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-10-18 8:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 9:08 [PATCH 1/1] df01.sh: Use own fsfreeze implementation for XFS Petr Vorel
2022-10-04 9:08 ` [LTP] " Petr Vorel
2022-10-04 16:13 ` Darrick J. Wong
2022-10-04 16:13 ` [LTP] " Darrick J. Wong
2022-10-05 6:23 ` Petr Vorel
2022-10-05 6:23 ` [LTP] " Petr Vorel
2022-10-17 14:20 ` Richard Palethorpe
2022-10-17 14:20 ` Richard Palethorpe
2022-10-17 15:11 ` Petr Vorel
2022-10-17 15:11 ` Petr Vorel
2022-10-18 8:19 ` Richard Palethorpe
2022-10-18 8:19 ` Richard Palethorpe
2022-10-18 8:41 ` Petr Vorel [this message]
2022-10-18 8:41 ` Petr Vorel
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=Y05mqQxG5NVukQNP@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.de \
--cc=sandeen@redhat.com \
/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.