fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] generic/258: check filesystem support for negative timestamps
@ 2020-03-04 16:11 Luis Henriques
  2020-03-04 18:28 ` Amir Goldstein
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Henriques @ 2020-03-04 16:11 UTC (permalink / raw)
  To: fstests; +Cc: Luis Henriques

Some filesystems do not support negative c/m/atime timestamps.  And for
these filesystems, generic/258 will fail.  Since there's currently no way
to check sb->s_time_min from userspace, this patch adds a new common/rc
function _require_negative_timestamps() that will _notrun depending on the
$FSTYP variable.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
---
Hi!

I'm only adding 'ceph' to the _require_negative_timestamps() case because
that was the only filesystem with s_time_min = 0 that I was able to test.
However, a simple grep indicates there are a few other filesystems that
would also be required there (e.g. nfs version < 4).

Cheers,
--
Luis

 common/rc         | 8 ++++++++
 tests/generic/258 | 1 +
 2 files changed, 9 insertions(+)

diff --git a/common/rc b/common/rc
index 0306e93cb1ca..067f30cecde7 100644
--- a/common/rc
+++ b/common/rc
@@ -4157,6 +4157,14 @@ _check_xfs_scrub_does_unicode() {
 	return 0
 }
 
+_require_negative_timestamps() {
+	case "$FSTYP" in
+	ceph)
+		_notrun "$FSTYP does not support negative timestamps"
+		;;
+	esac
+}
+
 init_rc
 
 ################################################################################
diff --git a/tests/generic/258 b/tests/generic/258
index 68b8155d4a9f..dab1a476ed20 100755
--- a/tests/generic/258
+++ b/tests/generic/258
@@ -30,6 +30,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 _supported_fs generic
 _supported_os Linux
 _require_test
+_require_negative_timestamps
 
 TESTFILE=$TEST_DIR/timestamp-test.txt
 

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

* Re: [PATCH] generic/258: check filesystem support for negative timestamps
  2020-03-04 16:11 [PATCH] generic/258: check filesystem support for negative timestamps Luis Henriques
@ 2020-03-04 18:28 ` Amir Goldstein
  2020-03-31  9:14   ` Luis Henriques
  0 siblings, 1 reply; 5+ messages in thread
From: Amir Goldstein @ 2020-03-04 18:28 UTC (permalink / raw)
  To: Luis Henriques; +Cc: fstests

On Wed, Mar 4, 2020 at 6:11 PM Luis Henriques <lhenriques@suse.com> wrote:
>
> Some filesystems do not support negative c/m/atime timestamps.  And for
> these filesystems, generic/258 will fail.  Since there's currently no way
> to check sb->s_time_min from userspace, this patch adds a new common/rc
> function _require_negative_timestamps() that will _notrun depending on the
> $FSTYP variable.
>
> Signed-off-by: Luis Henriques <lhenriques@suse.com>

Looks fine,

Reviewed-by: Amir Goldstein <amir73il@gmail.com>

> ---
> Hi!
>
> I'm only adding 'ceph' to the _require_negative_timestamps() case because
> that was the only filesystem with s_time_min = 0 that I was able to test.
> However, a simple grep indicates there are a few other filesystems that
> would also be required there (e.g. nfs version < 4).
>
> Cheers,
> --
> Luis
>
>  common/rc         | 8 ++++++++
>  tests/generic/258 | 1 +
>  2 files changed, 9 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index 0306e93cb1ca..067f30cecde7 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4157,6 +4157,14 @@ _check_xfs_scrub_does_unicode() {
>         return 0
>  }
>
> +_require_negative_timestamps() {
> +       case "$FSTYP" in
> +       ceph)
> +               _notrun "$FSTYP does not support negative timestamps"
> +               ;;
> +       esac
> +}
> +
>  init_rc
>
>  ################################################################################
> diff --git a/tests/generic/258 b/tests/generic/258
> index 68b8155d4a9f..dab1a476ed20 100755
> --- a/tests/generic/258
> +++ b/tests/generic/258
> @@ -30,6 +30,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
>  _supported_fs generic
>  _supported_os Linux
>  _require_test
> +_require_negative_timestamps
>
>  TESTFILE=$TEST_DIR/timestamp-test.txt
>

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

* Re: [PATCH] generic/258: check filesystem support for negative timestamps
  2020-03-04 18:28 ` Amir Goldstein
@ 2020-03-31  9:14   ` Luis Henriques
  2020-03-31 12:33     ` Eryu Guan
  0 siblings, 1 reply; 5+ messages in thread
From: Luis Henriques @ 2020-03-31  9:14 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Goldstein, fstests

