GNU bug report logs - #36694
27.0.50; Test secrets-test03-items is failing

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Tue, 16 Jul 2019 17:25:02 UTC

Severity: minor

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

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 36694 in the body.
You can then email your comments to 36694 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 michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org:
bug#36694; Package emacs. (Tue, 16 Jul 2019 17:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
New bug report received and forwarded. Copy sent to michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org. (Tue, 16 Jul 2019 17:25:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Test secrets-test03-items is failing
Date: Tue, 16 Jul 2019 18:24:33 +0100
[Message part 1 (text/plain, inline)]
X-Debbugs-Cc: Michael Albinus <michael.albinus <at> gmx.de>
Severity: minor

On current master on my machine, 'make check' reports one file
containing unexpected results:

[secrets-tests.log (text/plain, inline)]
Running 5 tests (2019-07-16 18:13:46+0100, selector `(not (or (tag :expensive-test) (tag :unstable)))')
   passed  1/5  secrets-test00-availability (0.007341 sec)
   passed  2/5  secrets-test01-sessions (0.011786 sec)
   passed  3/5  secrets-test02-collections (0.007273 sec)
Test secrets-test03-items backtrace:
  signal(ert-test-failed (((should (equal (secrets-get-attributes "ses
  ert-fail(((should (equal (secrets-get-attributes "session" item) '((
  #f(compiled-function () #<bytecode 0x1573ace03b1d>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name secrets-test03-items :documentation "
  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
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/net/secrets-tests" "
  command-line()
  normal-top-level()
Test secrets-test03-items condition:
    (ert-test-failed
     ((should
       (equal
	(secrets-get-attributes "session" item)
	'...))
      :form
      (equal
       ((:host . "remote-host")
	(:method . "sudo")
	(:user . "joe")
	(:xdg:schema . "org.freedesktop.Secret.Generic"))
       ((:xdg:schema . "org.freedesktop.Secret.Generic")
	(:host . "remote-host")
	(:user . "joe")
	(:method . "sudo")))
      :value nil :explanation
      (list-elt 0
		(car
		 (different-atoms :host :xdg:schema)))))
   FAILED  4/5  secrets-test03-items (0.080947 sec)
   passed  5/5  secrets-test04-search (0.075937 sec)

Ran 5 tests, 4 results as expected, 1 unexpected (2019-07-16 18:13:46+0100, 0.423667 sec)

1 unexpected results:
   FAILED  secrets-test03-items

[Message part 3 (text/plain, inline)]
For some reason, the test secrets-test03-items expects
secrets-get-attributes to silently put the attribute :xdg:schema at the
beginning of the returned alist, but on my system that attribute is
placed at the end.

Is the precise ordering of attributes significant?  If so, why?  If not,
the test should stop assuming any particular ordering and use
seq-set-equal-p in place of equal.  Patch to this effect to follow.

Thanks,

-- 
Basil

In GNU Emacs 27.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2019-07-16 built on thunk
Repository revision: a87840fffbf471d53eba17ea683728125d2d4767
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux bullseye/sid

Configured using:
 'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native' --config-cache
 --prefix=/home/blc/.local --with-mailutils --with-x-toolkit=lucid
 --with-modules --with-file-notification=yes --with-x'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_IE.UTF-8
  locale-coding-system: utf-8-unix

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36694; Package emacs. (Tue, 16 Jul 2019 17:33:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: 36694 <at> debbugs.gnu.org
Cc: michael albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#36694: 27.0.50; Test secrets-test03-items is failing
Date: Tue, 16 Jul 2019 18:31:59 +0100
[Message part 1 (text/plain, inline)]
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> For some reason, the test secrets-test03-items expects
> secrets-get-attributes to silently put the attribute :xdg:schema at the
> beginning of the returned alist, but on my system that attribute is
> placed at the end.
>
> Is the precise ordering of attributes significant?  If so, why?  If not,
> the test should stop assuming any particular ordering and use
> seq-set-equal-p in place of equal.  Patch to this effect to follow.

Here it is:

[0001-Fix-failing-secrets-test03-items.patch (text/x-diff, inline)]
From d2758820cd45733570c704431da3f3e91dbb8605 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Tue, 16 Jul 2019 17:41:18 +0100
Subject: [PATCH] Fix failing secrets-test03-items

* test/lisp/net/secrets-tests.el: Use lexical-binding.
(secrets-test03-items): Do not assume :xdg:schema attribute is
silently added to the front of the collection (bug#36694).
(secrets-test04-search, secrets-test-all): Quote function symbols as
such.
---
 test/lisp/net/secrets-tests.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el
index c565eba567..bab8eb5d18 100644
--- a/test/lisp/net/secrets-tests.el
+++ b/test/lisp/net/secrets-tests.el
@@ -1,4 +1,4 @@
-;;; secrets-tests.el --- Tests of Secret Service API
+;;; secrets-tests.el --- Tests of Secret Service API -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2018-2019 Free Software Foundation, Inc.
 
@@ -21,6 +21,7 @@
 
 (require 'ert)
 (require 'secrets)
+(require 'seq)
 (require 'notifications)
 
 ;; We do not want chatty messages.
@@ -175,10 +176,9 @@ secrets-test03-items
         (dolist (item `("bar" ,item-path))
 	  (should
 	   (string-equal (secrets-get-attribute "session" item :method) "sudo"))
-	  ;; The attributes are collected in reverse order.
-	  ;; :xdg:schema is added silently.
+          ;; The attribute :xdg:schema is added silently.
 	  (should
-	   (equal
+           (seq-set-equal-p
 	    (secrets-get-attributes "session" item)
 	    '((:xdg:schema . "org.freedesktop.Secret.Generic")
               (:host . "remote-host") (:user . "joe") (:method . "sudo")))))
