GNU bug report logs - #76744
[PATCH] etags test doesn't pass

Previous Next

Package: emacs;

Reported by: Vladimir Gorsunov <gorsunov <at> gmail.com>

Date: Tue, 4 Mar 2025 18:49: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 76744 in the body.
You can then email your comments to 76744 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76744; Package emacs. (Tue, 04 Mar 2025 18:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir Gorsunov <gorsunov <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 04 Mar 2025 18:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vladimir Gorsunov <gorsunov <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] etags test doesn't pass
Date: Tue, 4 Mar 2025 18:54:08 +0200
[Message part 1 (text/plain, inline)]
  Test for etags fails since commit 4da38c63 when update-copyrights script
inserted new lines into some of the test files. Including a patch that
reverts added lines and adds a check to the script

-- 
Mit Respekt, Vladimir Gorsunov
[Message part 2 (text/html, inline)]
[0001-Fix-test-manual-etags.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76744; Package emacs. (Tue, 04 Mar 2025 19:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 76744 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Vladimir Gorsunov <gorsunov <at> gmail.com>, 76744 <at> debbugs.gnu.org
Cc: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#76744: [PATCH] etags test doesn't pass
Date: Tue, 4 Mar 2025 11:22:52 -0800
Vladimir Gorsunov <gorsunov <at> gmail.com> writes:

>   Test for etags fails since commit 4da38c63 when update-copyrights script
> inserted new lines into some of the test files. Including a patch that
> reverts added lines and adds a check to the script

Thanks for the bug report.

> From 06de986b4d1805d8a2ab273bfd74eae235643eff Mon Sep 17 00:00:00 2001
> From: Vladimir Gorsunov <gorsunov <at> gmail.com>
> Date: Mon, 3 Mar 2025 20:06:06 +0300
> Subject: [PATCH] Fix test/manual/etags
>
> Test for etags doesn't work since new lines had been added to some test
> data files by update-copyrights script
>
> * build-aux/update-copyright: Added check to not change test data

This script is maintained in Gnulib, so I'm not sure where to put this,
as it's only relevant to Emacs.

I'm also not sure why changes in the below files caused would have
caused the etags tests to fail now, when they didn't before.

> * test/manual/etags/c-src/emacs/src/gmalloc.c:
> * test/manual/etags/y-src/parse.c:




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76744; Package emacs. (Tue, 04 Mar 2025 19:36:01 GMT) Full text and rfc822 format available.

Message #11 received at 76744 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vladimir Gorsunov <gorsunov <at> gmail.com>
Cc: 76744 <at> debbugs.gnu.org
Subject: Re: bug#76744: [PATCH] etags test doesn't pass
Date: Tue, 04 Mar 2025 21:35:10 +0200
> From: Vladimir Gorsunov <gorsunov <at> gmail.com>
> Date: Tue, 4 Mar 2025 18:54:08 +0200
> 
>   Test for etags fails since commit 4da38c63 when update-copyrights script inserted new lines into some of
> the test files. Including a patch that reverts added lines and adds a check to the script

Thanks, but if you eyeballed the diffs and verified that they are only
due to some shifts in line numbers caused by added lines (did you?),
then the right fix is simply to update the expected-result files to
match the output with the current sources.  That's because the test
files need their copyright years updated as well, so we cannot exempt
them.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76744; Package emacs. (Tue, 04 Mar 2025 19:42:02 GMT) Full text and rfc822 format available.

Message #14 received at 76744 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: gorsunov <at> gmail.com, 76744 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: Re: bug#76744: [PATCH] etags test doesn't pass
Date: Tue, 04 Mar 2025 21:41:31 +0200
> Cc: Paul Eggert <eggert <at> cs.ucla.edu>
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Tue, 4 Mar 2025 11:22:52 -0800
> 
> I'm also not sure why changes in the below files caused would have
> caused the etags tests to fail now, when they didn't before.
> 
> > * test/manual/etags/c-src/emacs/src/gmalloc.c:
> > * test/manual/etags/y-src/parse.c:

Because the copyright script added lines, and the TAGS files include
line numbers.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76744; Package emacs. (Tue, 04 Mar 2025 21:50:02 GMT) Full text and rfc822 format available.

Message #17 received at 76744 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Vladimir Gorsunov <gorsunov <at> gmail.com>, 76744 <at> debbugs.gnu.org
Subject: Re: bug#76744: [PATCH] etags test doesn't pass
Date: Tue, 4 Mar 2025 13:48:51 -0800
On 3/4/25 11:22, Stefan Kangas wrote:
>> * build-aux/update-copyright: Added check to not change test data
> This script is maintained in Gnulib, so I'm not sure where to put this,
> as it's only relevant to Emacs.

Yes, changes like this should be put into admin/update-copyright, not 
build-aux/update-copyright.

However, this kind of change is heading in the wrong direction, as the 
test files in question mutate from time to time, e.g., commit 
d0be0965ca344caab7879b2ac2373a68025c9ba2. Instead, either the tests 
should be redone to be robust in the presence of line number changes, or 
(probably easier) admin/update-copyright should be taught not to change 
the number of lines when it updates a copyright date.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76744; Package emacs. (Thu, 06 Mar 2025 10:15:02 GMT) Full text and rfc822 format available.

Message #20 received at 76744 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: gorsunov <at> gmail.com, 76744 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: Re: bug#76744: [PATCH] etags test doesn't pass
Date: Thu, 06 Mar 2025 12:13:34 +0200
> Cc: Vladimir Gorsunov <gorsunov <at> gmail.com>, 76744 <at> debbugs.gnu.org
> Date: Tue, 4 Mar 2025 13:48:51 -0800
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> 
> On 3/4/25 11:22, Stefan Kangas wrote:
> >> * build-aux/update-copyright: Added check to not change test data
> > This script is maintained in Gnulib, so I'm not sure where to put this,
> > as it's only relevant to Emacs.
> 
> Yes, changes like this should be put into admin/update-copyright, not 
> build-aux/update-copyright.
> 
> However, this kind of change is heading in the wrong direction, as the 
> test files in question mutate from time to time, e.g., commit 
> d0be0965ca344caab7879b2ac2373a68025c9ba2. Instead, either the tests 
> should be redone to be robust in the presence of line number changes, or 
> (probably easier) admin/update-copyright should be taught not to change 
> the number of lines when it updates a copyright date.

For now, I simply updated the expected-results files in
test/manual/etags/.  This is what we've been doing this since these
tests were added.  If someone wants to modify the update-copyright
scripts to skip those files, feel free, but TBH I'm not sure we are
allowed not to update the copyright of test files.




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Mon, 10 Mar 2025 21:11:01 GMT) Full text and rfc822 format available.

Notification sent to Vladimir Gorsunov <gorsunov <at> gmail.com>:
bug acknowledged by developer. (Mon, 10 Mar 2025 21:11:02 GMT) Full text and rfc822 format available.

Message #25 received at 76744-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gorsunov <at> gmail.com, 76744-done <at> debbugs.gnu.org,
 Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#76744: [PATCH] etags test doesn't pass
Date: Mon, 10 Mar 2025 14:10:17 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Cc: Vladimir Gorsunov <gorsunov <at> gmail.com>, 76744 <at> debbugs.gnu.org
>> Date: Tue, 4 Mar 2025 13:48:51 -0800
>> From: Paul Eggert <eggert <at> cs.ucla.edu>
>>
>> On 3/4/25 11:22, Stefan Kangas wrote:
>> >> * build-aux/update-copyright: Added check to not change test data
>> > This script is maintained in Gnulib, so I'm not sure where to put this,
>> > as it's only relevant to Emacs.
>>
>> Yes, changes like this should be put into admin/update-copyright, not
>> build-aux/update-copyright.
>>
>> However, this kind of change is heading in the wrong direction, as the
>> test files in question mutate from time to time, e.g., commit
>> d0be0965ca344caab7879b2ac2373a68025c9ba2. Instead, either the tests
>> should be redone to be robust in the presence of line number changes, or
>> (probably easier) admin/update-copyright should be taught not to change
>> the number of lines when it updates a copyright date.
>
> For now, I simply updated the expected-results files in
> test/manual/etags/.  This is what we've been doing this since these
> tests were added.  If someone wants to modify the update-copyright
> scripts to skip those files, feel free, but TBH I'm not sure we are
> allowed not to update the copyright of test files.

I'd tend to agree.  I'm therefore closing this bug report.

Thanks Vladimir for the patches, nevertheless.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Apr 2025 11:24:19 GMT) Full text and rfc822 format available.

This bug report was last modified 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.