GNU bug report logs -
#61595
[PATCH] 28.3; test/lisp/emacs-lisp/copyright-tests.el: Fix test failure.
Previous Next
Reported by: Xi Lu <lx <at> shellcodes.org>
Date: Sat, 18 Feb 2023 05:47:02 UTC
Severity: normal
Tags: patch
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61595 in the body.
You can then email your comments to 61595 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 05:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Xi Lu <lx <at> shellcodes.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 18 Feb 2023 05:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
---
test/lisp/emacs-lisp/copyright-tests.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/lisp/emacs-lisp/copyright-tests.el b/test/lisp/emacs-lisp/copyright-tests.el
index abb0913a0d7..040071d90d0 100644
--- a/test/lisp/emacs-lisp/copyright-tests.el
+++ b/test/lisp/emacs-lisp/copyright-tests.el
@@ -59,7 +59,8 @@ test-end-chop
"\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")))
+ (format "Copyright 2006, 2007, 2008, %s Foo Bar\n\n"
+ (format-time-string "%Y")))))
(ert-deftest test-correct-notice ()
(should (equal
@@ -70,7 +71,8 @@ test-correct-notice
(copyright-query nil))
(copyright-update))
(buffer-string))
- "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n")))
+ (format "Copyright 2021 FSF\nCopyright 2021, %s FSF\n"
+ (format-time-string "%Y")))))
(provide 'copyright-tests)
;;; copyright-tests.el ends here
--
2.30.2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 07:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 61595 <at> debbugs.gnu.org (full text, mbox):
> Cc: Xi Lu <lx <at> shellcodes.org>
> From: Xi Lu <lx <at> shellcodes.org>
> Date: Sat, 18 Feb 2023 13:46:07 +0800
>
> ---
> test/lisp/emacs-lisp/copyright-tests.el | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/test/lisp/emacs-lisp/copyright-tests.el b/test/lisp/emacs-lisp/copyright-tests.el
> index abb0913a0d7..040071d90d0 100644
> --- a/test/lisp/emacs-lisp/copyright-tests.el
> +++ b/test/lisp/emacs-lisp/copyright-tests.el
> @@ -59,7 +59,8 @@ test-end-chop
> "\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")))
> + (format "Copyright 2006, 2007, 2008, %s Foo Bar\n\n"
> + (format-time-string "%Y")))))
>
> (ert-deftest test-correct-notice ()
> (should (equal
> @@ -70,7 +71,8 @@ test-correct-notice
> (copyright-query nil))
> (copyright-update))
> (buffer-string))
> - "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n")))
> + (format "Copyright 2021 FSF\nCopyright 2021, %s FSF\n"
> + (format-time-string "%Y")))))
What is the failure, and why using format-time-string solves that?
That test doesn't fail for me.
Please _always_ accompany patches with rationale and the details of
the problem necessary to understand the patch and decide whether it is
the right solution for the problem. Comments in the code explaining
why it does things that are not self-evident (like uses literal years
for some and format-time-string for others) is also a welcome habit.
Also, this patch lacks the commit log message.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 07:41:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 61595 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, 2023-02-18 at 09:29 +0200, Eli Zaretskii wrote:
> > Cc: Xi Lu <lx <at> shellcodes.org>
> > From: Xi Lu <lx <at> shellcodes.org>
> > Date: Sat, 18 Feb 2023 13:46:07 +0800
> >
> > ---
> > test/lisp/emacs-lisp/copyright-tests.el | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/test/lisp/emacs-lisp/copyright-tests.el
> > b/test/lisp/emacs-lisp/copyright-tests.el
> > index abb0913a0d7..040071d90d0 100644
> > --- a/test/lisp/emacs-lisp/copyright-tests.el
> > +++ b/test/lisp/emacs-lisp/copyright-tests.el
> > @@ -59,7 +59,8 @@ test-end-chop
> > "\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")))
> > + (format "Copyright 2006, 2007, 2008, %s Foo Bar\n\n"
> > + (format-time-string "%Y")))))
> >
> > (ert-deftest test-correct-notice ()
> > (should (equal
> > @@ -70,7 +71,8 @@ test-correct-notice
> > (copyright-query nil))
> > (copyright-update))
> > (buffer-string))
> > - "Copyright 2021 FSF\nCopyright 2021, 2022 FSF\n")))
> > + (format "Copyright 2021 FSF\nCopyright 2021, %s FSF\n"
> > + (format-time-string "%Y")))))
>
> What is the failure, and why using format-time-string solves that?
> That test doesn't fail for me.
>
> Please _always_ accompany patches with rationale and the details of
> the problem necessary to understand the patch and decide whether it
> is
> the right solution for the problem. Comments in the code explaining
> why it does things that are not self-evident (like uses literal years
> for some and format-time-string for others) is also a welcome habit.
>
> Also, this patch lacks the commit log message.
>
> Thanks.
Test failure happens in Emacs 28.3, for test failure logs, see
copyright-tests.log
I reattach the patch file.
Thanks.
[0001-test-lisp-emacs-lisp-copyright-tests.el-Fix-test-fai.patch (text/x-patch, attachment)]
[copyright-tests.log (text/x-log, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 07:50:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 61595 <at> debbugs.gnu.org (full text, mbox):
> From: lux <lx <at> shellcodes.org>
> Cc: 61595 <at> debbugs.gnu.org
> Date: Sat, 18 Feb 2023 15:38:22 +0800
>
> Test failure happens in Emacs 28.3, for test failure logs, see
> copyright-tests.log
Thanks, then I don't think there's a need to install this change, as
the emacs-28 branch is frozen.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 08:01:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 61595 <at> debbugs.gnu.org (full text, mbox):
On Sat, 2023-02-18 at 09:49 +0200, Eli Zaretskii wrote:
> > From: lux <lx <at> shellcodes.org>
> > Cc: 61595 <at> debbugs.gnu.org
> > Date: Sat, 18 Feb 2023 15:38:22 +0800
> >
> > Test failure happens in Emacs 28.3, for test failure logs, see
> > copyright-tests.log
>
> Thanks, then I don't think there's a need to install this change, as
> the emacs-28 branch is frozen.
>
I see Stefan is testing for the Emacs 28.3 release.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 09:12:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 61595 <at> debbugs.gnu.org (full text, mbox):
lux <lx <at> shellcodes.org> writes:
> I see Stefan is testing for the Emacs 28.3 release.
Thanks for the patch and for the testing, it is much appreciated.
I don't think we will need to worry about test failures on the emacs-28
branch. The purpose of tests is to aid during development, and there
will be no more development on that branch. I also think it's better to
minimize the amount of changes on very old branches.
Therefore, I don't think we should install this particular patch at this
time. I hope that rationale makes sense, and thanks again.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 09:21:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 61595 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sat, 18 Feb 2023 01:10:57 -0800
> Cc: 61595 <at> debbugs.gnu.org
>
> I don't think we will need to worry about test failures on the emacs-28
> branch. The purpose of tests is to aid during development, and there
> will be no more development on that branch. I also think it's better to
> minimize the amount of changes on very old branches.
Agreed. On top of that, this release being an emergency security fix,
it should IMO have only the minimum number of changes strictly
necessary to fix the particular problem for which it is being
released.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61595
; Package
emacs
.
(Sat, 18 Feb 2023 09:36:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 61595 <at> debbugs.gnu.org (full text, mbox):
On Sat, 2023-02-18 at 11:20 +0200, Eli Zaretskii wrote:
> > From: Stefan Kangas <stefankangas <at> gmail.com>
> > Date: Sat, 18 Feb 2023 01:10:57 -0800
> > Cc: 61595 <at> debbugs.gnu.org
> >
> > I don't think we will need to worry about test failures on the
> > emacs-28
> > branch. The purpose of tests is to aid during development, and
> > there
> > will be no more development on that branch. I also think it's
> > better to
> > minimize the amount of changes on very old branches.
>
> Agreed. On top of that, this release being an emergency security
> fix,
> it should IMO have only the minimum number of changes strictly
> necessary to fix the particular problem for which it is being
> released.
>
>
>
Okay, I understand. Thank you.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Sat, 18 Feb 2023 09:52:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Xi Lu <lx <at> shellcodes.org>
:
bug acknowledged by developer.
(Sat, 18 Feb 2023 09:52:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 61595-done <at> debbugs.gnu.org (full text, mbox):
lux <lx <at> shellcodes.org> writes:
> Okay, I understand. Thank you.
Thanks, closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 18 Mar 2023 11:24:14 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.