From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick.r.chiang@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#51197: 28.0.50; [PATCH] get process-async-https-with-delay to pass Date: Wed, 13 Oct 2021 22:20:35 -0400 Message-ID: <878ryw5ouk.fsf@dick> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30278"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.14 (Gnus v5.14) Commercial/28.0.50 (gnu/linux) To: 51197@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 14 04:21:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maqMq-0007dE-8g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Oct 2021 04:21:12 +0200 Original-Received: from localhost ([::1]:57304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maqMn-0006Ks-Uq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Oct 2021 22:21:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maqMh-0006Jr-5J for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 22:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maqMg-0001Vl-NM for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 22:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maqMg-0005LL-Dz for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 22:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dick.r.chiang@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Oct 2021 02:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51197 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.163417804720495 (code B ref -1); Thu, 14 Oct 2021 02:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Oct 2021 02:20:47 +0000 Original-Received: from localhost ([127.0.0.1]:34103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maqMQ-0005KU-SF for submit@debbugs.gnu.org; Wed, 13 Oct 2021 22:20:47 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maqMN-0005KI-4q for submit@debbugs.gnu.org; Wed, 13 Oct 2021 22:20:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maqMM-0006GW-0J for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 22:20:42 -0400 Original-Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:37796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maqMI-00019n-8u for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 22:20:41 -0400 Original-Received: by mail-qv1-xf2a.google.com with SMTP id o13so2934425qvm.4 for ; Wed, 13 Oct 2021 19:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version; bh=ACa4Bug69OO80awFAoepOHJCvuzbB/NVeCd0t0bybwQ=; b=JDc4kjeVEzuZqbtkVLXM/9/bOZDWrhfZg9CWHigfwLnNg7NkLEKTycGWDyc2sZfAuX IZuR0wwq9QDrtb32w8QLarFzMLE/3ilhd+s2zn0S+1Pj6dMW1naHg25RT1dhMd5Id5Yd ZsRruFR5iYuujmnrwzck0FyWqVaGVeqFNC/n6BC37qtZbQgZ8Hz5RH2qTSLb/+bFuLvT qwFEN3XO541n002TUZumi8nZI1KtuUn4+Ki/Ac2H+HovMYTuVDLAOs0/ufiJ8IAybmaq gqbjxFGrIw3pXm1RYt2+pEydHI21s899MPxFFAK7xDlbWfHkktnnQFlC+BZUQEUHB8WP AGHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=ACa4Bug69OO80awFAoepOHJCvuzbB/NVeCd0t0bybwQ=; b=P89a6BFiRHMaurUdfxfcp0SeOw1sjV1Vby7tk7KUg3pgkAsOTS3aq3BAMh6pPDDYad FxuutEhVBeJgBX/mZRoBPwr+erGZZgiPHyzM1mwUcDg2j8i9+osVRRXSVyIyVP0bVwlN 7GgDodUGueGg+esYw5qgtiY1aHpw7zAjdyHMlelfqJ/iA3P4ysiL5iCOY9bOQGh8HbtY +8HLjLVu3as1EWMgGl4opyNU+lEb+5UpQvVnd8nbU4oPfOycWcNyZi2LXdHcJrHfTJ4o 8hOa2pvD0mJglLLcZZhr14KFiPJHLP5SJsve4wvtb5esyOd9YwlujxL3BswQ7J6eR45z o2dg== X-Gm-Message-State: AOAM533wZ2xau3JIcNuS7puv/VuedEoolaMSJpsmR7+Bs2q+PiOlgdMN maN8xQBaIYrlEIRWoBWlXoRIANhm6l8= X-Google-Smtp-Source: ABdhPJwnl3c8kVXQun2Hkze0S95eUAIXDgJ0tWaJnvUGCxB/RGXiNJqNQNLKysx0abXKE1B2nxN5Sw== X-Received: by 2002:a05:6214:f2d:: with SMTP id iw13mr2560541qvb.16.1634178036964; Wed, 13 Oct 2021 19:20:36 -0700 (PDT) Original-Received: from localhost ([68.237.93.126]) by smtp.gmail.com with ESMTPSA id r6sm828867qtp.34.2021.10.13.19.20.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Oct 2021 19:20:36 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=dick.r.chiang@gmail.com; helo=mail-qv1-xf2a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217193 Archived-At: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-TLS-bureaucracy-flusters-test.patch >From f84829428d2e912f925ceccd95c1d81aebe64108 Mon Sep 17 00:00:00 2001 From: dickmao Date: Wed, 13 Oct 2021 16:39:05 -0400 Subject: [PATCH] TLS bureaucracy flusters test It's never ideal when a test pings the internet (messes up statistics, pointlessly adds to WAN congestion), but I get it's a pain to stand up a toy https server. See also https://www.reddit.com/r/emacs/comments/pyevj8/what_should_i_do_cant_use_the_package_manager_it/?utm_source=share&utm_medium=web2x&context=3 * test/src/process-tests.el (process-async-https-with-delay): Dial down the security. --- test/src/process-tests.el | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 44f3ea2fbb..ee64a145b7 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -920,31 +920,27 @@ process-sentinel-interrupt-event (ert-deftest process-async-https-with-delay () "Bug#49449: asynchronous TLS connection with delayed completion." (skip-unless (and internet-is-working (gnutls-available-p))) - (let* ((status nil) + (let* (status + (network-security-level 'low) (buf (url-http - #s(url "https" nil nil "elpa.gnu.org" nil - "/packages/archive-contents" nil nil t silent t t) - (lambda (s) (setq status s)) - '(nil) nil 'tls))) + #s(url "https" nil nil "elpa.gnu.org" nil + "/packages/archive-contents" nil nil t silent t t) + (lambda (s) (setq status s)) + '(nil) nil 'tls))) (unwind-protect (progn - ;; Busy-wait for 1 s to allow for the TCP connection to complete. - (let ((delay 1.0) - (t0 (float-time))) - (while (< (float-time) (+ t0 delay)))) - ;; Wait for the entire operation to finish. - (let ((limit 4.0) - (t0 (float-time))) - (while (and (null status) - (< (float-time) (+ t0 limit))) - (sit-for 0.1))) + (catch 'done + (dotimes (_i 40) + (when status + (throw 'done status)) + (accept-process-output nil 0.1))) (should status) - (should-not (assq :error status)) - (should buf) - (should (> (buffer-size buf) 0)) - ) - (when buf - (kill-buffer buf))))) + (should-not (plist-get status :error)) + (should (buffer-live-p buf)) + (should (> (buffer-size buf) 0))) + (when (buffer-live-p buf) + (let (kill-buffer-query-functions) + (kill-buffer buf)))))) (ert-deftest process-num-processors () "Sanity checks for num-processors." -- 2.26.2 --=-=-= Content-Type: text/plain In Commercial Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2021-10-13 built on dick Repository revision: cfc2ffe8668b87f4951e73230db3703b2c251d24 Repository branch: process Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.4 LTS Configured using: 'configure --prefix=/home/dick/.local --enable-dumping-overwrite CC=gcc-10 PKG_CONFIG_PATH=/home/dick/.local/lib/pkgconfig' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: gnus-topic-mode: t gnus-undo-mode: t shell-dirtrack-mode: t projectile-mode: t flx-ido-mode: t override-global-mode: t global-hl-line-mode: t winner-mode: t tooltip-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/dick/gomacro-mode/gomacro-mode hides /home/dick/.emacs.d/elpa/gomacro-mode-20200326.1103/gomacro-mode /home/dick/.emacs.d/elpa/hydra-20170924.2259/lv hides /home/dick/.emacs.d/elpa/lv-20191106.1238/lv /home/dick/.emacs.d/elpa/magit-3.3.0/magit-section-pkg hides /home/dick/.emacs.d/elpa/magit-section-3.3.0/magit-section-pkg /home/dick/org-gcal.el/org-gcal hides /home/dick/.emacs.d/elpa/org-gcal-0.3/org-gcal /home/dick/.emacs.d/lisp/json hides /home/dick/.local/share/emacs/28.0.50/lisp/json /home/dick/.emacs.d/elpa/transient-0.3.6/transient hides /home/dick/.local/share/emacs/28.0.50/lisp/transient /home/dick/.emacs.d/elpa/hierarchy-20171221.1151/hierarchy hides /home/dick/.local/share/emacs/28.0.50/lisp/emacs-lisp/hierarchy Features: (shadow sort bbdb-message footnote mail-extr emacsbug sendmail gnus-notifications gnus-fun notifications gnus-kill gnus-dup disp-table utf-7 mm-archive url-cache nnrss nnfolder nndiscourse benchmark rbenv nnhackernews nntwitter nntwitter-api bbdb-gnus gnus-demon nntp nnmairix nnml nnreddit gnus-topic url-http url-auth url-gw network-stream gnutls nsm virtualenvwrapper gud s json-rpc python tramp-sh gnus-score score-mode gnus-bcklg gnus-srvr gnus-cite bbdb-mua bbdb-com crm bbdb bbdb-site timezone gnus-delay gnus-draft gnus-cache gnus-agent gnus-msg nndraft nnmh use-package use-package-delight use-package-diminish vc-git diff-mode vc-dispatcher bug-reference org-element avl-tree ol-eww eww xdg url-queue ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group mm-url gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils gnus-win ol-docview doc-view jka-compr image-mode exif dired-x dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi org-tempo tempo org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-R ob-emacs-lisp ob-ein ein-cell ein-output-area shr kinsoku puny svg dom ein-kernel ein-ipdb ein-query ein-events ein-websocket websocket bindat ein-node ewoc ein-log ein-classes ein-core request mailheader autorevert filenotify anaphora ein ein-utils deferred dash cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob ob-tangle org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core ob-eval org-table ol org-keys oc org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs tramp-archive tramp-gvfs tramp-cache zeroconf dbus xml tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete parse-time iso8601 ls-lisp format-spec paredit-ext paredit subed subed-vtt subed-srt subed-common subed-mpv subed-debug subed-config inf-ruby ruby-mode smie company pcase haskell-interactive-mode haskell-presentation-mode haskell-process haskell-session haskell-compile haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme rx haskell-align-imports haskell-complete-module haskell-ghc-support noutline outline flymake-proc flymake warnings etags fileloop generator xref project dabbrev haskell-customize hydra lv use-package-ensure solarized-theme solarized-definitions projectile lisp-mnt mail-parse rfc2231 ibuf-ext ibuffer ibuffer-loaddefs thingatpt grep compile comint ansi-color gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils text-property-search time-date flx-ido flx google-translate-default-ui google-translate-core-ui facemenu color ido google-translate-core google-translate-tk google-translate-backend use-package-bind-key bind-key auto-complete easy-mmode advice popup cus-edit pp cus-load wid-edit emms-player-mplayer emms-player-simple emms emms-compat cl-extra help-mode use-package-core derived hl-line winner ring edmacro kmacro finder-inf json-reformat-autoloads json-snatcher-autoloads sml-mode-autoloads tornado-template-mode-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 805970 97599) (symbols 48 43370 1) (strings 32 174394 19790) (string-bytes 1 6003490) (vectors 16 87423) (vector-slots 8 1641774 40738) (floats 8 1842 315) (intervals 56 684 0) (buffers 992 25)) --=-=-=--