This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Spurious testsuite failures


On Fri, Apr 30, 2004 at 09:54:20AM -0700, Dan Kegel wrote:
> Dan Kegel wrote:
> >>This turned out to be Sun BUG 4927647. Which is triggered by expect.
> >>No patch availiable as of today :-(
> >
> >I beg to differ.  Try building expect from sources yourself
> >and applying the patch

Sorry for beeing terse in my previous mail. I did try the patches and built
tcl, expect (with your patch thanks for the pointer btw.) and dejagnu from
source and that didn't fix it.

> >  http://kegel.com/crosstool/current/patches/expect-5.39/pr12096.patch
> >That fixes it for me.
> 
> ... on Linux, anyway.  Did you try the patch I mention,
> and it still didn't work on Solaris?

Yes exactly. This is not PR12096, it is a different bug in the solaris
kernel. The following program sometimes exits with exitcode 1 without
reading anything from the pty (read returns EINVAL):

int main ()
{
	int i;
	char * name;
	char buf[100];
	int fd, master = open ("/dev/ptmx", O_RDWR);
	grantpt (master);
	unlockpt (master); 
	name = ptsname (master);
	if (fork ()) {
		wait (0);
		errno = 0;
		while (read (master, buf, 1) > 0);
		if (errno == EINVAL)
			return 1;
		return 0;
	}
	fd = open (name, O_RDWR);
	ioctl (fd, I_PUSH, "ptem");
	ioctl (fd, I_PUSH, "ldterm");
	write (fd, "blahblub", 8);
	if (fork ())
		wait (0);
	close (fd);
	return 0;
}

This is similar to what expect does but there's probably not much
that expect can do to work around this problem.

> Can you give a link to the description for that solaris bug?

Unfortunately not. You'll need a sunsolve account, then just search for
the bug number. However, this needs Solaris 9 (maybe 10) and a multi
processor machine to trigger.

    regards   Christian

-- 
THAT'S ALL FOLKS!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]