GNU bug report logs - #47385
make check confused by ../../expect/expect directory

Previous Next

Package: dejagnu;

Reported by: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>

Date: Thu, 25 Mar 2021 12:26:01 UTC

Owned by: jcb62281 <at> gmail.com

Severity: normal

To reply to this bug, email your comments to 47385 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-dejagnu <at> gnu.org:
bug#47385; Package dejagnu. (Thu, 25 Mar 2021 12:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>:
New bug report received and forwarded. Copy sent to bug-dejagnu <at> gnu.org. (Thu, 25 Mar 2021 12:26:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
To: bug-dejagnu <at> gnu.org
Subject: make check confused by ../../expect/expect directory
Date: Thu, 25 Mar 2021 13:24:56 +0100
When running make check on Solaris, I initially got lots of failures
like the following:

Running /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs/libs.exp .
..
ERROR: tcl error sourcing /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runte
st.libs/libs.exp.
ERROR: tcl error code POSIX EACCES {permission denied}
ERROR: couldn't execute "/vol/gcc/obj/dejagnu/dejagnu-1.6.3-rc1/../../expect/exp
ect": permission denied
    while executing
"spawn $EXPECT"
    (procedure "start_expect" line 10)
    invoked from within
"start_expect"
    (file "/vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs/libs.ex
p" line 99)
    invoked from within
"source /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs/libs.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs
/libs.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name" msg"

It turns out that there I happened to have a ../../expect/expect
directory there.

Unfortunately, lib/runtest.exp (findfile), which is called from at the
beginning of testsuite/lib/runtest.exp, only uses "file exists" which
also works for directories, thus the diagnosis.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University




Information forwarded to bug-dejagnu <at> gnu.org:
bug#47385; Package dejagnu. (Sat, 27 Mar 2021 04:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 47385 <at> debbugs.gnu.org (full text, mbox):

From: Jacob Bachmeyer <jcb62281 <at> gmail.com>
To: Rainer Orth <ro <at> CeBiTec.Uni-Bielefeld.DE>
Cc: 47385 <at> debbugs.gnu.org
Subject: Re: bug#47385: make check confused by ../../expect/expect directory
Date: Fri, 26 Mar 2021 23:18:29 -0500
Rainer Orth wrote:
> When running make check on Solaris, I initially got lots of failures
> like the following:
>
> Running /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs/libs.exp .
> ..
> ERROR: tcl error sourcing /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runte
> st.libs/libs.exp.
> ERROR: tcl error code POSIX EACCES {permission denied}
> ERROR: couldn't execute "/vol/gcc/obj/dejagnu/dejagnu-1.6.3-rc1/../../expect/exp
> ect": permission denied
>     while executing
> "spawn $EXPECT"
>     (procedure "start_expect" line 10)
>     invoked from within
> "start_expect"
>     (file "/vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs/libs.ex
> p" line 99)
>     invoked from within
> "source /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs/libs.exp"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel #0 source /vol/src/gnu/dejagnu/dejagnu-1.6.3-rc1/testsuite/runtest.libs
> /libs.exp"
>     invoked from within
> "catch "uplevel #0 source $test_file_name" msg"
>
> It turns out that there I happened to have a ../../expect/expect
> directory there.
>
> Unfortunately, lib/runtest.exp (findfile), which is called from at the
> beginning of testsuite/lib/runtest.exp, only uses "file exists" which
> also works for directories, thus the diagnosis.

You are correct that code in DejaGnu that expects to locate an 
executable can incorrectly accept a directory with search permission.

The immediate cause for these test failures is some very old code that 
had been unused for years and was updated and used as part of the new 
internal testsuite infrastructure in 1.6.3.  The support for 
automatically locating an Expect executable in the old Cygnus layout was 
misfiring on the ../../expect/expect directory you had, and this support 
will be removed in 1.6.3-rc2 and replaced with better handling of the 
EXPECT variable.  Users wishing to use a special Expect binary with 
DejaGnu's internal testsuite will need to pass EXPECT=/path/to/expect 
explicitly to either runtest or make check; additional code now ensures 
that the latter case is supported.  An entry for this change has been 
added to NEWS.

However, this will also be a known bug in the 1.6.3 release as it has 
uncovered a larger issue:  a later check in testsuite/lib/runtest.exp is 
supposed to immediately throw a fatal error if the EXPECT variable does 
not refer to an executable, but utils.exp:which has the same problem of 
accepting a directory with search permission as valid.  While 
runtest.exp:findfile is likely to be deprecated or revised, it is an 
undocumented procedure, while utils.exp:which is in the manual and is 
specified to locate executable files.

The initial fix that should allow tests to complete is in commit 
ed6511a32895f6af1451adcdd42815adcde7341a and will be included in release 
candidate 2.


-- Jacob




Owner recorded as jcb62281 <at> gmail.com. Request was from Jacob Bachmeyer <jcb62281 <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Mar 2021 22:46:02 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.