asdf test failure in 3.3.4 with ecl 20.4.24

Bug #1889313 reported by Jesse Off
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
New
Undecided
Unassigned

Bug Description

A very strange reader error is tripped running the asdf tests on mac os + ecl 20.4.24 + latest 7/28/2020 asdf git.

A change to an earlier run test can make it pass:

diff --git a/test/test-run-program.script b/test/test-run-program.script
index bd318863..659c3c4c 100644
--- a/test/test-run-program.script
+++ b/test/test-run-program.script
@@ -228,7 +228,7 @@
   (signals error (run-program nil :output :lines))

   (DBG "Test that run-program fails properly when the executable doesn't exist.")
- (signals error (run-program '("does-not-exist") :output :lines))
+ (signals error (run-program '("does-not-exist") :output :lines :force-shell t))
   (signals error (run-program "does-not-exist" :output :lines))

   (assert-equal '(nil nil 0) (multiple-value-list (run-program "echo ok" :output nil)))

There is code in the run-program implementation hinting at old ecl bugs that are worked around by effectively making :force-shell t the default. Perhaps these old bugs have come back?

I'd post this to your gitlab, but it would seem theres some sort of problem with registering on gitlab.common-lisp.net. It asked me to message people on IRC and even after managing that it said I've been blocked.

Below is the failure output:

PWD=/Users/joff/common-lisp/asdf/test
OLDPWD=/Users/joff/common-lisp/asdf
ecl -norc -load sys:cmp -eval "(or\`,#.(load(string\`|script-support.lisp|))#.(asdf-test::compile-asdf-script))"
;;; Loading #P"/usr/local/Cellar/ecl/20.4.24/lib/ecl-20.4.24/cmp.fas"
;;; Loading "/Users/joff/common-lisp/asdf/test/script-support.lisp"
;;; Loading "/Users/joff/common-lisp/asdf/build/fasls/ecl/asdf.fas"
Reusing previously-compiled ASDF
Compiled OK
Testing: test-run-program.script
ecl -norc -load sys:cmp -eval "'(#.(load(string'|script-support.lisp|))#.(asdf-test::load-asdf)#.(asdf-test::frob-packages)#.(asdf-test:run-test-script'|test-run-program.script|))"
;;; Loading #P"/usr/local/Cellar/ecl/20.4.24/lib/ecl-20.4.24/cmp.fas"
;;; Loading "/Users/joff/common-lisp/asdf/test/script-support.lisp"
;;; Loading "/Users/joff/common-lisp/asdf/build/fasls/ecl/asdf.fas"
Configuring ASDF
Enabling debugging
Being a bit verbose
Comparing directories
ASDF-TEST:*TEST-DIRECTORY* and
(:PATHNAME-DIRECTORY-PATHNAME (NTH-VALUE 2 (:LOCATE-SYSTEM :TEST-ASDF))) both evaluate to same path:
  #P"/Users/joff/common-lisp/asdf/test/"
Frob packages
Running test-run-program.script with ecl-20.4.24-macosx-x64
Testing echo ok 1 via run-program as a list
Testing echo ok 1 via run-program as a string
Testing true via run-shell-command
;;; Warning: DEPRECATED-FUNCTION-STYLE-WARNING: Using deprecated function ASDF/BACKWARD-INTERFACE:RUN-SHELL-COMMAND -- please update your code to use a newer API.
The docstring for this function says:
PLEASE DO NOT USE. This function is not just DEPRECATED, but also dysfunctional.
Please use UIOP:RUN-PROGRAM instead.

Testing false via run-shell-command
Testing bad shell command via run-shell-command
Testing good shell command in current directory via run-shell-command
Testing exit status with :output :interactive
aaa
  ASDF-TEST::O => "foo"
  ASDF-TEST::E => "bar baz"
  ASDF-TEST::C => 42
Testing awkward legacy output capture via run-shell-command
Can we echo a simple string?
Are spaces handled properly?
Test that run-program fails properly with an empty program string
An empty string itself is ok since it is passed to the shell.
Test that run-program fails properly with a nil program list
Test that run-program fails properly when the executable doesn't exist.
Checking whether (RUN-PROGRAM '("does-not-exist")
                              :OUTPUT
                              :LINES
                              :FORCE-SHELL
                              NIL) signals ERROR
Received signal #<a UIOP/RUN-PROGRAM:SUBPROCESS-ERROR 0x1056b3480>
Checking whether (RUN-PROGRAM "does-not-exist" :OUTPUT :LINES) signals ERROR
Received signal #<a UIOP/RUN-PROGRAM:SUBPROCESS-ERROR 0x1056cab80>
Checking that spaces between arguments are collapsed by shell when and only when unquoted
Checking behavior on program success or failure
Checking whether (RUN-PROGRAM "false") signals SUBPROCESS-ERROR
Received signal #<a UIOP/RUN-PROGRAM:SUBPROCESS-ERROR 0x1056f1680>
Tests with test-file
Checking whether (RUN-PROGRAM '("false") :OUTPUT :LINES) signals SUBPROCESS-ERROR
Received signal #<a UIOP/RUN-PROGRAM:SUBPROCESS-ERROR 0x10574da80>
Checking whether (NULL
                  (RUN-PROGRAM '("false")
                               :OUTPUT
                               :LINES
                               :IGNORE-ERROR-STATUS
                               T))

TEST ABORTED: Reader error in file #<input stream #P"/Users/joff/common-lisp/asdf/test/test-run-program.script" 0x1052c83c0>, position 12165:
Unmatched right parenthesis, #\)
Backtrace:
0: (#:G2546 NIL)
1: (UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX #(140732852339984 4380601280 140732852339920))
2: (UIOP/IMAGE:PRINT-BACKTRACE NIL)
3: (UIOP/IMAGE:PRINT-CONDITION-BACKTRACE #(1 4380604992 140732852340920))
4: (#<bytecompiled-function ASDF-TEST:ACALL 0x104f505a0> ((ASDF-TEST::ARGS #<a SI::SIMPLE-READER-ERROR 0x10574d080> :COUNT 69 :STREAM #<output file "stdout" 0x10469cc80>) (ASDF-TEST::NAME . :PRINT-CONDITION-BACKTRACE)))
5: (#<bytecompiled-function 0x104b2d870> ((416 . 0) (#:G133) (415 . #:G132) (ASDF-TEST::C . #<a SI::SIMPLE-READER-ERROR 0x10574d080>) (:ASDF-TEST-DONE . :ASDF-TEST-DONE) (ASDF-TEST::THUNK . #<bytecompiled-closure #<bytecompiled-function 0x104b2d230>>)))
6: (#<bytecompiled-function 0x104b2d230> ((ASDF-TEST::NAME . "test-run-program.script") (ASDF-TEST::FILE . ASDF-TEST::|test-run-program.script|)))
7: (#<bytecompiled-function ASDF-TEST::CALL-WITH-TEST 0x104b2d820> ((:ASDF-TEST-DONE . :ASDF-TEST-DONE) (ASDF-TEST::THUNK . #<bytecompiled-closure #<bytecompiled-function 0x104b2d230>>)))
8: (#<bytecompiled-function ASDF-TEST:RUN-TEST-SCRIPT 0x104b2d280> ((ASDF-TEST::FILE . ASDF-TEST::|test-run-program.script|)))
9: (#<bytecompiled-function SI:BYTECODES 0x105246050> NIL)
10: (#<bytecompiled-function SI:BYTECODES 0x104851870> ((SI::OUTPUT-FILE . T) (SI::C-FILE) (SI::H-FILE) (SI::DATA-FILE) (SI::VERBOSE . T) (SI::SYSTEM-P) (EXT:QUIT)))
11: (#<bytecompiled-function SI:BYTECODES 0x1048518c0> NIL)
12: (NIL NIL)
Above backtrace due to this condition:
Reader error in file #<input stream #P"/Users/joff/common-lisp/asdf/test/test-run-program.script" 0x1052c83c0>, position 12165:
Unmatched right parenthesis, #\)
Script failed
Using ecl, test-run-program.script failed
you can retry compilation with:
./test/run-tests.sh ecl test-run-program.script
or more interactively (and maybe with rlwrap or in emacs), start with:
(cd test ; ecl -norc -load sys:cmp )
then copy/paste:
'(#.(load "script-support.lisp") #.(asdf-test::da) #.(load-asdf) #.(frob-packages) #.(load "test-run-program.script"))

-#---------------------------------------
Using ecl
Ran 1 tests:
  0 passing and 1 failing
failing test(s): test-run-program.script
-#---------------------------------------

To view full results and failures, try the following command:
     less -p ABORTED build/results/ecl-test.text

Revision history for this message
Jesse Off (jesseoff) wrote :

I'd like to add that there is no syntax error in the lisp file. The reader error and how :force-shell t fixes it is completely unexplainable to me.

Revision history for this message
Jesse Off (jesseoff) wrote :

also, fwiw, this same test on ARM32 Linux passes. Whatever this is might be macos specific, or macos is the only os that provokes some underlying fragility/race condition in the ECL implementation of run-program

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.