From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: Some testing issues Date: Sat, 8 Jul 2017 18:01:12 -0400 Message-ID: References: <8737a8j61r.fsf@rosalinde> <87zicfnft7.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1499551320 5099 195.159.176.226 (8 Jul 2017 22:02:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Jul 2017 22:02:00 +0000 (UTC) Cc: Emacs developers To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 09 00:01:49 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTxnQ-0000ST-J2 for ged-emacs-devel@m.gmane.org; Sun, 09 Jul 2017 00:01:48 +0200 Original-Received: from localhost ([::1]:34156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTxnR-0002Ze-9W for ged-emacs-devel@m.gmane.org; Sat, 08 Jul 2017 18:01:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTxmt-0002ZT-2e for emacs-devel@gnu.org; Sat, 08 Jul 2017 18:01:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTxms-0002g4-9c for emacs-devel@gnu.org; Sat, 08 Jul 2017 18:01:15 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:35446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTxms-0002fq-4c for emacs-devel@gnu.org; Sat, 08 Jul 2017 18:01:14 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id 191so51143352oii.2 for ; Sat, 08 Jul 2017 15:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8YFfN9lwVE8UHoOFIKaZxYXTGcVbM93eH3F9QtfV7Gw=; b=eZm5eC0vv1nLC8q7gzqd7qb5K6OG1NR5oZf7aRZY2XGxh1bZj/buMRwb9ouH4mU6zU DW0jRy7QdwZ/aDYMidYQ2BeY1zgnUNQs3slMbhsb7BJVEmilZZgPZthvpBMnn+/Wb3xq 8CTDRqIF2dzO3GT6NmgLe0xGGsSUUdvI2sGKVhwB0BIrlGnGrK7wqrHzxDfL0mek5OeU z+gjgFmvT9q3rWUSZeYNqAd8/n/BPqiml74f6oeTbolfxYjZYm6tUI70n6ZhTN3rlIF1 0boCHBBLD2pRq0iGDz9QedfbRqcCq29LXhOiyV+Gw2DLZtcgKH46azfkqVPDLs4s7gWW LNKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8YFfN9lwVE8UHoOFIKaZxYXTGcVbM93eH3F9QtfV7Gw=; b=Nbb7NaF2Mc6kiWYNkg2o2EN3rYL42AXkysG8ghmSQABQ0+lKuZAdLEvYsWfHT4NLLM Zd+KjUiqC+MfGl+h/oOm9+2IQrbpBXM0PQgEQPCKVIVfupBS4Xmh0IrF+A+3ZDuRsLL3 OJATk/SYg2hHQzop+hIEfpdRN7kxzW1rkE9Hv47vFtHZIQfqfbRkCZY3dQ98c+UN10Bf JurDNtdznqpM1Af8EL/rfUi5yolEbQHKHty/UY50RhEl9deUv3+QgHtK9oUr68iHllvM ZCr5AYMwJwQbb1xbOZtqEhVdyjMcX61z7Pqe2PT+Ot/QlgdGMEtUuLmpWnp7/1kThV2+ jd+w== X-Gm-Message-State: AIVw1130PDvEnkf7fAMNcA66V/wxDYtN7TccK3VjOSPyj+JZ9IiROumk amph6uXI8BJvaiTvw4CacRCBBAlOjA== X-Received: by 10.202.71.197 with SMTP id u188mr3980796oia.222.1499551272815; Sat, 08 Jul 2017 15:01:12 -0700 (PDT) Original-Received: by 10.74.113.91 with HTTP; Sat, 8 Jul 2017 15:01:12 -0700 (PDT) In-Reply-To: <87zicfnft7.fsf@rosalinde> X-Google-Sender-Auth: 4BZsOFNJlHhxB7WsYR-RnaY5RNY X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216343 Archived-At: On Sat, Jul 8, 2017 at 10:50 AM, Stephen Berman wrote: >> `(let* ((todo-test-home (make-temp-file "todo-test-home-" t)) >> + (abbreviated-home-dir nil) >> (process-environment (cons (format "HOME=%s" todo-test-home) >> process-environment)) > > The only test file that sets abbreviated-home-dir is package-test.el, in > the macro with-package-test, which was indeed the inspiration for > with-todo-test. I assume this would only effect cases like yours, and > hence make the test environment more robust, or are possible problems > that setting it to nil could raise? abbreviated-home-dir is essentially a cache used by abbreviate-file-name, and when the value of HOME is changed the cached value is wrong, hence why setting it to nil is the right thing. Possibly we should record the value of HOME we cached and clear it automatically when a new one is used so that this kind of thing is not needed. >> >> I think it succeeds the second time because the *ert* buffer is in a >> different state. > > What state is that? In Edebug it appears to be the same as on the first > test run: current-buffer is todo-test-1.todo and selected-window is the > one showing the *ert* buffer, yet now (pos-visible-in-window-p shown) is > non-nil, while on the first run it is nil. I don't see what makes the > difference -- certainly not the value of the variable `shown', which is > 226 and that position in window displaying *ert* is visible in both runs. Maybe the set-window-buffer from the other tests leaks in? For some reason I can't reproduce this today, every time I run with the set-window-buffer commented out it consistently fails. I'm sure yesterday I saw it succeeding after the first time. >> todo-test-toggle-item-header04? I added a `message' call, and it seems >> that in batch mode the selected window shows *scratch* whereas in >> interactive mode it shows *ert*. I would say the success in >> interactive mode is just a coincidence. > > Well, it's a reliably reproducible coincidence, which seems like a > contradiction in terms. I mean "coincidence" in the same way that the 5th digit of pi being 5 is a "coincidence" (slightly less reliable than that though, presumably if we made `initial-scratch-message' long enough the batch mode behaviour would change).