On 03/11/2025 13:09, Pádraig Brady wrote:
On 03/11/2025 06:36, Collin Funk wrote:
diff --git a/tests/misc/write-errors.sh b/tests/misc/write-errors.sh
index b33e84a3d..60496fc06 100755
--- a/tests/misc/write-errors.sh
+++ b/tests/misc/write-errors.sh
@@ -30,6 +30,7 @@ cat /dev/zero
   comm -z /dev/zero /dev/zero
   cut -z -c1- /dev/zero
   cut -z -f1- /dev/zero
+date +%2147483648c
   dd if=/dev/zero
   expand /dev/zero
   factor --version; yes 1 | factor

Cool.

Why pick 2^31 BTW ? Wouldn't 2^31-1 (i.e. INT_MAX) suffice?
In either case it's probably better to use getlimits and $INT_MAX (or 
$INT_OFLOW if needed).
Specific numbers like this sets off all sorts of questions in my head.

BTW it's interesting that date supports $INT_OFLOW, while printf does not:

Testing here shows date supports +%${INTMAX_MAX}c
which would be a better test anyway as $INT_OFLOW
finishes within the test timeout on my system
which would result in a false pass.

cheers,
Padraig

Reply via email to