Skip to content
Tcl Source Code View Ticket
Login

View Ticket

test cases failures on 32bit machine

Closed / Fixed10aa8403d064439f7063df3d19c614b3cbdb00caCreated 3 years agoUpdated 3 years ago
Descriptionwiki2024-05-09 17:29:07
Tests cmdAH-24.20.1 and cmdAH-24.20.2 fails on linux i386 machine

$ uname -mpi i686 i686 i686

$make test [snip] cmdAH.test

==== cmdAH-24.20.1 Tcl_FileObjCmd: atime 64-bit time_t, bug [4718b41c56] FAILED ==== Contents of test case:

# This test may fail if your system does not have a 64-bit time_t. # That is to be expected and is not a problem with Tcl. list [file atime $filename 3155760000] [file atime $filename]

---- Result was: -1139207296 -1139207296 ---- Result should have been (exact matching): 3155760000 3155760000 ==== cmdAH-24.20.1 FAILED

==== cmdAH-24.20.2 Tcl_FileObjCmd: mtime 64-bit time_t, bug [4718b41c56] FAILED ==== Contents of test case:

# This test may fail if your system does not have a 64-bit time_t. # That is to be expected and is not a problem with Tcl. list [file mtime $filename 3155760000] [file mtime $filename]

---- Result was: -1139207296 -1139207296 ---- Result should have been (exact matching): 3155760000 3155760000 ==== cmdAH-24.20.2 FAILED [snip] Tests ended at Thu May 09 14:15:26 -03 2024 all.tcl: Total 66563 Passed 60838 Skipped 5723 Failed 2 Sourced 164 Test Files. Files with failing tests: cmdAH.test

Shouldn't be a constraint for this?

jan.nijtmanswiki2024-05-09 18:49:16

In this case I think it's better to keep it as-is.

Tcl and Tk have all machinery to recognize a 64-bit time_t, and use it when available. Tcl 8.6 even has a 64-bit Tcl_Time.seconds field, so it should be fully 2038-proof. If a system has a 64-bit time_t, but Tcl doesn't recognise and handle it, a bug-report should be filed. Your 32-bit system apparently doesn't have a 64-bit time_t (I hope), otherwise this is a real bug.

sebreswiki2024-05-10 10:26:55

This tests have a constraint in 8.5 to 8.7, but not in trunk (completely removed in [311bcb3286ead642], but it was statically 1 before in trunk)...
And it is not time_t but rather Tcl_StatBuf::st_mtime in that case. However I initially wrote the command testsize (used in constraint) in 8.5 platform-independent, since 8.6 it was windows only.

Now it is rewritten as platform-independent from 8.6 (for st_mtime only), and I also restored removed constraint time64bit for that cmdAH-tests.

Tests are welcome.

Log in (anonymous is fine) to add a comment.