Subject: Re: bug#49078: dejagnu-1.6.3 test failure

From: Jacob Bachmeyer <[email-masked]>
Date: Sat, 19 Jun 2021 23:45:29 -0500

Xi Ruoyao wrote:
> If building in the source directory is not
> supported, we can update the LFS book
> (https://www.linuxfromscratch.org/lfs/view/development/chapter08/dejagnu.html
> ).
>   

The GNU Coding Standards (7.2.1 "General Conventions for Makefiles" 
<URL:https://www.gnu.org/prep/standards/standards.html#Makefile-Basics>) 
emphasize that GNU packages should support building outside of the 
source directory, and this is generally a recommended practice.  
Building in the source directory is usually supported, but less often 
tested.

However, DejaGnu is unusual in that the "build procedure" only emits a 
message that DejaGnu is ready to install.  This works because DejaGnu is 
written in a portable interpreted language (Tcl with Expect) and can, in 
fact, be used from an unpacked source tree or Git checkout without 
installing it at all.  This latter option is new-ish and a modern 
equivalent for the very deprecated Cygnus tree layout used in the past.

Building in the source tree is supported in DejaGnu, but is less 
convenient for testing and therefore less extensively tested during 
development.  Not that that is relevant here with this bug -- the tests 
pass in a source tree on my primary workstation.

These failures are due to a bug in Expect 5.45.4, confirmed to be an 
upstream issue because I was able to replicate this on a Fedora box to 
which I have access, that causes Expect to incorrectly treat certain 
input at an interactive prompt as if it were end-of-file.  I am still 
looking into the root causes.  Building in a separate directory is a 
workaround for the underlying Expect bug, since the command that is 
tickling the bug will be issued differently (specifically a different 
length) and thus not tickle the bug.

I am now looking into how to go about reporting this bug upstream, so 
far I have found a "maze of twisty little passages, all alike" and am 
not yet certain where to actually send the report when I finish it.

-- Jacob