Source: emacs
Version: 28.2+1-9
Severity: serious
Tags: ftbfs
Justification: ftbfs

When trying to rebuild emacs:

SUMMARY OF TEST RESULTS
-----------------------
Files examined: 375
Ran 5623 tests, 5545 results as expected, 2 unexpected, 76 skipped
1 files contained unexpected results:
  lisp/emacs-lisp/copyright-tests.log

and in this log file:

[...]
Test test-correct-notice condition:
    (ert-test-failed
     ((should
       (equal
        (with-temp-buffer ... ... ...)
        "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n"))
      :form
      (equal "Copyright 2021 FSF\nCopyright 2021, 2023 FSF\n" "Copyright 2021 
FSF\nCopyright 2021, 2022 FSF\n")
      :value nil :explanation
      (array-elt 38
                 (different-atoms
                  (51 "#x33" "?3")
                  (50 "#x32" "?2")))))
   FAILED  2/3  test-correct-notice (0.000103 sec)
[...]
Test test-end-chop condition:
    (ert-test-failed
     ((should
       (equal
        (with-temp-buffer ...)
        "Copyright 2006, 2007, 2008, 2022 Foo Bar\n\n"))
      :form
      (equal "Copyright 2006, 2007, 2008, 2023 Foo Bar\n\n" "Copyright 2006, 
2007, 2008, 2022 Foo Bar\n\n")
      :value nil :explanation
      (array-elt 31
                 (different-atoms
                  (51 "#x33" "?3")
                  (50 "#x32" "?2")))))
   FAILED  3/3  test-end-chop (0.000154 sec)
[...]
2 unexpected results:
   FAILED  test-correct-notice
   FAILED  test-end-chop

This comes from test/lisp/emacs-lisp/copyright-tests.el, which has

(ert-deftest test-end-chop ()
  (should
   (equal
    (with-temp-buffer
      (let ((copyright-query nil))
        (insert (make-string (- copyright-limit 14) ?x) "\n"
                "\nCopyright 2006, 2007, 2008 Foo Bar\n\n")
        (copyright-update)
        (buffer-substring (- (point-max) 42) (point-max))))
    "Copyright 2006, 2007, 2008, 2022 Foo Bar\n\n")))

(ert-deftest test-correct-notice ()
  (should (equal
           (with-temp-buffer
             (dotimes (_ 2)
               (insert "Copyright 2021 FSF\n"))
             (let ((copyright-at-end-flag t)
                   (copyright-query nil))
               (copyright-update))
             (buffer-string))
           "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n")))

The cause may be that we are now in 2023 and the above tests
are expecting 2022. Instead of expecting 2022, shouldn't they
expect the current year?

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Running 3 tests (2023-01-13 15:46:41+0100, selector ‘(not (or (tag 
:expensive-test) (tag :unstable)))’)
   passed  1/3  test-copyright-update (0.372676 sec)
Test test-correct-notice backtrace:
  signal(ert-test-failed (((should (equal (with-temp-buffer (dotimes (
  ert-fail(((should (equal (with-temp-buffer (dotimes (_ 2) (insert "C
  #f(compiled-function () #<bytecode 0x275166b823177e6>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name test-correct-notice :documentation ni
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or (tag :expensi
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  command-line-1(("-L" ":/home/vinc17/tmp/emacs-28.2+1/debian/build-sr
  command-line()
  normal-top-level()
Test test-correct-notice condition:
    (ert-test-failed
     ((should
       (equal
        (with-temp-buffer ... ... ...)
        "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n"))
      :form
      (equal "Copyright 2021 FSF\nCopyright 2021, 2023 FSF\n" "Copyright 2021 
FSF\nCopyright 2021, 2022 FSF\n")
      :value nil :explanation
      (array-elt 38
                 (different-atoms
                  (51 "#x33" "?3")
                  (50 "#x32" "?2")))))
   FAILED  2/3  test-correct-notice (0.000103 sec)
Test test-end-chop backtrace:
  signal(ert-test-failed (((should (equal (with-temp-buffer (let (...)
  ert-fail(((should (equal (with-temp-buffer (let ((copyright-query ni
  #f(compiled-function () #<bytecode -0x15755d7e0c3cae9a>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name test-end-chop :documentation nil :bod
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ...)) :te
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  command-line-1(("-L" ":/home/vinc17/tmp/emacs-28.2+1/debian/build-sr
  command-line()
  normal-top-level()
Test test-end-chop condition:
    (ert-test-failed
     ((should
       (equal
        (with-temp-buffer ...)
        "Copyright 2006, 2007, 2008, 2022 Foo Bar\n\n"))
      :form
      (equal "Copyright 2006, 2007, 2008, 2023 Foo Bar\n\n" "Copyright 2006, 
2007, 2008, 2022 Foo Bar\n\n")
      :value nil :explanation
      (array-elt 31
                 (different-atoms
                  (51 "#x33" "?3")
                  (50 "#x32" "?2")))))
   FAILED  3/3  test-end-chop (0.000154 sec)

Ran 3 tests, 1 results as expected, 2 unexpected (2023-01-13 15:46:42+0100, 
0.509506 sec)

2 unexpected results:
   FAILED  test-correct-notice
   FAILED  test-end-chop

Reply via email to