On Wed, Mar 04, 2020 at 08:28:40PM +0200, Amir Goldstein wrote:
> On Wed, Mar 4, 2020 at 6:11 PM Luis Henriques <lhenriques@suse.com> wrote:
> >
> > Some filesystems do not support negative c/m/atime timestamps.  And for
> > these filesystems, generic/258 will fail.  Since there's currently no way
> > to check sb->s_time_min from userspace, this patch adds a new common/rc
> > function _require_negative_timestamps() that will _notrun depending on the
> > $FSTYP variable.
> >
> > Signed-off-by: Luis Henriques <lhenriques@suse.com>
> 
> Looks fine,
> 
> Reviewed-by: Amir Goldstein <amir73il@gmail.com>

Hi Eryu,

I forgot Cc'ing you in the initial email.  Has this patch fell between the
cracks, or is it not really acceptable?

Cheers,
--
Luis

> 
> > ---
> > Hi!
> >
> > I'm only adding 'ceph' to the _require_negative_timestamps() case because
> > that was the only filesystem with s_time_min = 0 that I was able to test.
> > However, a simple grep indicates there are a few other filesystems that
> > would also be required there (e.g. nfs version < 4).
> >
> > Cheers,
> > --
> > Luis
> >
> >  common/rc         | 8 ++++++++
> >  tests/generic/258 | 1 +
> >  2 files changed, 9 insertions(+)
> >
> > diff --git a/common/rc b/common/rc
> > index 0306e93cb1ca..067f30cecde7 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -4157,6 +4157,14 @@ _check_xfs_scrub_does_unicode() {
> >         return 0
> >  }
> >
> > +_require_negative_timestamps() {
> > +       case "$FSTYP" in
> > +       ceph)
> > +               _notrun "$FSTYP does not support negative timestamps"
> > +               ;;
> > +       esac
> > +}
> > +
> >  init_rc
> >
> >  ################################################################################
> > diff --git a/tests/generic/258 b/tests/generic/258
> > index 68b8155d4a9f..dab1a476ed20 100755
> > --- a/tests/generic/258
> > +++ b/tests/generic/258
> > @@ -30,6 +30,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
> >  _supported_fs generic
> >  _supported_os Linux
> >  _require_test
> > +_require_negative_timestamps
> >
> >  TESTFILE=$TEST_DIR/timestamp-test.txt
> >

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

* Re: [PATCH] generic/258: check filesystem support for negative timestamps
  2020-03-31  9:14   ` Luis Henriques
@ 2020-03-31 12:33     ` Eryu Guan
  2020-03-31 12:40       ` Luis Henriques
  0 siblings, 1 reply; 5+ messages in thread
From: Eryu Guan @ 2020-03-31 12:33 UTC (permalink / raw)
  To: Luis Henriques; +Cc: Eryu Guan, Goldstein, fstests

On Tue, Mar 31, 2020 at 10:14:35AM +0100, Luis Henriques wrote:
> On Wed, Mar 04, 2020 at 08:28:40PM +0200, Amir Goldstein wrote:
> > On Wed, Mar 4, 2020 at 6:11 PM Luis Henriques <lhenriques@suse.com> wrote:
> > >
> > > Some filesystems do not support negative c/m/atime timestamps.  And for
> > > these filesystems, generic/258 will fail.  Since there's currently no way
> > > to check sb->s_time_min from userspace, this patch adds a new common/rc
> > > function _require_negative_timestamps() that will _notrun depending on the
> > > $FSTYP variable.
> > >
> > > Signed-off-by: Luis Henriques <lhenriques@suse.com>
> > 
> > Looks fine,
> > 
> > Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> 
> Hi Eryu,
> 
> I forgot Cc'ing you in the initial email.  Has this patch fell between the
> cracks, or is it not really acceptable?

I missed it totally.. Thanks for the heads up! I'll pick it up in this
week's update.

Thanks,
Eryu

> 
> Cheers,
> --
> Luis
> 
> > 
> > > ---
> > > Hi!
> > >
> > > I'm only adding 'ceph' to the _require_negative_timestamps() case because
> > > that was the only filesystem with s_time_min = 0 that I was able to test.
> > > However, a simple grep indicates there are a few other filesystems that
> > > would also be required there (e.g. nfs version < 4).
> > >
> > > Cheers,
> > > --
> > > Luis
> > >
> > >  common/rc         | 8 ++++++++
> > >  tests/generic/258 | 1 +
> > >  2 files changed, 9 insertions(+)
> > >
> > > diff --git a/common/rc b/common/rc
> > > index 0306e93cb1ca..067f30cecde7 100644
> > > --- a/common/rc
> > > +++ b/common/rc
> > > @@ -4157,6 +4157,14 @@ _check_xfs_scrub_does_unicode() {
> > >         return 0
> > >  }
> > >
> > > +_require_negative_timestamps() {
> > > +       case "$FSTYP" in
> > > +       ceph)
> > > +               _notrun "$FSTYP does not support negative timestamps"
> > > +               ;;
> > > +       esac
> > > +}
> > > +
> > >  init_rc
> > >
> > >  ################################################################################
> > > diff --git a/tests/generic/258 b/tests/generic/258
> > > index 68b8155d4a9f..dab1a476ed20 100755
> > > --- a/tests/generic/258
> > > +++ b/tests/generic/258
> > > @@ -30,6 +30,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
> > >  _supported_fs generic
> > >  _supported_os Linux
> > >  _require_test
> > > +_require_negative_timestamps
> > >
> > >  TESTFILE=$TEST_DIR/timestamp-test.txt
> > >

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

* Re: [PATCH] generic/258: check filesystem support for negative timestamps
  2020-03-31 12:33     ` Eryu Guan
