unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: Alexander Adolf <alexander.adolf@condition-alpha.com>,
	59314@debbugs.gnu.org
Subject: bug#59314: 29.0.50; EUDC and message-mode header completion
Date: Tue, 22 Nov 2022 10:21:05 -0500	[thread overview]
Message-ID: <m3r0xvuiam.fsf@fitzsim.org> (raw)
In-Reply-To: <87k03nx2t1.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 21 Nov 2022 16:15:06 -0800")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>
> [...]
>
>> That's the extent of my email completion setup.  I think the only reason
>> this setup doesn't generalize (assuming an EUDC EBDB backend in your
>> case) is that other people like different UIs, e.g., when the same
>> prefix expands to multiple possible addresses (as you alluded to), what
>> UI should one use to select?  I use the UI provided by EUDC.
>>
>> Anyway, tonight I did manage to add ERT tests for the EUDC LDAP backend.
>> Can you try:
>>
>> make -C test lisp/net/eudc-tests.log
>
> No love!
>
> Running 11 tests (2022-11-21 16:04:40-0800, selector `(not (or (tag :unstable) (tag :nativecomp)))')
>    passed   1/11  eudc--plist-member (0.000396 sec)
>    passed   2/11  eudc-lax-plist-get (0.000433 sec)
>    passed   3/11  eudc-plist-get (0.000417 sec)
>    passed   4/11  eudc-plist-member (0.000390 sec)
>    passed   5/11  eudc-test-make-address (0.000151 sec)
>    passed   6/11  eudc-test-rfc5322-quote-phrase (0.000067 sec)
>    passed   7/11  eudc-test-rfc5322-valid-comment-p (0.000760 sec)
>   skipped   8/11  eudcb-bbdb (0.000102 sec)
>    passed   9/11  eudcb-ecomplete (0.007451 sec)
> Loading eudcb-ldap...
> Parsing results...
> Parsing results... done
> Parsing results...
> Parsing results... done
> Test eudcb-ldap backtrace:
>   signal(error ("No match"))
>   apply(signal (error ("No match")))
>   (setq value-640 (apply fn-638 args-639))
>   (unwind-protect (setq value-640 (apply fn-638 args-639)) (setq form-
>   (if (unwind-protect (setq value-640 (apply fn-638 args-639)) (setq f
>   (let (form-description-642) (if (unwind-protect (setq value-640 (app
>   (let ((value-640 'ert-form-evaluation-aborted-641)) (let (form-descr
>   (let* ((fn-638 #'equal) (args-639 (condition-case err (let ((signal-
>   (let ((ldap-process (start-process "slapd" "*slapd*" "/usr/sbin/slap
>   (closure (t) nil (let ((value-636 (gensym "ert-form-evaluation-abort
>   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>   ert-run-test(#s(ert-test :name eudcb-ldap :documentation "Test the L
>   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
>   ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
>   ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
>   ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
>   eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
>   command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/net/eudc-tests.el" "
>   command-line()
>   normal-top-level()
> Test eudcb-ldap condition:
>     (error "No match")
>    FAILED  10/11  eudcb-ldap (1.024022 sec) at lisp/net/eudc-tests.el:271
> Parsing /home/eric/dev/emacs/test/lisp/net/eudc-resources/mailrc...
> Parsing /home/eric/dev/emacs/test/lisp/net/eudc-resources/mailrc... done
>    passed  11/11  eudcb-mailabbrev (0.002174 sec)
>
> Ran 11 tests, 9 results as expected, 1 unexpected, 1 skipped (2022-11-21 16:04:41-0800, 1.151547 sec)
>
> 1 unexpected results:
>    FAILED  eudcb-ldap
>
> 1 skipped results:
>   SKIPPED  eudcb-bbdb

Thanks for trying.

Can you try changing "(sleep-for 1)" to "(sleep-for 5)"?  (In a
subsequent patch I'll replace the sleep with a retry loop to make this
more reliable.)

If that doesn't work, then below is roughly what the test is doing.  Can
you see if this works for you on the command line?  You can change "-d
0" => "-d 255" for lots of debugging output.

The test first changes to the "test/lisp/net" directory, which is
important, because the slapd.conf line "directory eudc-resources"
specifies a relative directory.

cd test/lisp/net
/usr/sbin/slapd -h "ldap://127.0.0.1:3899" \
    -d 0 -4 \
    -f eudc-resources/slapd.conf & \
sleep 5 && \
ldapsearch -x -LLL -h127.0.0.1:3899 \
    -b "dc=gnu,dc=org" "cn=emacs-ert-test-1"
=>
dn: cn=emacs-ert-test-1,dc=gnu,dc=org
objectClass: OpenLDAPperson
cn: emacs-ert-test-1
description:: RW1hY3Mg
uid: 1
sn: ERT1
givenName: Emacs
mail: emacs-ert-test-1@ldap.gnu.org

Thanks,
Thomas





  reply	other threads:[~2022-11-22 15:21 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 18:05 bug#59314: 29.0.50; EUDC and message-mode header completion Eric Abrahamsen
2022-11-16 19:18 ` Thomas Fitzsimmons
2022-11-16 19:46   ` Eric Abrahamsen
2022-11-16 20:54     ` Thomas Fitzsimmons
2022-11-16 22:28       ` Eric Abrahamsen
2022-11-17  1:34         ` Thomas Fitzsimmons
2022-11-17  2:04           ` Eric Abrahamsen
2022-11-17  1:16       ` Eric Abrahamsen
2022-11-17  3:32         ` Thomas Fitzsimmons
2022-11-17  3:28     ` Thomas Fitzsimmons
2022-11-18  4:21       ` Eric Abrahamsen
2022-11-19  7:42         ` Thomas Fitzsimmons
2022-11-22  0:15           ` Eric Abrahamsen
2022-11-22 15:21             ` Thomas Fitzsimmons [this message]
2022-11-24  7:24               ` Thomas Fitzsimmons
2022-11-24 22:09                 ` Eric Abrahamsen
2022-11-24  9:53             ` Thomas Fitzsimmons
2022-12-01 15:46     ` Alexander Adolf
2022-12-01 16:02       ` Eric Abrahamsen
2022-12-01 15:48     ` Alexander Adolf
2022-12-01 17:49       ` Eric Abrahamsen
2022-12-02  2:50       ` Thomas Fitzsimmons
2022-12-06 20:40         ` Alexander Adolf
2022-12-06 20:52           ` Thomas Fitzsimmons
2022-12-06 23:29             ` Alexander Adolf
2022-12-07  1:51               ` Thomas Fitzsimmons
2022-12-07  3:14                 ` Thomas Fitzsimmons
2022-12-07 22:10                   ` Alexander Adolf
2022-12-07 22:21                     ` Thomas Fitzsimmons
2022-12-08 22:34                       ` Alexander Adolf
2022-12-08 22:58                         ` Thomas Fitzsimmons
2022-12-10  1:40                           ` Alexander Adolf
2022-12-10 14:27                             ` Thomas Fitzsimmons
2022-12-12 22:10                               ` Alexander Adolf
2022-12-14  1:34                                 ` Thomas Fitzsimmons
2022-12-14 18:07                                   ` Alexander Adolf
2022-12-15  3:32                                     ` Thomas Fitzsimmons
2022-12-19 16:09                                       ` Alexander Adolf
2022-12-21 17:39                                 ` Thomas Fitzsimmons
2022-12-11 16:08                           ` Alexander Adolf
2022-12-12 12:31                             ` Thomas Fitzsimmons
2022-12-07 22:20                   ` Alexander Adolf
2023-02-11  3:30         ` Thomas Fitzsimmons
2023-01-31 13:04 ` Julien Cubizolles
2023-02-05  0:48   ` Thomas Fitzsimmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r0xvuiam.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=59314@debbugs.gnu.org \
    --cc=alexander.adolf@condition-alpha.com \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).