Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853322 - app-emacs/compat-28.1.1.3 fails tests
Summary: app-emacs/compat-28.1.1.3 fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-21 14:03 UTC by Agostino Sarubbo
Modified: 2022-06-21 20:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,164.65 KB, text/plain)
2022-06-21 14:03 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-06-21 14:03:12 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-emacs/compat-28.1.1.3 fails tests.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-06-21 14:03:15 UTC
Created attachment 786590 [details]
build.log

build log and emerge --info
Comment 2 Maciej Barć gentoo-dev 2022-06-21 16:35:45 UTC
As of now I couldn't reproduce.
Comment 3 Matthew Smith gentoo-dev 2022-06-21 17:16:08 UTC
(In reply to Maciej Barć from comment #2)
> As of now I couldn't reproduce.

These tests compare values from compat's json-parse-string to the native JSON parser, any Emacs with USE=-json will fail here.

A lot of the tests are similar (comparing the compat implementation with the real thing), so I think it would be best to RESTRICT=test or delete the tests as they don't provide a lot of value.
Comment 4 Maciej Barć gentoo-dev 2022-06-21 17:18:43 UTC
Deleting ALL test is a bad idea, because there are still some other test provide some value.
We can always add emacs[json] to BDEPEND :) ...which I think is the right thing to do!
Comment 5 Larry the Git Cow gentoo-dev 2022-06-21 17:48:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b80c6ce439ef6013dfa1ec1868576d1acaad322

commit 9b80c6ce439ef6013dfa1ec1868576d1acaad322
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2022-06-21 17:46:26 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2022-06-21 17:48:05 +0000

    app-emacs/compat: add emacs[json] required for tests
    
    Closes: https://bugs.gentoo.org/853322
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-emacs/compat/compat-28.1.1.3.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 6 Ulrich Müller gentoo-dev 2022-06-21 19:06:46 UTC
(In reply to Maciej Barć from comment #4)
> We can always add emacs[json] to BDEPEND :) ...which I think is the right
> thing to do!

No, this is a terrible idea because it limits the user's choice. Please revert and find a different solution.
Comment 7 Ulrich Müller gentoo-dev 2022-06-21 19:08:58 UTC
(In reply to Ulrich Müller from comment #6)
> (In reply to Maciej Barć from comment #4)
> > We can always add emacs[json] to BDEPEND :) ...which I think is the right
> > thing to do!
> 
> No, this is a terrible idea because it limits the user's choice. Please
> revert and find a different solution.

For example, check for "has_version app-editors/emacs[json(-)]" in src_test() and skip tests if this condition is not fulfilled.
Comment 8 Ulrich Müller gentoo-dev 2022-06-21 19:14:27 UTC
(In reply to Ulrich Müller from comment #7)
> For example, check for "has_version app-editors/emacs[json(-)]" in
> src_test() and skip tests if this condition is not fulfilled.

Thinking about it, this won't work, because the eselected Emacs version may not have the feature. For the same reason, the BDEPEND won't work either.

So presumably, a runtime check in src_test is needed here. (Look at app-editors/emacs-daemon-0.22 for an example.)
Comment 9 Maciej Barć gentoo-dev 2022-06-21 19:20:59 UTC
(In reply to Ulrich Müller from comment #6)
> (In reply to Maciej Barć from comment #4)
> > We can always add emacs[json] to BDEPEND :) ...which I think is the right
> > thing to do!
> 
> No, this is a terrible idea because it limits the user's choice. Please
> revert and find a different solution.

No, it does not limit the user's choice because it is just for tests.

Maybe I wasn't clear enough, I meant BDEPEND="test? ( thing )".
Comment 10 Larry the Git Cow gentoo-dev 2022-06-21 19:36:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98307eefb98e8ec4fa76501aa3bfb877ff59de96

commit 98307eefb98e8ec4fa76501aa3bfb877ff59de96
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2022-06-21 19:35:49 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2022-06-21 19:36:11 +0000

    app-emacs/compat: check for native JSON parsing support
    
    Closes: https://bugs.gentoo.org/853322
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-emacs/compat/compat-28.1.1.3.ebuild | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Comment 11 Maciej Barć gentoo-dev 2022-06-21 19:38:37 UTC
If you think "test?" BDEPEND is useless now you can drop it.

In my opinion it should stay; I'm sure I have seen something similar some time ago, where it wasn't 100% clear the test dep is used but it was still being pulled in.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-21 19:39:24 UTC
(In reply to Maciej Barć from comment #11)
> If you think "test?" BDEPEND is useless now you can drop it.
> 
> In my opinion it should stay; I'm sure I have seen something similar some
> time ago, where it wasn't 100% clear the test dep is used but it was still
> being pulled in.

It's correct. Because of slotted Emacs, a BDEPEND is necessary but not sufficient.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-21 19:39:50 UTC
(In reply to Sam James from comment #12)
> (In reply to Maciej Barć from comment #11)
> > If you think "test?" BDEPEND is useless now you can drop it.
> > 
> > In my opinion it should stay; I'm sure I have seen something similar some
> > time ago, where it wasn't 100% clear the test dep is used but it was still
> > being pulled in.
> 
> It's correct. Because of slotted Emacs, a BDEPEND is necessary but not
> sufficient.

... but please add a "die" in your new check, because otherwise we'll get a false-positive on tests passing.
Comment 14 Larry the Git Cow gentoo-dev 2022-06-21 19:47:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb8fad5ea441ea9c5a8e940fad76b2a07fb32155

commit cb8fad5ea441ea9c5a8e940fad76b2a07fb32155
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2022-06-21 19:47:11 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2022-06-21 19:47:11 +0000

    app-emacs/compat: add missing die to avoid false-positive
    
    Bug: https://bugs.gentoo.org/853322
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-emacs/compat/compat-28.1.1.3.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 15 Larry the Git Cow gentoo-dev 2022-06-21 20:02:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8701186083295b4136c3e2d45048b1f9265eb1e

commit e8701186083295b4136c3e2d45048b1f9265eb1e
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2022-06-21 20:00:30 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2022-06-21 20:00:30 +0000

    app-emacs/compat: Drop BDEPEND on emacs[json]
    
    Bug: https://bugs.gentoo.org/853322#c11
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/compat/compat-28.1.1.3.ebuild | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
Comment 16 Ulrich Müller gentoo-dev 2022-06-21 20:05:11 UTC
(In reply to Sam James from comment #13)
> ... but please add a "die" in your new check, because otherwise we'll get a
> false-positive on tests passing.

IMHO this is just wrong. We don't want failing tests for reasons that have nothing to do with the package.