Raymond Toy pushed to branch issue-459-more-accurate-dd-complex-div at cmucl / cmucl
Commits:
-
f146f87f
by Raymond Toy at 2025-12-13T15:11:21-08:00
-
2c36bac8
by Raymond Toy at 2025-12-15T17:34:46-08:00
-
7ebc2654
by Raymond Toy at 2025-12-15T17:34:46-08:00
-
e65f9f5c
by Raymond Toy at 2025-12-17T07:04:10-08:00
-
6034f935
by Raymond Toy at 2025-12-17T07:04:10-08:00
-
10efd37c
by Raymond Toy at 2025-12-17T07:12:47-08:00
-
99d8540a
by Raymond Toy at 2026-01-02T10:05:16-08:00
-
28de6c68
by Raymond Toy at 2026-01-02T10:05:17-08:00
-
e6f0f57e
by Raymond Toy at 2026-01-03T08:07:42-08:00
9 changed files:
- .gitlab-ci.yml
- bin/run-unit-tests.sh
- src/code/exports.lisp
- src/code/extensions.lisp
- src/general-info/release-22a.md
- src/i18n/locale/cmucl.pot
- tests/float-x86.lisp
- tests/os.lisp
- tests/pathname.lisp
Changes:
| ... | ... | @@ -19,6 +19,8 @@ variables: |
| 19 | 19 | script:
|
| 20 | 20 | - echo PATH = $PATH
|
| 21 | 21 | - ls -F /usr/local/bin
|
| 22 | + # Make sure gitlab-runner is available because it's needed by the
|
|
| 23 | + # VM to upload artifacts.
|
|
| 22 | 24 | - type -all gitlab-runner
|
| 23 | 25 | # Download binaries. (Do we really need the extras tarball?)
|
| 24 | 26 | - $CURL -o cmucl-$version-$osname.tar.$tar_ext $download_url/cmucl-$version-$osname.tar.$tar_ext
|
| ... | ... | @@ -318,38 +320,38 @@ linux:static-analyzer: |
| 318 | 320 | - make -C build-4/lisp ANALYZER=-fanalyzer > analyzer.log 2>&1
|
| 319 | 321 | |
| 320 | 322 | #### OpenSUSE jobs ####
|
| 321 | -opensuse:install:
|
|
| 323 | +ubuntu:install:
|
|
| 322 | 324 | <<: *install_configuration
|
| 323 | 325 | tags:
|
| 324 | - - opensuse
|
|
| 326 | + - ubuntu
|
|
| 325 | 327 | variables:
|
| 326 | 328 | osname: "linux"
|
| 327 | 329 | CURL: "curl"
|
| 328 | 330 | |
| 329 | -opensuse:build:
|
|
| 331 | +ubuntu:build:
|
|
| 330 | 332 | <<: *build_configuration
|
| 331 | 333 | tags:
|
| 332 | - - opensuse
|
|
| 334 | + - ubuntu
|
|
| 333 | 335 | needs:
|
| 334 | - - job: opensuse:install
|
|
| 336 | + - job: ubuntu:install
|
|
| 335 | 337 | artifacts: true
|
| 336 | 338 | |
| 337 | -opensuse:test:
|
|
| 339 | +ubuntu:test:
|
|
| 338 | 340 | <<: *unit_test_configuration
|
| 339 | 341 | tags:
|
| 340 | - - opensuse
|
|
| 342 | + - ubuntu
|
|
| 341 | 343 | needs:
|
| 342 | 344 | # Needs artifacts from build (dist/)
|
| 343 | - - job: opensuse:build
|
|
| 345 | + - job: ubuntu:build
|
|
| 344 | 346 | artifacts: true
|
| 345 | 347 | |
| 346 | -opensuse:ansi-test:
|
|
| 348 | +ubuntu:ansi-test:
|
|
| 347 | 349 | <<: *ansi_test_configuration
|
| 348 | 350 | tags:
|
| 349 | - - opensuse
|
|
| 351 | + - ubuntu
|
|
| 350 | 352 | needs:
|
| 351 | 353 | # Needs artifacts from build (dist/)
|
| 352 | - - job: opensuse:build
|
|
| 354 | + - job: ubuntu:build
|
|
| 353 | 355 | artifacts: true
|
| 354 | 356 | |
| 355 | 357 | # Optional job that runs the markdown link checker. This is optional
|
| ... | ... | @@ -9,6 +9,8 @@ usage() { |
| 9 | 9 | echo "run-tests.sh [-?h] [-d test-dir] [-l lisp] [tests]"
|
| 10 | 10 | echo " -d test-dir Directory containing the unit test files"
|
| 11 | 11 | echo " -l lisp Lisp to use for the tests; defaults to lisp"
|
| 12 | + echo " -p Skip package-local-nicknames test"
|
|
| 13 | + echo " -u Skip lisp-unit tests"
|
|
| 12 | 14 | echo " -? This help message"
|
| 13 | 15 | echo " -h This help message"
|
| 14 | 16 | echo ""
|
| ... | ... | @@ -25,11 +27,13 @@ usage() { |
| 25 | 27 | }
|
| 26 | 28 | |
| 27 | 29 | LISP=lisp
|
| 28 | -while getopts "h?l:d:" arg
|
|
| 30 | +while getopts "puh?l:d:" arg
|
|
| 29 | 31 | do
|
| 30 | 32 | case $arg in
|
| 31 | 33 | l) LISP=$OPTARG ;;
|
| 32 | 34 | d) TESTDIR=$OPTARG ;;
|
| 35 | + p) SKIP_PLN=yes ;;
|
|
| 36 | + u) SKIP_UNIT=yes ;;
|
|
| 33 | 37 | h|\?) usage ;;
|
| 34 | 38 | esac
|
| 35 | 39 | done
|
| ... | ... | @@ -43,12 +47,19 @@ mkdir test-tmp |
| 43 | 47 | ln -s /bin/ls test-tmp/ls-link
|
| 44 | 48 | |
| 45 | 49 | # 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
|
|
| 50 | +# 64-bit-timestamp-2106.txt, but only for OSes where we know this
|
|
| 51 | +# works. (This is so we don't an annoying error message from touch
|
|
| 52 | +# that doesn't accept the -d option, like MacOS 10.13.) The time for
|
|
| 53 | +# the first file is a negative value for a 32-bit time_t. The second
|
|
| 54 | +# file won't fit in a 32-bit time_t value. It's ok if this doesn't
|
|
| 55 | +# work in general, as long as it works on Linux for the stat test in
|
|
| 56 | +# tests/os.lisp.
|
|
| 57 | +case `uname -s` in
|
|
| 58 | + Linux)
|
|
| 59 | + touch -d "1 April 2038" tests/resources/64-bit-timestamp-2038.txt
|
|
| 60 | + touch -d "1 April 2106" tests/resources/64-bit-timestamp-2106.txt
|
|
| 61 | + ;;
|
|
| 62 | +esac
|
|
| 52 | 63 | |
| 53 | 64 | # Cleanup temp files and directories that we created during testing.
|
| 54 | 65 | function cleanup {
|
| ... | ... | @@ -69,39 +80,47 @@ fi |
| 69 | 80 | # gcc since clang isn't always available.
|
| 70 | 81 | (cd "$TESTDIR" || exit 1 ; gcc -m32 -O3 -c test-return.c)
|
| 71 | 82 | |
| 72 | -if [ $# -eq 0 ]; then
|
|
| 73 | - # Test directory arg for run-all-tests if a non-default
|
|
| 74 | - # No args so run all the tests
|
|
| 75 | - $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(cmucl-test-runner:run-all-tests ${TESTDIRARG})"
|
|
| 76 | -else
|
|
| 77 | - # Run selected files. Convert each file name to uppercase and append "-TESTS"
|
|
| 78 | - result=""
|
|
| 79 | - for f in "$@"
|
|
| 80 | - do
|
|
| 81 | - new=$(echo "$f" | tr '[:lower:]' '[:upper:]')
|
|
| 82 | - result="$result "\"$new-TESTS\"
|
|
| 83 | - done
|
|
| 84 | - $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))"
|
|
| 83 | +if [ "$SKIP_UNIT" != "yes" ]; then
|
|
| 84 | + if [ $# -eq 0 ]; then
|
|
| 85 | + # Test directory arg for run-all-tests if a non-default
|
|
| 86 | + # No args so run all the tests
|
|
| 87 | + $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(cmucl-test-runner:run-all-tests ${TESTDIRARG})" ||
|
|
| 88 | + exit 1
|
|
| 89 | + else
|
|
| 90 | + # Run selected files. Convert each file name to uppercase and append "-TESTS"
|
|
| 91 | + result=""
|
|
| 92 | + for f in "$@"
|
|
| 93 | + do
|
|
| 94 | + new=$(echo "$f" | tr '[:lower:]' '[:upper:]')
|
|
| 95 | + result="$result "\"$new-TESTS\"
|
|
| 96 | + done
|
|
| 97 | + # Run unit tests. Exits with a non-zero code if there's a failure.
|
|
| 98 | + |
|
| 99 | + $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))" ||
|
|
| 100 | + exit 1
|
|
| 101 | + fi
|
|
| 85 | 102 | fi
|
| 86 | 103 | |
| 87 | 104 | ## Now run tests for trivial-package-local-nicknames
|
| 88 | -REPO=trivial-package-local-nicknames
|
|
| 89 | -BRANCH=cmucl-updates
|
|
| 105 | +if [ "$SKIP_PLN" != "yes" ]; then
|
|
| 106 | + REPO=trivial-package-local-nicknames
|
|
| 107 | + BRANCH=cmucl-updates
|
|
| 90 | 108 | |
| 91 | -set -x
|
|
| 92 | -if [ -d ../$REPO ]; then
|
|
| 93 | - (cd ../$REPO || exit 1; git stash; git checkout $BRANCH; git pull --rebase)
|
|
| 94 | -else
|
|
| 95 | - (cd ..; git clone https://gitlab.common-lisp.net/cmucl/$REPO.git)
|
|
| 96 | -fi
|
|
| 109 | + set -x
|
|
| 110 | + if [ -d ../$REPO ]; then
|
|
| 111 | + (cd ../$REPO || exit 1; git stash; git checkout $BRANCH; git pull --rebase)
|
|
| 112 | + else
|
|
| 113 | + (cd ..; git clone https://gitlab.common-lisp.net/cmucl/$REPO.git)
|
|
| 114 | + fi
|
|
| 97 | 115 | |
| 98 | -LISP=$PWD/$LISP
|
|
| 99 | -cd ../$REPO || exit 1
|
|
| 100 | -git checkout $BRANCH
|
|
| 116 | + LISP=$PWD/$LISP
|
|
| 117 | + cd ../$REPO || exit 1
|
|
| 118 | + git checkout $BRANCH
|
|
| 101 | 119 | |
| 102 | -# Run the tests. Exits with a non-zero code if there's a failure.
|
|
| 103 | -$LISP -noinit -nositeinit -batch <<'EOF'
|
|
| 120 | + # Run the tests. Exits with a non-zero code if there's a failure.
|
|
| 121 | + $LISP -noinit -nositeinit -batch <<'EOF'
|
|
| 104 | 122 | (require :asdf)
|
| 105 | 123 | (push (default-directory) asdf:*central-registry*)
|
| 106 | 124 | (asdf:test-system :trivial-package-local-nicknames)
|
| 107 | 125 | EOF
|
| 126 | +fi |
| ... | ... | @@ -1213,7 +1213,8 @@ |
| 1213 | 1213 | |
| 1214 | 1214 | "INVALID-FASL"
|
| 1215 | 1215 | "WITH-TEMPORARY-DIRECTORY"
|
| 1216 | - "WITH-TEMPORARY-FILE")
|
|
| 1216 | + "WITH-TEMPORARY-FILE"
|
|
| 1217 | + "DELETE-DIRECTORY")
|
|
| 1217 | 1218 | ;; gencgc features
|
| 1218 | 1219 | #+gencgc
|
| 1219 | 1220 | (:export "GET-GC-ASSERTIONS"
|
| ... | ... | @@ -673,9 +673,9 @@ |
| 673 | 673 | (defun delete-directory (dirname &key recursive)
|
| 674 | 674 | _N"Delete the directory Dirname. If the Recursive is non-NIL,
|
| 675 | 675 | recursively delete the directory Dirname including all files and
|
| 676 | - subdirectories. Dirname must be a pathname to a directory. Any NAME
|
|
| 677 | - or TYPE components in Dirname are ignored."
|
|
| 678 | - (declare (type pathname dirname))
|
|
| 676 | + subdirectories. Dirname must name a directory. Any NAME or TYPE
|
|
| 677 | + components in Dirname are ignored. A FILE-ERROR is signaled if any
|
|
| 678 | + directory cannot be deleted."
|
|
| 679 | 679 | (when recursive
|
| 680 | 680 | ;; Find all the files or directories in DIRNAME.
|
| 681 | 681 | (dolist (path (directory (merge-pathnames "*.*" dirname)))
|
| ... | ... | @@ -685,8 +685,15 @@ |
| 685 | 685 | (delete-directory path :recursive t)
|
| 686 | 686 | (delete-file path))))
|
| 687 | 687 | ;; Finally delete the directory.
|
| 688 | - (unix:unix-rmdir (namestring dirname))
|
|
| 689 | - (values))
|
|
| 688 | + (multiple-value-bind (ok errno)
|
|
| 689 | + (unix:unix-rmdir (namestring dirname))
|
|
| 690 | + (unless ok
|
|
| 691 | + (error 'kernel:simple-file-error
|
|
| 692 | + :pathname dirname
|
|
| 693 | + :format-control (intl:gettext "Could not remove directory \"~A\": ~A.")
|
|
| 694 | + :format-arguments (list dirname
|
|
| 695 | + (unix:get-unix-error-msg errno))))
|
|
| 696 | + ok))
|
|
| 690 | 697 | |
| 691 | 698 | |
| 692 | 699 | ;;; WITH-TEMPORARY-DIRECTORY -- Public
|
| ... | ... | @@ -34,6 +34,7 @@ public domain. |
| 34 | 34 | * #446: Use C compiler to get errno values to update UNIX
|
| 35 | 35 | defpackage with errno symbols
|
| 36 | 36 | * #453: Use correct flags for analyzer and always save logs.
|
| 37 | + * #458: Spurious overflow in double-double-float multiply
|
|
| 37 | 38 | * Other changes:
|
| 38 | 39 | * Improvements to the PCL implementation of CLOS:
|
| 39 | 40 | * Changes to building procedure:
|
| ... | ... | @@ -6011,8 +6011,13 @@ msgstr "" |
| 6011 | 6011 | msgid ""
|
| 6012 | 6012 | "Delete the directory Dirname. If the Recursive is non-NIL,\n"
|
| 6013 | 6013 | " recursively delete the directory Dirname including all files and\n"
|
| 6014 | -" subdirectories. Dirname must be a pathname to a directory. Any NAME\n"
|
|
| 6015 | -" or TYPE components in Dirname are ignored."
|
|
| 6014 | +" subdirectories. Dirname must name a directory. Any NAME or TYPE\n"
|
|
| 6015 | +" components in Dirname are ignored. A FILE-ERROR is signaled if any\n"
|
|
| 6016 | +" directory cannot be deleted."
|
|
| 6017 | +msgstr ""
|
|
| 6018 | + |
|
| 6019 | +#: src/code/extensions.lisp
|
|
| 6020 | +msgid "Could not remove directory \"~A\": ~A."
|
|
| 6016 | 6021 | msgstr ""
|
| 6017 | 6022 | |
| 6018 | 6023 | #: src/code/extensions.lisp
|
| ... | ... | @@ -5,6 +5,11 @@ |
| 5 | 5 | |
| 6 | 6 | (in-package "FLOAT-X86-TESTS")
|
| 7 | 7 | |
| 8 | +;; This tests the floating-point modes for x86. This works only if we
|
|
| 9 | +;; have the feature :sse2 but not :darwin since darwin has always used
|
|
| 10 | +;; sse2 and not x87. But see also how FLOATING-POINT-MODES is
|
|
| 11 | +;; implemented in src/code/float-trap.lisp.
|
|
| 12 | +#+(and sse2 (not darwin))
|
|
| 8 | 13 | (define-test set-floating-point-modes
|
| 9 | 14 | (let ((old-x87-modes (x86::x87-floating-point-modes))
|
| 10 | 15 | (old-sse2-modes (x86::sse2-floating-point-modes))
|
| ... | ... | @@ -51,6 +51,7 @@ |
| 51 | 51 | (assert-equal 2153718000 st-atime)
|
| 52 | 52 | (assert-equal 2153718000 st-mtime))))
|
| 53 | 53 | |
| 54 | +#+linux
|
|
| 54 | 55 | (define-test stat.64-bit-timestamp-2106
|
| 55 | 56 | (:tag :issues)
|
| 56 | 57 | (let ((test-file #.(merge-pathnames "resources/64-bit-timestamp-2106.txt"
|
| ... | ... | @@ -144,14 +144,13 @@ |
| 144 | 144 | (assert-equal dir-tilde dir-home))))
|
| 145 | 145 | |
| 146 | 146 | (define-test delete-directory
|
| 147 | - (let ((dir (ensure-directories-exist "tmp/a/b/c/")))
|
|
| 148 | - ;; Verify that the directories were created.
|
|
| 149 | - (assert-equal "tmp/a/b/c/"
|
|
| 150 | - dir)
|
|
| 151 | - ;; Try to delete the directory. It should fail, which we verify
|
|
| 152 | - ;; by noting the directory listing is not empty.
|
|
| 153 | - (ext::delete-directory (pathname "tmp/"))
|
|
| 154 | - (assert-true (directory "tmp/"))
|
|
| 155 | - ;; Now recursively delete the directory.
|
|
| 156 | - (ext::delete-directory (pathname "tmp/") :recursive t)
|
|
| 157 | - (assert-false (directory "tmp/")))) |
|
| 147 | + (:tag :issues)
|
|
| 148 | + (ext:with-temporary-directory (path)
|
|
| 149 | + (let ((dir (ensure-directories-exist (merge-pathnames "tmp/a/b/c/" path))))
|
|
| 150 | + ;; Try to delete the directory. It should fail..
|
|
| 151 | + (assert-error 'kernel:simple-file-error
|
|
| 152 | + (ext:delete-directory (merge-pathnames "tmp/" path)))
|
|
| 153 | + ;; Now recursively delete the directory.
|
|
| 154 | + (assert-true (ext:delete-directory (merge-pathnames "tmp/" path)
|
|
| 155 | + :recursive t))
|
|
| 156 | + (assert-false (directory "tmp/"))))) |