From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: dired-tests.el fails on MS-Windows Date: Wed, 02 Aug 2017 02:02:32 +0900 Message-ID: <87d18fw79z.fsf@calancha-pc> References: <83zibjz519.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501607009 7181 195.159.176.226 (1 Aug 2017 17:03:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Aug 2017 17:03:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: tino.calancha@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 01 19:03:23 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 1dcaZl-0001QY-Lg for ged-emacs-devel@m.gmane.org; Tue, 01 Aug 2017 19:03:21 +0200 Original-Received: from localhost ([::1]:43773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcaZr-0002LL-QN for ged-emacs-devel@m.gmane.org; Tue, 01 Aug 2017 13:03:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcaZh-0002Ju-JW for emacs-devel@gnu.org; Tue, 01 Aug 2017 13:03:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcaZd-00087x-Bk for emacs-devel@gnu.org; Tue, 01 Aug 2017 13:03:16 -0400 Original-Received: from mail-pg0-x22d.google.com ([2607:f8b0:400e:c05::22d]:33301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcaZd-00087f-6N; Tue, 01 Aug 2017 13:03:13 -0400 Original-Received: by mail-pg0-x22d.google.com with SMTP id c14so10407511pgn.0; Tue, 01 Aug 2017 10:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=BlXyIsKTMTT0MFhv0annR+wc9VcQnb/XtyqnFaaDZBI=; b=WqjmMi67rGsmfAyrrS9AWxzzcI6jfpnqgowKhUzrDGWuc376rr/7JQ4aA4allEUu6g kO/PeO0tBAtKxjDf9mmWq4Cua+14rKMK2t5GmcSaJLk9EeuePPRLzIRy/cm1ggNtiTb8 s/l7tC71kAl7IxRVrbpcDBiRRpkn/LRgClWPbbhTS7tFqkvgvcAEJvuDQWND735CXyie 5i0U+DYF8H7F/CxUfJVNdad1KKEuVgGkd5tkL+HCnB5oO1jT1b+tVHc0MViMZ/n+MZMD 4/z2+TC4pqtfMuANFH05iqV+Y8g1qYWpp3G/DSssTgPjaV0yI5ZyThVENK6rysso183K i7XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=BlXyIsKTMTT0MFhv0annR+wc9VcQnb/XtyqnFaaDZBI=; b=lCOovJqgrP6YQf3gnJ2+r3PG1RVnHzLHq9u2ZZiwKLbYhk54j9fzq6XFDexHf/WBSZ Af8NV1A6vh1KBqXzZKCTHvJSuqLX1aSKMY5Kc6w8AnKRj4TQIdxLKOoot0TwCKrJNt/v jMMU0uaPTlm5w/8/LKMGSxaNtq9Wd3iFoi09uajsvcwdyqxI4eDMlsexaPovIFKq6H+5 iU1aVsvMLvBWG5ykgRi55InQu4tENeArd38lFDrmwqBJ1Qtb1faJEYZn8aeq2P/u99yv Cf2SDwGlsjvnmPxqAzYzGPySDZQCEx11HmgJjuVGLXHU7koLuu1ITG2v6iKL1hhhUq2P hK5g== X-Gm-Message-State: AIVw113tso6vKn7v427FI0ZnGrP2Qr7ZucGS4c73mLvFlHdPUjXczVCW rKImbKIdC4g8dQ== X-Received: by 10.98.64.196 with SMTP id f65mr6614459pfd.123.1501606987335; Tue, 01 Aug 2017 10:03:07 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id p5sm53831707pgf.50.2017.08.01.10.03.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2017 10:03:06 -0700 (PDT) In-Reply-To: <83zibjz519.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Aug 2017 18:22:42 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22d 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:217217 Archived-At: Eli Zaretskii writes: > The failed tests are shown below. 2 others failed originally, but I > fixed them. > > Tino, please always add comments to the tests explaining the idea > behind all the tricks and juggling. Otherwise, it is very hard to > understand why the test is doing what it's doing and how it is doing > that. Same request for ediff-ptch-tests.el, which also fails for me. OK. I agree they looks not very digestive tests. > dired-tests.log: > Test dired-test-bug25609 condition: > (ert-test-failed > ((should > (file-exists-p target)) > :form > (file-exists-p "c:/DOCUME~1/Zaretzky/LOCALS~1/Temp/bar6828Ler/foo6828WPJ") > :value nil)) Could you check the following? emacs -Q ;; eval following form: (require 'nadvice) (let* ((from (make-temp-file "foo" 'dir)) (to (make-temp-file "bar" 'dir)) (target (expand-file-name (file-name-nondirectory from) to)) (nested (expand-file-name (file-name-nondirectory from) target)) (dired-dwim-target t) (dired-recursive-copies 'always) ; Don't prompt me. buffers) (advice-add 'dired-query ; Don't ask confirmation to overwrite a file. :override (lambda (_sym _prompt &rest _args) (setq dired-query t)) '((name . "advice-dired-query"))) (advice-add 'completing-read ; Just return init. :override (lambda (_prompt _coll &optional _pred _match init _hist _def _inherit _keymap) init) '((name . "advice-completing-read"))) (push (dired to) buffers) (push (dired-other-window temporary-file-directory) buffers) (dired-goto-file from) (dired-do-copy) (dired-do-copy); Again. (unwind-protect (progn (list (file-exists-p target) (file-exists-p nested))) (dolist (buf buffers) (when (buffer-live-p buf) (kill-buffer buf))) (delete-directory from 'recursive) (delete-directory to 'recursive) (advice-remove 'dired-query "advice-dired-query") (advice-remove 'completing-read "advice-completing-read"))) ;; The normal result is: '(t nil). If you get '(nil t) means ;; the bug is not fixed in your platform. Other values must be ;; wrong assumptions from my side that are not true in your box. > Test dired-test-bug27631 backtrace: > signal(error ("em-ls is not a currently loaded feature")) > error("%s is not a currently loaded feature" "em-ls") > unload-feature(em-ls force) > (unwind-protect (progn (make-directory dir1) (make-directory dir2) ( > (let* ((dir (make-temp-file "bug27631" 'dir)) (dir1 (expand-file-nam > (closure (t) nil (let* ((dir (make-temp-file "bug27631" 'dir)) (dir1 > ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test > ert-run-test(#s(ert-test :name dired-test-bug27631 :documentation "T > ert-run-or-rerun-test(#s(ert--stats :selector t :tests [#s(ert-test > ert-run-tests(t #f(compiled-function (event-type &rest event-args) # > ert-run-tests-batch(nil) > ert-run-tests-batch-and-exit(nil) > eval((ert-run-tests-batch-and-exit nil)) > command-line-1(("-L" ";." "-l" "ert" "-l" "lisp/dired-tests.el" "--e > command-line() > normal-top-level() > Test dired-test-bug27631 condition: > (error "em-ls is not a currently loaded feature") I don't get this error, but the idea of require those libs and unload them looks ugly. We could move those parts to: test/lisp/ls-lisp.el (yes i called wrongly: must be ls-lisp-tests.el) test/lisp/eshell/eshell-tests.el and then, we don't need to unload anything. > ediff-ptch-tests.log: > > Running 2 tests (2017-08-01 18:21:40+0300) > passed 1/2 ediff-ptch-test-bug25010 > Test ediff-ptch-test-bug26084 backtrace: > Test ediff-ptch-test-bug26084 condition: > (wrong-type-argument stringp nil) > FAILED 2/2 ediff-ptch-test-bug26084 I think this test for Bug#26084 is more complicated than the fix of the bug itself. It has also problems because the different idiosyncrasy respect to "-b" option for different versions of "patch". Delete it? Skipped it unless in a GNU system?