@@ -242,14 +242,14 @@ secrets-test04-search
          (secrets-search-items "session" :xdg:schema "org.gnu.Emacs.foo"))
 	(should
 	 (equal
-	  (sort (secrets-search-items "session" :user "joe") 'string-lessp)
+          (sort (secrets-search-items "session" :user "joe") #'string-lessp)
 	  '("baz" "foo")))
 	(should
 	 (equal
 	  (secrets-search-items "session":method "sudo" :user "joe") '("foo")))
 	(should
 	 (equal
-	  (sort (secrets-search-items "session") 'string-lessp)
+          (sort (secrets-search-items "session") #'string-lessp)
 	  '("bar" "baz" "foo"))))
 
     ;; Exit.
@@ -261,7 +261,7 @@ secrets-test-all
   "Run all tests for \\[secrets]."
   (interactive "p")
   (funcall
-   (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch)
+   (if interactive #'ert-run-tests-interactively #'ert-run-tests-batch)
    "^secrets"))
 
 (provide 'secrets-tests)
-- 
2.20.1

[Message part 3 (text/plain, inline)]
WDYT?

Thanks,

-- 
Basil

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36694; Package emacs. (Tue, 16 Jul 2019 19:09:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 36694 <at> debbugs.gnu.org
Subject: Re: bug#36694: 27.0.50; Test secrets-test03-items is failing
Date: Tue, 16 Jul 2019 21:08:18 +0200
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

Hi Basil,

>> For some reason, the test secrets-test03-items expects
>> secrets-get-attributes to silently put the attribute :xdg:schema at the
>> beginning of the returned alist, but on my system that attribute is
>> placed at the end.
>>
>> Is the precise ordering of attributes significant?  If so, why?  If not,
>> the test should stop assuming any particular ordering and use
>> seq-set-equal-p in place of equal.  Patch to this effect to follow.
>
> Here it is:

The order is not relevant. Pls apply your patch.

> Thanks,

Best regards, Michael.




Added tag(s) fixed. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 16 Jul 2019 19:14:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36694 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie> Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Tue, 16 Jul 2019 19:14:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36694; Package emacs. (Tue, 16 Jul 2019 19:14:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 36694-done <at> debbugs.gnu.org
Subject: Re: bug#36694: 27.0.50; Test secrets-test03-items is failing
Date: Tue, 16 Jul 2019 20:13:25 +0100
tags 36694 fixed
close 36694 27.1
quit

Michael Albinus <michael.albinus <at> gmx.de> writes:

> The order is not relevant. Pls apply your patch.

Thanks, done:

Fix failing secrets-test03-items
d2758820cd 2019-07-16 18:29:52 +0100
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d2758820cd45733570c704431da3f3e91dbb8605

-- 
Basil




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Aug 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 307 days ago.

Previous Next


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