Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
07be52cc
by Raymond Toy at 2025-10-23T16:30:34-07:00
-
443a77eb
by Raymond Toy at 2025-10-23T16:30:34-07:00
5 changed files:
- .gitlab-ci.yml
- bin/run-unit-tests.sh
- tests/os.lisp
- tests/resources/64-bit-timestamp.txt โ tests/resources/64-bit-timestamp-2038.txt
- + tests/resources/64-bit-timestamp-2106.txt
Changes:
| ... | ... | @@ -7,7 +7,7 @@ variables: |
| 7 | 7 | download_url: "https://common-lisp.net/project/cmucl/downloads/release/$release"
|
| 8 | 8 | version: "$release-x86"
|
| 9 | 9 | tar_ext: "xz"
|
| 10 | - bootstrap: "-B boot-21f"
|
|
| 10 | + bootstrap: ""
|
|
| 11 | 11 | |
| 12 | 12 | # Default install configuration to download the cmucl tarballs to use
|
| 13 | 13 | # for building.
|
| ... | ... | @@ -42,6 +42,14 @@ rm -rf test-tmp |
| 42 | 42 | mkdir test-tmp
|
| 43 | 43 | ln -s /bin/ls test-tmp/ls-link
|
| 44 | 44 | |
| 45 | +# Set the timestamps on 64-bit-timestamp-2038.txt and
|
|
| 46 | +# 64-bit-timestamp-2106.txt. The time for the first file is a
|
|
| 47 | +# negative value for a 32-bit time_t. The second file won't fit in a
|
|
| 48 | +# 32-bit time_t value. It's ok if this doesn't work in general, as
|
|
| 49 | +# long as it works on Linux for the stat test in tests/os.lisp.
|
|
| 50 | +touch -d "1 April 2038" tests/resources/64-bit-timestamp-2038.txt
|
|
| 51 | +touch -d "1 April 2106" tests/resources/64-bit-timestamp-2106.txt
|
|
| 52 | + |
|
| 45 | 53 | # Cleanup temp files and directories that we created during testing.
|
| 46 | 54 | function cleanup {
|
| 47 | 55 | rm -f /tmp/trac.36.bom.txt /tmp/trac.43.txt
|
| ... | ... | @@ -36,9 +36,24 @@ |
| 36 | 36 | (assert-eql status 0)))
|
| 37 | 37 | |
| 38 | 38 | #+linux
|
| 39 | -(define-test stat.64-bit-timestamp
|
|
| 39 | +(define-test stat.64-bit-timestamp-2038
|
|
| 40 | 40 | (:tag :issues)
|
| 41 | - (let ((test-file #.(merge-pathnames "resources/64-bit-timestamp.txt"
|
|
| 41 | + (let ((test-file #.(merge-pathnames "resources/64-bit-timestamp-2038.txt"
|
|
| 42 | + cl:*load-pathname*)))
|
|
| 43 | + (assert-true (probe-file test-file))
|
|
| 44 | + (multiple-value-bind (ok st-dev st-ino st-mode st-nlink st-uid st-gid st-rdev st-size
|
|
| 45 | + st-atime st-mtime
|
|
| 46 | + st-ctime st-blksize st-blocks)
|
|
| 47 | + (unix:unix-stat (namestring test-file))
|
|
| 48 | + (declare (ignore st-dev st-ino st-mode st-nlink st-uid st-gid st-rdev st-size
|
|
| 49 | + st-ctime st-blksize st-blocks))
|
|
| 50 | + (assert-true ok)
|
|
| 51 | + (assert-equal 2153718000 st-atime)
|
|
| 52 | + (assert-equal 2153718000 st-mtime))))
|
|
| 53 | + |
|
| 54 | +(define-test stat.64-bit-timestamp-2106
|
|
| 55 | + (:tag :issues)
|
|
| 56 | + (let ((test-file #.(merge-pathnames "resources/64-bit-timestamp-2106.txt"
|
|
| 42 | 57 | cl:*load-pathname*)))
|
| 43 | 58 | (assert-true (probe-file test-file))
|
| 44 | 59 | (multiple-value-bind (ok st-dev st-ino st-mode st-nlink st-uid st-gid st-rdev st-size
|
| ... | ... | @@ -48,5 +63,5 @@ |
| 48 | 63 | (declare (ignore st-dev st-ino st-mode st-nlink st-uid st-gid st-rdev
|
| 49 | 64 | st-ctime st-blksize st-blocks))
|
| 50 | 65 | (assert-true ok)
|
| 51 | - (assert-equal st-atime 2153718000)
|
|
| 52 | - (assert-equal st-mtime 2153718000)))) |
|
| 66 | + (assert-equal 4299548400 st-atime)
|
|
| 67 | + (assert-equal 4299548400 st-mtime)))) |