@ 2020-03-31 12:40       ` Luis Henriques
  0 siblings, 0 replies; 5+ messages in thread
From: Luis Henriques @ 2020-03-31 12:40 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Eryu Guan, Goldstein, fstests

On Tue, Mar 31, 2020 at 08:33:43PM +0800, Eryu Guan wrote:
> On Tue, Mar 31, 2020 at 10:14:35AM +0100, Luis Henriques wrote:
> > On Wed, Mar 04, 2020 at 08:28:40PM +0200, Amir Goldstein wrote:
> > > On Wed, Mar 4, 2020 at 6:11 PM Luis Henriques <lhenriques@suse.com> wrote:
> > > >
> > > > Some filesystems do not support negative c/m/atime timestamps.  And for
> > > > these filesystems, generic/258 will fail.  Since there's currently no way
> > > > to check sb->s_time_min from userspace, this patch adds a new common/rc
> > > > function _require_negative_timestamps() that will _notrun depending on the
> > > > $FSTYP variable.
> > > >
> > > > Signed-off-by: Luis Henriques <lhenriques@suse.com>
> > > 
> > > Looks fine,
> > > 
> > > Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> > 
> > Hi Eryu,
> > 
> > I forgot Cc'ing you in the initial email.  Has this patch fell between the
> > cracks, or is it not really acceptable?
> 
> I missed it totally.. Thanks for the heads up! I'll pick it up in this
> week's update.

Great, thanks!

Cheers,
--
Luis

> 
> Thanks,
> Eryu
> 
> > 
> > Cheers,
> > --
> > Luis
> > 
> > > 
> > > > ---
> > > > Hi!
> > > >
> > > > I'm only adding 'ceph' to the _require_negative_timestamps() case because
> > > > that was the only filesystem with s_time_min = 0 that I was able to test.
> > > > However, a simple grep indicates there are a few other filesystems that
> > > > would also be required there (e.g. nfs version < 4).
> > > >
> > > > Cheers,
> > > > --
> > > > Luis
> > > >
> > > >  common/rc         | 8 ++++++++
> > > >  tests/generic/258 | 1 +
> > > >  2 files changed, 9 insertions(+)
> > > >
> > > > diff --git a/common/rc b/common/rc
> > > > index 0306e93cb1ca..067f30cecde7 100644
> > > > --- a/common/rc
> > > > +++ b/common/rc
> > > > @@ -4157,6 +4157,14 @@ _check_xfs_scrub_does_unicode() {
> > > >         return 0
> > > >  }
> > > >
> > > > +_require_negative_timestamps() {
> > > > +       case "$FSTYP" in
> > > > +       ceph)
> > > > +               _notrun "$FSTYP does not support negative timestamps"
> > > > +               ;;
> > > > +       esac
> > > > +}
> > > > +
> > > >  init_rc
> > > >
> > > >  ################################################################################
> > > > diff --git a/tests/generic/258 b/tests/generic/258
> > > > index 68b8155d4a9f..dab1a476ed20 100755
> > > > --- a/tests/generic/258
> > > > +++ b/tests/generic/258
> > > > @@ -30,6 +30,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
> > > >  _supported_fs generic
> > > >  _supported_os Linux
> > > >  _require_test
> > > > +_require_negative_timestamps
> > > >
> > > >  TESTFILE=$TEST_DIR/timestamp-test.txt
> > > >


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

end of thread, other threads:[~2020-03-31 12:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 16:11 [PATCH] generic/258: check filesystem support for negative timestamps Luis Henriques
2020-03-04 18:28 ` Amir Goldstein
2020-03-31  9:14   ` Luis Henriques
2020-03-31 12:33     ` Eryu Guan
2020-03-31 12:40       ` Luis Henriques

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).