GNU bug report logs - #79101
[PATCH] tests/du/bigtime: Try harder to find supported filesystem, and test negative timestamp

Previous Next

Package: coreutils;

Reported by: Nicolas Boichat <nicolas <at> boichat.ch>

Date: Sat, 26 Jul 2025 07:31:02 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

To reply to this bug, email your comments to 79101 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#79101; Package coreutils. (Sat, 26 Jul 2025 07:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Boichat <nicolas <at> boichat.ch>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 26 Jul 2025 07:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Boichat <nicolas <at> boichat.ch>
To: bug-coreutils <at> gnu.org
Subject: [PATCH] tests/du/bigtime: Try harder to find supported filesystem,
 and test negative timestamp
Date: Sat, 26 Jul 2025 15:30:19 +0800
[Message part 1 (text/plain, inline)]
Hi,

I think this test might often be skipped due to lack of filesystem
support? Let's try a bit harder to run it.

And let's test past timestamps too.

Thanks!

Log:
## tests: du/bigtime: Try harder to find a suitable filesystem
At least on Linux, the "usual" filesystem (ext4) doesn't support
such large timestamp, while tmpfs does. Try a bit harder to look
for a filesystem with large timestamp support.
## tests: du/bigtime: Try both big and small timestamps
Try both future and past timestamps, for completeness.
[0002-tests-du-bigtime-Try-both-big-and-small-timestamps.patch (text/x-patch, attachment)]
[0001-tests-du-bigtime-Try-harder-to-find-a-suitable-files.patch (text/x-patch, attachment)]

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Thu, 16 Oct 2025 17:40:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Boichat <nicolas <at> boichat.ch>:
bug acknowledged by developer. (Thu, 16 Oct 2025 17:40:02 GMT) Full text and rfc822 format available.

Message #10 received at 79101-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Nicolas Boichat <nicolas <at> boichat.ch>, 79101-done <at> debbugs.gnu.org
Subject: Re: bug#79101: [PATCH] tests/du/bigtime: Try harder to find supported
 filesystem, and test negative timestamp
Date: Thu, 16 Oct 2025 18:39:12 +0100
On 26/07/2025 08:30, Nicolas Boichat wrote:
> Hi,
> 
> I think this test might often be skipped due to lack of filesystem
> support? Let's try a bit harder to run it.
> 
> And let's test past timestamps too.
> 
> Thanks!
> 
> Log:
> ## tests: du/bigtime: Try harder to find a suitable filesystem
> At least on Linux, the "usual" filesystem (ext4) doesn't support
> such large timestamp, while tmpfs does. Try a bit harder to look
> for a filesystem with large timestamp support.
> ## tests: du/bigtime: Try both big and small timestamps
> Try both future and past timestamps, for completeness.

I made the following changes, and pushed the first patch.
The second patch didn't handle the case where localtime
might support the large negative timestamp,
so I didn't push that one as it seems like
it might cause more trouble than it's worth.

Marking this as done.

thanks!
Padraig

diff --git a/tests/du/bigtime.sh b/tests/du/bigtime.sh
index 4f43464d5..d36e3f2e0 100755
--- a/tests/du/bigtime.sh
+++ b/tests/du/bigtime.sh
@@ -30,23 +30,23 @@ future=
 cleanup_() { rm -rf "$future"; }

 for fs in ./ /tmp /dev/shm; do
-  future=$(mktemp -p "$fs" future.XXXXXX)
-  touch -d @$bignum $future 2>/dev/null &&
+  future=$(mktemp -p "$fs" future.XXXXXX) || continue
+  touch -d @$bignum "$future" 2>/dev/null &&
   future_time=$(ls -l $future) &&
   case "$future_time" in
   *" $bignum "*)
     echo "file system at $fs handles big timestamps"
     good=1; break ;;
   *' Dec  4  300627798676 '*)
-    echo "file system at $fs and localtime both handle big timestamps" ;;
+    warn_ "file system at $fs and localtime both handle big timestamps" ;;
   *)
-    echo "file system at $fs or localtime mishandles big timestamps:" \
+    warn_ "file system at $fs or localtime mishandles big timestamps:" \
         "$future_time" ;;
-  esac || echo "file system at $fs cannot represent big timestamps"
-  rm $future
+  esac || warn_ "file system at $fs cannot represent big timestamps"
+  rm "$future"
 done

-[ -n $good ] || skip_ "Cannot find filesystem with big timestamp support"
+test "$good" = 1 || skip_ "Cannot find filesystem with big timestamp support"

 printf "0\t$bignum\t$future\n" > exp || framework_failure_
 printf "du: time '$bignum' is out of range\n" > err_ok || framework_failure_





This bug report was last modified 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.