From: Alyssa Ross <hi@alyssa.is>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org, linux-bcachefs@vger.kernel.org
Subject: Re: [RFC PATCH] generic: test negative timespecs are accurate
Date: Tue, 10 Sep 2024 12:02:05 +0200 [thread overview]
Message-ID: <8734m7hlnm.fsf@alyssa.is> (raw)
In-Reply-To: <20240909080132.4wliimcb2y4bt7u3@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2545 bytes --]
Zorro Lang <zlang@redhat.com> writes:
> On Sat, Sep 07, 2024 at 05:45:28PM +0200, Alyssa Ross wrote:
>> Link: https://github.com/koverstreet/bcachefs/issues/743
>
> Great, a bcachefs regression test case :)
>
> Can you add a bit more details in commit log, not only a link.
>
>> Signed-off-by: Alyssa Ross <hi@alyssa.is>
>> ---
>> This is an adapted version of generic/258, but it tests that the stored
>> timestamp is accurate to the second, rather than just testing the
>> timestamp remains negative. I created a new test rather than just
>> making 258 more precise, because I understand that there may be
>> filesystems that don't store timestamps that accurately by design.
>> As an example, I've heard that FAT only has 2 second precision, so this
>> patch is an RFC because I'm not sure how I should write a _require
>> function (if at all) that restricts the test to filesystems that are
>> expected to be able to do this.
>>
>> tests/generic/363 | 26 ++++++++++++++++++++++++++
>> tests/generic/363.out | 2 ++
>
> The g/363 has been taken, please rebase to latest for-next branch.
> You can use `xfstests/tools/mvtest generic/363 generic/365` to change
> the case number, before rebasing.
>
>> 2 files changed, 28 insertions(+)
>> create mode 100755 tests/generic/363
>> create mode 100644 tests/generic/363.out
>>
>> diff --git a/tests/generic/363 b/tests/generic/363
>> new file mode 100755
>> index 00000000..50459d01
>> --- /dev/null
>> +++ b/tests/generic/363
>> @@ -0,0 +1,26 @@
>> +#! /bin/bash
>> +# SPDX-License-Identifier: GPL-2.0
>> +# Copyright (c) 2011 Red Hat, Inc. All Rights Reserved.
>> +# Copyright (c) 2024 Alyssa Ross. All Rights Reserved.
>> +#
>> +# FS QA Test 363
>> +#
>> +# Test timestamps prior to epoch with nanosecond components are
>> +# accurate to the second.
>> +# bcachefs was slightly off.
>> +#
>> +. ./common/preamble
>> +_begin_fstest auto quick bigtime
>> +
>
> As this's a bcachefs regression test:
> https://lore.kernel.org/linux-bcachefs/20240907160024.605850-3-hi@alyssa.is/
>
> So better to mark as:
> if [ "$FSTYP" = "bcachefs" ];then
> _fixed_by_kernel_commit xxxxxxxxxxxx "bcachefs: Fix negative timespecs"
> fi
> (replace the xxxxxxx if it's merged on mainline linux)
>
> Others looks good to me, with above changes, I'd like to
>
> Reviewed-by: Zorro Lang <zlang@redhat.com>
Thanks! So you don't think the test needs to express any extra
requirement that filesystems support to-the-second precision?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2024-09-10 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 15:45 [RFC PATCH] generic: test negative timespecs are accurate Alyssa Ross
2024-09-09 8:01 ` Zorro Lang
2024-09-10 10:02 ` Alyssa Ross [this message]
2024-09-10 13:52 ` Zorro Lang
2024-09-10 15:04 ` Alyssa Ross
2024-09-14 4:58 ` 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=8734m7hlnm.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=fstests@vger.kernel.org \
--cc=linux-bcachefs@vger.kernel.org \
--cc=zlang@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.