>From 635b53c17492dbf0233c9b803e5a21c82e36d7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sat, 13 May 2023 07:28:35 -0700 Subject: [PATCH v3] tests: protect y2038-vs-32-bit against diff/cmp failures * tests/y2038-vs-32-bit: Recreate `in` before `compare` to prevent the possibility of failures if the underlying tool cannot itself handle dates after Y2K38 --- tests/y2038-vs-32-bit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/y2038-vs-32-bit b/tests/y2038-vs-32-bit index 3d3e9ae..89ab9bb 100755 --- a/tests/y2038-vs-32-bit +++ b/tests/y2038-vs-32-bit @@ -6,8 +6,12 @@ fail=0 echo text > in || framework_failure_ touch -t 203901010000 in || skip_ 'touch -t 2039... failed' + grep t in > out 2> err || fail=1 -compare in out || fail=1 compare /dev/null err || fail=1 +# Recreate to avoid triggering diffutil bugs with compare +(rm -f in && echo text > in) || framework_failure_ +compare in out || fail=1 + Exit $fail -- 2.39.2 (Apple Git-143)