* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) [not found] ` <20240520062438.19910C35337@vcs2.savannah.gnu.org> @ 2024-05-20 11:45 ` Michael Albinus 2024-05-20 12:33 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Michael Albinus @ 2024-05-20 11:45 UTC (permalink / raw) To: emacs-devel; +Cc: Juri Linkov Juri Linkov <juri@jurta.org> writes: Hi Juri, > New tests for nested archives (bug#70987) > > * test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz): > * test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-tar-and-gz): > New tests. > * test/data/decompress/tzg.tar.gz: > * test/data/decompress/ztg.zip: > New data files to test decompressing of different combinations > of nested tar and zip archives. > --- > test/data/decompress/tzg.tar.gz | Bin 0 -> 255 bytes > test/data/decompress/ztg.zip | Bin 0 -> 316 bytes > test/lisp/arc-mode-tests.el | 16 ++++++++++++++++ > test/lisp/tar-mode-tests.el | 14 ++++++++++++++ > 4 files changed, 30 insertions(+) This fails: --8<---------------cut here---------------start------------->8--- # make -C test tar-mode-tests make: Entering directory '/home/albinus/src/emacs/test' make[1]: Entering directory '/home/albinus/src/emacs/test' ELC+ELN lisp/tar-mode-tests.elc GEN lisp/tar-mode-tests.log Running 3 tests (2024-05-20 13:40:09+0200, selector `(not (tag :unstable))') uncompressing tg.tar.gz... uncompressing tg.tar.gz...done Parsing tar file... Parsing tar file...done uncompressing gfk2kIr.gz... uncompressing gfk2kIr.gz...done passed 1/3 tar-mode-test-tar-extract-gz (0.697621 sec) uncompressing tzg.tar.gz... uncompressing tzg.tar.gz...done Parsing tar file... Parsing tar file...done Parsing archive file... Parsing archive file...done. unzip: cannot find or open /home/albinus/src/emacs/test/data/decompress/tzg.tar.gz!./zg.zip, /home/albinus/src/emacs/test/data/decompress/tzg.tar.gz!./zg.zip.zip or /home/albinus/src/emacs/test/data/decompress/tzg.tar.gz!./zg.zip.ZIP. uncompressing gl7vatI.gz... Test tar-mode-test-tar-extract-zip-and-gz backtrace: signal(compression-error ("Opening input file" "error uncompressing jka-compr-insert-file-contents("/tmp/gl7vatI.gz" nil nil nil nil) apply(jka-compr-insert-file-contents ("/tmp/gl7vatI.gz" nil nil nil jka-compr-handler(insert-file-contents "/tmp/gl7vatI.gz" nil nil nil insert-file-contents("/tmp/gl7vatI.gz") archive-try-jka-compr() archive-extract() (setq gz-buffer (archive-extract)) (save-current-buffer (set-buffer (setq zip-buffer (tar-extract))) (s (save-current-buffer (set-buffer (setq tar-buffer (find-file-noselec (unwind-protect (save-current-buffer (set-buffer (setq tar-buffer (f (let* ((tar-file (expand-file-name "tzg.tar.gz" tar-mode-tests-data- #f(lambda () [t] (let* ((fn-15 #'executable-find) (args-16 (conditio #f(compiled-function () #<bytecode -0x199614d94ac54fba>)() handler-bind-1(#f(compiled-function () #<bytecode -0x199614d94ac54fb ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name tar-mode-test-tar-extract-zip-and-gz ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable)) ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type ert-run-tests-batch((not (tag :unstable))) ert-run-tests-batch-and-exit((not (tag :unstable))) eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t) command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l command-line() normal-top-level() Test tar-mode-test-tar-extract-zip-and-gz condition: (compression-error "Opening input file" "error uncompressing gl7vatI.gz" "/tmp/gl7vatI.gz") FAILED 2/3 tar-mode-test-tar-extract-zip-and-gz (0.168586 sec) at lisp/tar-mode-tests.el:49 passed 3/3 tar-mode-test-tar-grind-file-mode (0.000084 sec) Ran 3 tests, 2 results as expected, 1 unexpected (2024-05-20 13:40:10+0200, 1.049251 sec) 1 unexpected results: FAILED tar-mode-test-tar-extract-zip-and-gz make[1]: *** [Makefile:185: lisp/tar-mode-tests.log] Error 1 make[1]: Leaving directory '/home/albinus/src/emacs/test' make: *** [Makefile:251: lisp/tar-mode-tests] Error 2 make: Leaving directory '/home/albinus/src/emacs/test' --8<---------------cut here---------------end--------------->8--- Best regards, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-20 11:45 ` master 91e02dde5fe: New tests for nested archives (bug#70987) Michael Albinus @ 2024-05-20 12:33 ` Eli Zaretskii 2024-05-20 13:47 ` Michael Albinus 0 siblings, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2024-05-20 12:33 UTC (permalink / raw) To: Michael Albinus; +Cc: emacs-devel, juri > From: Michael Albinus <michael.albinus@gmx.de> > Cc: Juri Linkov <juri@linkov.net> > Date: Mon, 20 May 2024 13:45:37 +0200 > > Juri Linkov <juri@jurta.org> writes: > > Hi Juri, > > > New tests for nested archives (bug#70987) > > > > * test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz): > > * test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-tar-and-gz): > > New tests. > > * test/data/decompress/tzg.tar.gz: > > * test/data/decompress/ztg.zip: > > New data files to test decompressing of different combinations > > of nested tar and zip archives. > > --- > > test/data/decompress/tzg.tar.gz | Bin 0 -> 255 bytes > > test/data/decompress/ztg.zip | Bin 0 -> 316 bytes > > test/lisp/arc-mode-tests.el | 16 ++++++++++++++++ > > test/lisp/tar-mode-tests.el | 14 ++++++++++++++ > > 4 files changed, 30 insertions(+) > > This fails: It should succeed now that I installed the fix for bug#70987. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-20 12:33 ` Eli Zaretskii @ 2024-05-20 13:47 ` Michael Albinus 2024-05-20 17:00 ` Juri Linkov 0 siblings, 1 reply; 14+ messages in thread From: Michael Albinus @ 2024-05-20 13:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: emacs-devel, juri Eli Zaretskii <eliz@gnu.org> writes: > It should succeed now that I installed the fix for bug#70987. Yep. Best regards, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-20 13:47 ` Michael Albinus @ 2024-05-20 17:00 ` Juri Linkov 2024-05-20 18:03 ` Eli Zaretskii 0 siblings, 1 reply; 14+ messages in thread From: Juri Linkov @ 2024-05-20 17:00 UTC (permalink / raw) To: Michael Albinus; +Cc: Eli Zaretskii, emacs-devel >> It should succeed now that I installed the fix for bug#70987. > > Yep. This is called Test-Driven Development ;-) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-20 17:00 ` Juri Linkov @ 2024-05-20 18:03 ` Eli Zaretskii 2024-05-24 11:53 ` Benjamin Riefenstahl 2024-05-27 17:45 ` Michael Albinus 0 siblings, 2 replies; 14+ messages in thread From: Eli Zaretskii @ 2024-05-20 18:03 UTC (permalink / raw) To: Juri Linkov; +Cc: michael.albinus, emacs-devel > From: Juri Linkov <juri@linkov.net> > Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org > Date: Mon, 20 May 2024 20:00:55 +0300 > > >> It should succeed now that I installed the fix for bug#70987. > > > > Yep. > > This is called Test-Driven Development ;-) Indeed. TDD, here we come! ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-20 18:03 ` Eli Zaretskii @ 2024-05-24 11:53 ` Benjamin Riefenstahl 2024-05-27 17:45 ` Michael Albinus 1 sibling, 0 replies; 14+ messages in thread From: Benjamin Riefenstahl @ 2024-05-24 11:53 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Juri Linkov, michael.albinus, emacs-devel Eli Zaretskii writes: > Indeed. TDD, here we come! ;-) Thanks again everybody, benny ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-20 18:03 ` Eli Zaretskii 2024-05-24 11:53 ` Benjamin Riefenstahl @ 2024-05-27 17:45 ` Michael Albinus 2024-05-27 17:58 ` Juri Linkov 2024-05-27 18:08 ` Eli Zaretskii 1 sibling, 2 replies; 14+ messages in thread From: Michael Albinus @ 2024-05-27 17:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Juri Linkov, emacs-devel Eli Zaretskii <eliz@gnu.org> writes: Hi, >> From: Juri Linkov <juri@linkov.net> >> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org >> Date: Mon, 20 May 2024 20:00:55 +0300 >> >> >> It should succeed now that I installed the fix for bug#70987. >> > >> > Yep. >> >> This is called Test-Driven Development ;-) > > Indeed. TDD, here we come! In order to keep the ball rolling: while tar-mode-tests succeed in my local environment, they fail on emba: <https://emba.gnu.org/emacs/emacs/-/jobs/85996#L904> --8<---------------cut here---------------start------------->8--- uncompressing tg.tar.gz... uncompressing tg.tar.gz...done Parsing tar file... Parsing tar file...done uncompressing gVv6Udu.gz... uncompressing gVv6Udu.gz...done passed 1/3 tar-mode-test-tar-extract-gz (0.093691 sec) uncompressing tzg.tar.gz... uncompressing tzg.tar.gz...done Parsing tar file... Parsing tar file...done Parsing archive file... Parsing archive file...done. Searching for program: No such file or directory, unzip Test tar-mode-test-tar-extract-zip-and-gz backtrace: signal(ert-test-failed (((should (equal (char-after) 10052)) :form ( ert-fail(((should (equal (char-after) 10052)) :form (equal 103 10052 (if (unwind-protect (setq value-22 (apply fn-20 args-21)) (setq form (let (form-description-24) (if (unwind-protect (setq value-22 (apply (let ((value-22 'ert-form-evaluation-aborted-23)) (let (form-descrip (let* ((fn-20 #'equal) (args-21 (condition-case err (list (char-afte (save-current-buffer (set-buffer (setq zip-buffer (tar-extract))) (s (save-current-buffer (set-buffer (setq tar-buffer (find-file-noselec (unwind-protect (save-current-buffer (set-buffer (setq tar-buffer (f (let* ((tar-file (expand-file-name "tzg.tar.gz" tar-mode-tests-data- #f(lambda () [t] (let* ((fn-15 #'executable-find) (args-16 (conditio #f(compiled-function () #<bytecode -0x1810b1c9d596429f>)() handler-bind-1(#f(compiled-function () #<bytecode -0x1810b1c9d596429 ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name tar-mode-test-tar-extract-zip-and-gz ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ... ...)) ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n 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" "--eval" "(setq treesit-extra-l command-line() normal-top-level() Test tar-mode-test-tar-extract-zip-and-gz condition: (ert-test-failed ((should (equal (char-after) 10052)) :form (equal 103 10052) :value nil :explanation (different-atoms (103 "#x67" "?g") (10052 "#x2744" "?❄")))) FAILED 2/3 tar-mode-test-tar-extract-zip-and-gz (0.049103 sec) at lisp/tar-mode-tests.el:49 passed 3/3 tar-mode-test-tar-grind-file-mode (0.000273 sec) Ran 3 tests, 2 results as expected, 1 unexpected (2024-05-27 09:08:03+0000, 0.358310 sec) 1 unexpected results: FAILED tar-mode-test-tar-extract-zip-and-gz ((should (equal (char-after) 10052)) :form (equal 103 10052) :value nil :explanation (different-atoms (103 "#x67" "?g") (10052 "#x2744" "?❄"))) --8<---------------cut here---------------end--------------->8--- Perhaps it needs a test whether executable unzip does exist? Best regards, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-27 17:45 ` Michael Albinus @ 2024-05-27 17:58 ` Juri Linkov 2024-05-28 7:11 ` Michael Albinus 2024-05-27 18:08 ` Eli Zaretskii 1 sibling, 1 reply; 14+ messages in thread From: Juri Linkov @ 2024-05-27 17:58 UTC (permalink / raw) To: Michael Albinus; +Cc: Eli Zaretskii, emacs-devel >>> >> It should succeed now that I installed the fix for bug#70987. >>> > >>> > Yep. >>> >>> This is called Test-Driven Development ;-) >> >> Indeed. TDD, here we come! > > In order to keep the ball rolling: while tar-mode-tests succeed in my > local environment, they fail on emba: > ... > Searching for program: No such file or directory, unzip > ... > Perhaps it needs a test whether executable unzip does exist? Looks so, like there is already (skip-unless (executable-find "zip")). ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-27 17:58 ` Juri Linkov @ 2024-05-28 7:11 ` Michael Albinus 2024-05-28 7:27 ` Michael Albinus 2024-05-28 11:12 ` Eli Zaretskii 0 siblings, 2 replies; 14+ messages in thread From: Michael Albinus @ 2024-05-28 7:11 UTC (permalink / raw) To: Juri Linkov; +Cc: Eli Zaretskii, emacs-devel Juri Linkov <juri@linkov.net> writes: >> In order to keep the ball rolling: while tar-mode-tests succeed in my >> local environment, they fail on emba: >> ... >> Searching for program: No such file or directory, unzip >> ... >> Perhaps it needs a test whether executable unzip does exist? > > Looks so, like there is already (skip-unless (executable-find "zip")). On Debian, zip and unzip are installed by different packages. The existence of the executable zip does not include executable unzip. --8<---------------cut here---------------start------------->8--- # apt-file find /usr/bin/zip cbmconvert: /usr/bin/zip2disk hatari: /usr/bin/zip2st libio-compress-perl: /usr/bin/zipdetails openfoam: /usr/bin/zipUpMesh perl: /usr/bin/zipdetails python3-zipstream-ng: /usr/bin/zipserver soong: /usr/bin/zip2zip soong: /usr/bin/zipsync unzip: /usr/bin/zipgrep unzip: /usr/bin/zipinfo zip: /usr/bin/zip zip: /usr/bin/zipcloak zip: /usr/bin/zipnote zip: /usr/bin/zipsplit zipalign: /usr/bin/zipalign zipcmp: /usr/bin/zipcmp zipmerge: /usr/bin/zipmerge ziproxy: /usr/bin/ziproxy ziproxy: /usr/bin/ziproxylogtool ziptime: /usr/bin/ziptime ziptool: /usr/bin/ziptool # apt-file find /usr/bin/unzip unzip: /usr/bin/unzip unzip: /usr/bin/unzipsfx zziplib-bin: /usr/bin/unzip-mem --8<---------------cut here---------------end--------------->8--- Test-driven development :-) Best regards, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-28 7:11 ` Michael Albinus @ 2024-05-28 7:27 ` Michael Albinus 2024-05-28 11:13 ` Eli Zaretskii 2024-05-28 11:12 ` Eli Zaretskii 1 sibling, 1 reply; 14+ messages in thread From: Michael Albinus @ 2024-05-28 7:27 UTC (permalink / raw) To: Juri Linkov; +Cc: Eli Zaretskii, emacs-devel Michael Albinus <michael.albinus@gmx.de> writes: > Juri Linkov <juri@linkov.net> writes: > >>> In order to keep the ball rolling: while tar-mode-tests succeed in my >>> local environment, they fail on emba: >>> ... >>> Searching for program: No such file or directory, unzip >>> ... >>> Perhaps it needs a test whether executable unzip does exist? >> >> Looks so, like there is already (skip-unless (executable-find "zip")). > > On Debian, zip and unzip are installed by different packages. The > existence of the executable zip does not include executable unzip. And reading tar-mode-test-tar-extract-zip-and-gz, there is a check for gzip, not for zip. Best regards, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-28 7:27 ` Michael Albinus @ 2024-05-28 11:13 ` Eli Zaretskii 0 siblings, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2024-05-28 11:13 UTC (permalink / raw) To: Michael Albinus; +Cc: juri, emacs-devel > From: Michael Albinus <michael.albinus@gmx.de> > Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org > Date: Tue, 28 May 2024 09:27:42 +0200 > > Michael Albinus <michael.albinus@gmx.de> writes: > > > Juri Linkov <juri@linkov.net> writes: > > > >>> In order to keep the ball rolling: while tar-mode-tests succeed in my > >>> local environment, they fail on emba: > >>> ... > >>> Searching for program: No such file or directory, unzip > >>> ... > >>> Perhaps it needs a test whether executable unzip does exist? > >> > >> Looks so, like there is already (skip-unless (executable-find "zip")). > > > > On Debian, zip and unzip are installed by different packages. The > > existence of the executable zip does not include executable unzip. > > And reading tar-mode-test-tar-extract-zip-and-gz, there is a check for > gzip, not for zip. Yes, because arc-mode doesn't need zip, AFAIR. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-28 7:11 ` Michael Albinus 2024-05-28 7:27 ` Michael Albinus @ 2024-05-28 11:12 ` Eli Zaretskii 2024-05-28 11:24 ` Michael Albinus 1 sibling, 1 reply; 14+ messages in thread From: Eli Zaretskii @ 2024-05-28 11:12 UTC (permalink / raw) To: Michael Albinus; +Cc: juri, emacs-devel > From: Michael Albinus <michael.albinus@gmx.de> > Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org > Date: Tue, 28 May 2024 09:11:39 +0200 > > Juri Linkov <juri@linkov.net> writes: > > >> In order to keep the ball rolling: while tar-mode-tests succeed in my > >> local environment, they fail on emba: > >> ... > >> Searching for program: No such file or directory, unzip > >> ... > >> Perhaps it needs a test whether executable unzip does exist? > > > > Looks so, like there is already (skip-unless (executable-find "zip")). > > On Debian, zip and unzip are installed by different packages. The > existence of the executable zip does not include executable unzip. I think Juri meant to say that since we already test for zip, we should also test for unzip where it is needed. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-28 11:12 ` Eli Zaretskii @ 2024-05-28 11:24 ` Michael Albinus 0 siblings, 0 replies; 14+ messages in thread From: Michael Albinus @ 2024-05-28 11:24 UTC (permalink / raw) To: Eli Zaretskii; +Cc: juri, emacs-devel Eli Zaretskii <eliz@gnu.org> writes: >> >> Perhaps it needs a test whether executable unzip does exist? >> > >> > Looks so, like there is already (skip-unless (executable-find "zip")). >> >> On Debian, zip and unzip are installed by different packages. The >> existence of the executable zip does not include executable unzip. > > I think Juri meant to say that since we already test for zip, we > should also test for unzip where it is needed. OK, I've added the check to the test. Best regards, Michael. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: master 91e02dde5fe: New tests for nested archives (bug#70987) 2024-05-27 17:45 ` Michael Albinus 2024-05-27 17:58 ` Juri Linkov @ 2024-05-27 18:08 ` Eli Zaretskii 1 sibling, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2024-05-27 18:08 UTC (permalink / raw) To: Michael Albinus; +Cc: juri, emacs-devel > From: Michael Albinus <michael.albinus@gmx.de> > Cc: Juri Linkov <juri@linkov.net>, emacs-devel@gnu.org > Date: Mon, 27 May 2024 19:45:58 +0200 > > Perhaps it needs a test whether executable unzip does exist? Feel free to install such a change, and thanks. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-05-28 11:24 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <171618627762.8573.3679457028884512823@vcs2.savannah.gnu.org> [not found] ` <20240520062438.19910C35337@vcs2.savannah.gnu.org> 2024-05-20 11:45 ` master 91e02dde5fe: New tests for nested archives (bug#70987) Michael Albinus 2024-05-20 12:33 ` Eli Zaretskii 2024-05-20 13:47 ` Michael Albinus 2024-05-20 17:00 ` Juri Linkov 2024-05-20 18:03 ` Eli Zaretskii 2024-05-24 11:53 ` Benjamin Riefenstahl 2024-05-27 17:45 ` Michael Albinus 2024-05-27 17:58 ` Juri Linkov 2024-05-28 7:11 ` Michael Albinus 2024-05-28 7:27 ` Michael Albinus 2024-05-28 11:13 ` Eli Zaretskii 2024-05-28 11:12 ` Eli Zaretskii 2024-05-28 11:24 ` Michael Albinus 2024-05-27 18:08 ` Eli Zaretskii
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.